| 1 | 
 4#Boa:MDIParent:fraggleViewport | 
 #Boa:MDIParent:fraggleViewport | 
| 2 | 
  | 
  | 
| 3 | 
  | 
 # $Id$ | 
| 4 | 
  | 
 # $Log$ | 
| 5 | 
  | 
 # Revision 1.20  2004/09/05 10:09:26  xabbu | 
| 6 | 
  | 
 # + Bug that menues where displayed incorrectly on nt like os resolved. | 
| 7 | 
  | 
 # + Removed OS dependend menu creation in faggleMain -> moved to fraggleViewPort | 
| 8 | 
  | 
 # + Modules configuration dialog can be displayed by selecting Files->Modules now | 
| 9 | 
  | 
 # | 
| 10 | 
  | 
 # Revision 1.19  2004/09/05 00:21:10  xabbu | 
| 11 | 
  | 
 # +Fixed File Menu Modules item on Posix system. Gotta do testing on Windows with it. | 
| 12 | 
  | 
 # | 
| 13 | 
  | 
 # Revision 1.18  2004/09/04 20:26:01  xabbu | 
| 14 | 
  | 
 # +Added a button to the Preferences tab for showing the Modules Dialog. | 
| 15 | 
  | 
 #  Todo: When the module dialog is shown, it is still being blocked by the    preferences dialog. I am not sure why but will have to look into it further. | 
| 16 | 
  | 
 # | 
| 17 | 
  | 
 # +Added modules directory | 
| 18 | 
  | 
 # | 
| 19 | 
  | 
 # Revision 1.17  2004/09/01 21:43:30  xabbu | 
| 20 | 
  | 
 # +Moved funtion getDefaultDir from FraggleCtlPreferences to FraggleEngine for more convenience | 
| 21 | 
  | 
 # +FraggleCtlModules class creation for handling content modules | 
| 22 | 
  | 
 # | 
| 23 | 
  | 
 # Revision 1.16  2004/08/30 13:06:40  joko | 
| 24 | 
  | 
 # U now gets preferences via self.engine | 
| 25 | 
  | 
 # | 
| 26 | 
  | 
 # Revision 1.15  2004/08/27 21:14:02  xabbu | 
| 27 | 
  | 
 # TopicDetails can now be closed. | 
| 28 | 
  | 
 # GUI change on Preferences Dialog in order to prepare multiple server profiles. | 
| 29 | 
  | 
 # Small bugfixes to get the new topic windows working on posix platform. | 
| 30 | 
  | 
 # | 
| 31 | 
  | 
 # Revision 1.14  2004/08/27 04:39:06  joko | 
| 32 | 
  | 
 # cleanup | 
| 33 | 
  | 
 # | 
| 34 | 
  | 
 # Revision 1.13  2004/08/27 03:25:44  joko | 
| 35 | 
  | 
 # added FraggleTaskBarMenu | 
| 36 | 
  | 
 # | 
| 37 | 
  | 
 # Revision 1.12  2004/08/27 00:05:22  joko | 
| 38 | 
  | 
 # fix for icon-path and wxTaskBarIcon-events | 
| 39 | 
  | 
 # | 
| 40 | 
  | 
 # Revision 1.11  2004/08/26 23:10:12  xabbu | 
| 41 | 
  | 
 # xmlrpc class added | 
| 42 | 
  | 
 # | 
| 43 | 
  | 
 # Revision 1.10  2004/08/26 18:19:27  joko | 
| 44 | 
  | 
 # now using FraggleTopicFrame | 
| 45 | 
  | 
 # | 
| 46 | 
  | 
 # Revision 1.9  2004/08/26 15:21:13  joko | 
| 47 | 
  | 
 # renamed namespaces | 
| 48 | 
  | 
 # added key shortcuts to menu-items | 
| 49 | 
  | 
 # correct "showAbout" code | 
| 50 | 
  | 
 # | 
| 51 | 
  | 
  | 
| 52 | 
 import os | 
 import os | 
| 53 | 
 from wxPython.wx import * | 
 from wxPython.wx import * | 
| 54 | 
  | 
 from wxPython.stc import * | 
| 55 | 
  | 
  | 
| 56 | 
  | 
 from fraggleConstants import * | 
| 57 | 
 import fraggleDialogPrefs | 
 import fraggleDialogPrefs | 
| 58 | 
 import fraggleCtlPreferences | 
 import FraggleDialogModules | 
| 59 | 
 from fraggleDialogs import * | 
 import FraggleAboutDialog | 
| 60 | 
  | 
 import FraggleTopicFrame | 
| 61 | 
  | 
 import FraggleXMLRPC | 
| 62 | 
  | 
  | 
| 63 | 
 def create(parent): | 
 def create(parent): | 
| 64 | 
     return fraggleMainWin(parent) | 
     return fraggleViewport(parent) | 
| 65 | 
  | 
  | 
| 66 | 
 [wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1)) | 
 [wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1)) | 
| 67 | 
  | 
  | 
| 68 | 
 [wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1,  | 
 [wxID_FRAGGLEVIEWPORTMENU1FMODULES, wxID_FRAGGLEVIEWPORTMENU1FPREFS,  | 
| 69 | 
 ] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) | 
  wxID_FRAGGLEVIEWPORTMENU1ITEMS1,  | 
| 70 | 
  | 
 ] = map(lambda _init_coll_menu1_Items: wxNewId(), range(3)) | 
| 71 | 
  | 
  | 
| 72 | 
  | 
 [wxID_FRAGGLEVIEWPORTMENU2ABOUT, wxID_FRAGGLEVIEWPORTMENU2CONT,  | 
| 73 | 
  | 
 ] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2)) | 
| 74 | 
  | 
  | 
| 75 | 
 [wxID_FRAGGLEVIEWPORTMENU2CONT, wxID_FRAGGLEVIEWPORTMENU2ABOUT,  | 
 [wxID_FRAGGLEVIEWPORTMENU2ABOUT, wxID_FRAGGLEVIEWPORTMENU2CONT,  | 
| 76 | 
 ] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2)) | 
 ] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2)) | 
| 77 | 
  | 
  | 
| 78 | 
  | 
 [wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT,  | 
| 79 | 
  | 
  wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE,  | 
| 80 | 
  | 
  wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSSYNC,  | 
| 81 | 
  | 
 ] = map(lambda _init_coll_FraggleTaskBarMenu_Items: wxNewId(), range(3)) | 
| 82 | 
  | 
  | 
| 83 | 
 class fraggleViewport(wxMDIParentFrame): | 
 class fraggleViewport(wxMDIParentFrame): | 
| 84 | 
     def _init_coll_menu1_Items(self, parent): | 
     def _init_coll_FraggleTaskBarMenu_Items(self, parent): | 
| 85 | 
         # generated method, don't edit | 
         # generated method, don't edit | 
 | 
          | 
  | 
 | 
         parent.Append(helpString='Configure Netfraggle', | 
  | 
 | 
               id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences', | 
  | 
 | 
               kind=wxITEM_NORMAL) | 
  | 
 | 
         parent.Append(helpString='Exit Netfraggle', | 
  | 
 | 
               id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit', | 
  | 
 | 
               kind=wxITEM_NORMAL) | 
  | 
| 86 | 
  | 
  | 
| 87 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) | 
         parent.Append(helpString='Restore', | 
| 88 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) | 
               id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, | 
| 89 | 
  | 
               item='Restore', kind=wxITEM_NORMAL) | 
| 90 | 
  | 
         parent.Append(helpString='Sync enabled', | 
| 91 | 
  | 
               id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSSYNC, | 
| 92 | 
  | 
               item='Sync enabled', kind=wxITEM_CHECK) | 
| 93 | 
  | 
         parent.Append(helpString='Exit', | 
| 94 | 
  | 
               id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit', | 
| 95 | 
  | 
               kind=wxITEM_NORMAL) | 
| 96 | 
  | 
  | 
| 97 | 
     def _init_coll_menu2_Items(self, parent): | 
     def _init_coll_menu2_Items(self, parent): | 
| 98 | 
         # generated method, don't edit | 
         # generated method, don't edit | 
| 99 | 
  | 
  | 
| 100 | 
         parent.Append(helpString='Documentation', | 
         parent.Append(helpString='Contents', id=wxID_FRAGGLEVIEWPORTMENU2CONT, | 
| 101 | 
               id=wxID_FRAGGLEVIEWPORTMENU2CONT, item='Contents', | 
               item='Contents', kind=wxITEM_NORMAL) | 
| 102 | 
  | 
         parent.Append(helpString='About', id=wxID_FRAGGLEVIEWPORTMENU2ABOUT, | 
| 103 | 
  | 
               item='About', kind=wxITEM_NORMAL) | 
| 104 | 
  | 
  | 
| 105 | 
  | 
     def _init_coll_menu1_Items(self, parent): | 
| 106 | 
  | 
         # generated method, don't edit | 
| 107 | 
  | 
  | 
| 108 | 
  | 
         parent.Append(helpString='Configure Modules', | 
| 109 | 
  | 
               id=wxID_FRAGGLEVIEWPORTMENU1FMODULES, item='Modules', | 
| 110 | 
               kind=wxITEM_NORMAL) | 
               kind=wxITEM_NORMAL) | 
| 111 | 
         parent.Append(helpString='About Netfraggle', | 
         parent.Append(helpString='Configure Netfraggle', | 
| 112 | 
               id=wxID_FRAGGLEVIEWPORTMENU2ABOUT, item='About', | 
               id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences', | 
| 113 | 
               kind=wxITEM_NORMAL) | 
               kind=wxITEM_NORMAL) | 
| 114 | 
              | 
         parent.Append(helpString='Exit Netfraggle', | 
| 115 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) | 
               id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit', | 
| 116 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) | 
               kind=wxITEM_NORMAL) | 
| 117 | 
  | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FMODULES, | 
| 118 | 
  | 
               self.OnMenu1FmodulesMenu) | 
| 119 | 
  | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1FprefsMenu) | 
| 120 | 
  | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1Items1Menu) | 
| 121 | 
  | 
  | 
| 122 | 
     def _init_coll_menuBar1_Menus(self, parent): | 
     def _init_coll_menuBar1_Menus(self, parent): | 
| 123 | 
         # generated method, don't edit | 
         # generated method, don't edit | 
| 124 | 
  | 
  | 
| 125 | 
         parent.Append(menu=self.menu1, title='File') | 
         parent.Append(menu=self.menu1, title='&File') | 
| 126 | 
         parent.Append(menu=self.menu2, title='Help') | 
         parent.Append(menu=self.menu2, title='&Help') | 
| 127 | 
  | 
  | 
| 128 | 
     def _init_utils(self): | 
     def _init_utils(self): | 
| 129 | 
         # generated method, don't edit | 
         # generated method, don't edit | 
| 130 | 
         self.menuBar1 = wxMenuBar() | 
         self.menuBar1 = wxMenuBar() | 
| 131 | 
         self.menuBar1.SetAutoLayout(1) | 
         self.menuBar1.SetAutoLayout(0) | 
| 132 | 
  | 
  | 
| 133 | 
         self.menu1 = wxMenu(title='') | 
         self.menu1 = wxMenu(title='') | 
 | 
         self._init_coll_menu1_Items(self.menu1) | 
  | 
| 134 | 
  | 
  | 
| 135 | 
         self.menu2 = wxMenu(title='') | 
         self.menu2 = wxMenu(title='') | 
| 136 | 
         self._init_coll_menu2_Items(self.menu2) | 
  | 
| 137 | 
  | 
         self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') | 
| 138 | 
  | 
  | 
| 139 | 
         self._init_coll_menuBar1_Menus(self.menuBar1) | 
         self._init_coll_menuBar1_Menus(self.menuBar1) | 
| 140 | 
  | 
         self._init_coll_menu1_Items(self.menu1) | 
| 141 | 
  | 
         self._init_coll_menu2_Items(self.menu2) | 
| 142 | 
  | 
         self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu) | 
| 143 | 
  | 
  | 
| 144 | 
     def _init_ctrls(self, prnt): | 
     def _init_ctrls(self, prnt): | 
| 145 | 
         # generated method, don't edit | 
         # generated method, don't edit | 
| 146 | 
         wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, | 
         wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, | 
| 147 | 
               name='fraggleViewport', parent=prnt, pos=wxPoint(277, 313), | 
               name='fraggleViewport', parent=prnt, pos=wxPoint(335, 382), | 
| 148 | 
               size=wxSize(683, 307), | 
               size=wxSize(435, 250), | 
| 149 | 
               style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, | 
               style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, | 
| 150 | 
               title='wxMDIParentFrame1') | 
               title='NetFraggle 0.0.1') | 
| 151 | 
         self._init_utils() | 
         self._init_utils() | 
| 152 | 
         self.SetClientSize(wxSize(683, 284)) | 
         self.SetClientSize(wxSize(427, 223)) | 
| 153 | 
         self.SetMenuBar(self.menuBar1) | 
         self.SetMenuBar(self.menuBar1) | 
| 154 | 
  | 
  | 
| 155 | 
  | 
     def __init_modules__(self): | 
| 156 | 
  | 
         self.modulesCtl = self.engine.modules | 
| 157 | 
  | 
         self.dialogModules = FraggleDialogModules.create(self) | 
| 158 | 
  | 
          | 
| 159 | 
     def __init_preferences__(self): | 
     def __init_preferences__(self): | 
| 160 | 
         self.preferencesCtl = fraggleCtlPreferences.create(self) | 
         self.preferencesCtl = self.engine.preferences | 
| 161 | 
         self.dialogPrefs = fraggleDialogPrefs.create(self) | 
         self.dialogPrefs = fraggleDialogPrefs.create(self) | 
| 162 | 
         self.dialogPrefs.loadConfig() | 
         self.dialogPrefs.loadConfig() | 
| 163 | 
         self.dialogPrefs.updateConfig() | 
         self.dialogPrefs.updateConfig() | 
| 164 | 
  | 
  | 
| 165 | 
  | 
         # new as of 2004-08-26: TopicFrame | 
| 166 | 
  | 
         # new as of 2004-08-27: pass configList to TopicFrame | 
| 167 | 
  | 
         self.topicFrame = FraggleTopicFrame.create(self) | 
| 168 | 
  | 
         self.topicFrame.Move(wxPoint(5, 5)) | 
| 169 | 
  | 
          | 
| 170 | 
  | 
         #frame.Show() | 
| 171 | 
  | 
         #frame.Destroy() | 
| 172 | 
  | 
     def __init_xmlrpc__(self): | 
| 173 | 
  | 
         #self.xml_rpc = FraggleXMLRPC.create(self, self.preferencesCtl.configList) | 
| 174 | 
  | 
         pass | 
| 175 | 
          | 
          | 
| 176 | 
  | 
     def __init_taskbar_icon__(self): | 
| 177 | 
  | 
         if os.name == 'posix': | 
| 178 | 
  | 
             pass | 
| 179 | 
  | 
         elif os.name == 'nt': | 
| 180 | 
  | 
             self.tbicon = wxTaskBarIcon() | 
| 181 | 
  | 
             #icon = wxIcon('mixxx.ico', wxBITMAP_TYPE_ICO) | 
| 182 | 
  | 
             icon = wxIcon(os.path.join(APPLOCATION, 'mixxx.ico'), wxBITMAP_TYPE_ICO) | 
| 183 | 
  | 
             self.tbicon.SetIcon(icon, '') | 
| 184 | 
  | 
             EVT_TASKBAR_LEFT_DCLICK(self.tbicon, self.OnTaskBarLeftDClick) | 
| 185 | 
  | 
             EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarRightClick) | 
| 186 | 
  | 
             EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore) | 
| 187 | 
  | 
             EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit) | 
| 188 | 
  | 
              | 
| 189 | 
     def __init__(self, parent): | 
     def __init__(self, parent): | 
| 190 | 
  | 
         import __main__ | 
| 191 | 
  | 
         self.engine = __main__.engine | 
| 192 | 
         self._init_ctrls(parent) | 
         self._init_ctrls(parent) | 
| 193 | 
  | 
         self.__init_modules__() | 
| 194 | 
         self.__init_preferences__() | 
         self.__init_preferences__() | 
| 195 | 
  | 
         self.__init_taskbar_icon__() | 
| 196 | 
     def showPrefs(self, event): | 
         self.__init_xmlrpc__() | 
| 197 | 
         """Show preferences screen""" | 
          | 
| 198 | 
  | 
     def OnMenu1items0Menu(self, event): | 
| 199 | 
         try: | 
         try: | 
| 200 | 
             self.dialogPrefs.ShowModal() | 
             self.dialogPrefs.ShowModal() | 
| 201 | 
         finally: | 
         finally: | 
| 202 | 
             self.dialogPrefs.Destroy() | 
             self.dialogPrefs.Hide() | 
| 203 | 
         #event.Skip() | 
         event.Skip() | 
 | 
          | 
  | 
 | 
     def showHelp(self): | 
  | 
 | 
         """Show help""" | 
  | 
 | 
         try: | 
  | 
 | 
             import webbrowser | 
  | 
 | 
             webbrowser.open("file://"+os.path.join(PEARSLOCATION, "docs/index.html"), 1) | 
  | 
 | 
         except: | 
  | 
 | 
             dlg = wxScrolledMessageDialog(parent=self,  | 
  | 
 | 
                     caption="Help", | 
  | 
 | 
                     msg="""PEARS - alternative help (see the docs directory in your Pears folder for more elaborate information) | 
  | 
 | 
                      | 
  | 
 | 
     Pears is a relatively simple three-pane news feed aggregator (RSS/RDF reader). | 
  | 
 | 
          | 
  | 
 | 
     The left pane contains the list of feeds. You can add feeds using the Feeds menu. Right-click on a feed to update, single-click to view cached contents. | 
  | 
 | 
          | 
  | 
 | 
     The right pane contains a list of the topics available in the feed. Single-click to open the contents of a topic in the viewer window at the bottom. Right-click to toggle read/unread status. | 
  | 
 | 
          | 
  | 
 | 
     Everything is cached in Python structures stored as plain text in your Home directory (in a subdirectory called '.pears'). Use the About screen to see exactly where that is on your system. | 
  | 
 | 
     """) | 
  | 
 | 
             dlg.ShowModal() | 
  | 
 | 
             dlg.Destroy() | 
  | 
 | 
          | 
  | 
 | 
     def showAbout(self): | 
  | 
 | 
         """Show about screen""" | 
  | 
 | 
         dlg = AboutDialog(parent=self, id=-1, title="About Pears") | 
  | 
 | 
         dlg.ShowModal() | 
  | 
 | 
         dlg.Destroy() | 
  | 
 | 
          | 
  | 
 | 
     def doExit(self): | 
  | 
 | 
         """Shut down the program""" | 
  | 
 | 
         self.Close(True) | 
  | 
 | 
         self.Destroy() | 
  | 
 | 
          | 
  | 
 | 
     def OnMenu1items0Menu(self, event): | 
  | 
 | 
         self.showPrefs(event) | 
  | 
 | 
         #event.Skip() | 
  | 
| 204 | 
  | 
  | 
| 205 | 
     def OnMenu1items1Menu(self, event): | 
     def OnMenu1items1Menu(self, event): | 
| 206 | 
         self.doExit() | 
         self.Destroy() | 
| 207 | 
  | 
         event.Skip() | 
| 208 | 
  | 
  | 
 | 
     def OnMenu2items0Menu(self, event): | 
  | 
 | 
         self.showHelp() | 
  | 
| 209 | 
  | 
  | 
| 210 | 
     def OnMenu2items1Menu(self, event): | 
     #def OnMenu2items0Menu(self, event): | 
| 211 | 
         self.showAbout() | 
      #   try: | 
| 212 | 
  | 
       #      self.dialogPrefs.ShowModal() | 
| 213 | 
  | 
      #   finally: | 
| 214 | 
  | 
       #      pass | 
| 215 | 
  | 
       #  event.Skip() | 
| 216 | 
  | 
  | 
| 217 | 
 class fraggleMainWin(fraggleViewport): | 
     def OnMenu2items1Menu(self, event): | 
| 218 | 
     def _init_coll_menu1_Items(self, parent): | 
         """Show about screen""" | 
| 219 | 
  | 
         dlg = FraggleAboutDialog.create(self) | 
| 220 | 
  | 
         dlg.ShowModal() | 
| 221 | 
  | 
         dlg.Destroy() | 
| 222 | 
  | 
  | 
| 223 | 
         if os.name == 'posix': | 
     def OnTaskBarLeftDClick(self, event): | 
| 224 | 
             super(fraggleMainWin, self)._init_coll_menu1_Items(parent) | 
         #event.Skip() | 
| 225 | 
         elif os.name == 'nt': | 
         #self.SetFocus() | 
| 226 | 
             parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, 'Configure Netfraggle', "", wxITEM_NORMAL) | 
         if self.IsIconized(): | 
| 227 | 
             parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, 'Exit Netfraggle', "", wxITEM_NORMAL) | 
             self.Restore() | 
| 228 | 
  | 
         else: | 
| 229 | 
  | 
             self.Iconize() | 
| 230 | 
  | 
          | 
| 231 | 
  | 
     def OnTaskBarRightClick(self, event): | 
| 232 | 
  | 
         #event.Skip() | 
| 233 | 
  | 
         self.tbicon.PopupMenu(self.FraggleTaskBarMenu) | 
| 234 | 
  | 
          | 
| 235 | 
  | 
     def OnTaskBarAppRestore(self, event): | 
| 236 | 
  | 
         self.Restore() | 
| 237 | 
  | 
         #event.Skip() | 
| 238 | 
  | 
  | 
| 239 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) | 
     def OnTaskBarAppExit(self, event): | 
| 240 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) | 
         #event.Skip() | 
| 241 | 
  | 
         #self.Destroy() | 
| 242 | 
  | 
         self.Close(True) | 
| 243 | 
  | 
  | 
| 244 | 
     def _init_coll_menu2_Items(self, parent): | 
     def OnMenu1FmodulesMenu(self, event): | 
| 245 | 
  | 
         self.dialogModules.Show() | 
| 246 | 
  | 
         event.Skip() | 
| 247 | 
  | 
  | 
| 248 | 
         if os.name == 'posix': | 
     def OnMenu1FprefsMenu(self, event): | 
| 249 | 
             super(fraggleMainWin, self)._init_coll_menu2_Items(parent) | 
         try: | 
| 250 | 
         elif os.name == 'nt': | 
          self.dialogPrefs.ShowModal() | 
| 251 | 
             parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, 'Contents', "", wxITEM_NORMAL) | 
         finally: | 
| 252 | 
             parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, 'About', "", wxITEM_NORMAL) | 
           pass | 
| 253 | 
              | 
         event.Skip() | 
 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) | 
  | 
 | 
         EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) | 
  | 
| 254 | 
  | 
  | 
| 255 | 
  | 
     def OnMenu1Items1Menu(self, event): | 
| 256 | 
  | 
         self.Destroy() | 
| 257 | 
  | 
         event.Skip() | 
| 258 | 
  | 
          |