--- nfo/projects/netfraggle/bin/fraggleViewport.py 2004/08/27 03:25:44 1.13 +++ nfo/projects/netfraggle/bin/fraggleViewport.py 2004/08/30 13:06:40 1.16 @@ -1,7 +1,18 @@ #Boa:MDIParent:fraggleViewport -# $Id: fraggleViewport.py,v 1.13 2004/08/27 03:25:44 joko Exp $ +# $Id: fraggleViewport.py,v 1.16 2004/08/30 13:06:40 joko Exp $ # $Log: fraggleViewport.py,v $ +# Revision 1.16 2004/08/30 13:06:40 joko +# U now gets preferences via self.engine +# +# Revision 1.15 2004/08/27 21:14:02 xabbu +# TopicDetails can now be closed. +# GUI change on Preferences Dialog in order to prepare multiple server profiles. +# Small bugfixes to get the new topic windows working on posix platform. +# +# Revision 1.14 2004/08/27 04:39:06 joko +# cleanup +# # Revision 1.13 2004/08/27 03:25:44 joko # added FraggleTaskBarMenu # @@ -26,7 +37,6 @@ from fraggleConstants import * import fraggleDialogPrefs -import fraggleCtlPreferences import FraggleAboutDialog import FraggleTopicFrame import FraggleXMLRPC @@ -54,7 +64,7 @@ def _init_coll_FraggleTaskBarMenu_Items(self, parent): # generated method, don't edit - restore = parent.Append(helpString='Restore', + parent.Append(helpString='Restore', id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, item='Restore', kind=wxITEM_NORMAL) parent.Append(helpString='Sync enabled', @@ -63,12 +73,6 @@ parent.Append(helpString='Exit', id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit', kind=wxITEM_NORMAL) - #EVT_MENU_OPEN(restore, - # self.OnFraggleTaskBarMenuItemsrestoreMenu) - #EVT_MENU_OPEN(restore, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, - # self.OnFraggleTaskBarMenuItemsrestoreMenu) - #EVT_MENU(self, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, - # self.OnFraggleTaskBarMenuItemsexitMenu) def _init_coll_menu2_Items(self, parent): # generated method, don't edit @@ -100,37 +104,37 @@ self.menuBar1.SetAutoLayout(1) self.menu1 = wxMenu(title='') + self._init_coll_menu1_Items(self.menu1) self.menu2 = wxMenu(title='') + self._init_coll_menu2_Items(self.menu2) self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') + self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu) self._init_coll_menuBar1_Menus(self.menuBar1) - self._init_coll_menu1_Items(self.menu1) - self._init_coll_menu2_Items(self.menu2) - self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu) def _init_ctrls(self, prnt): # generated method, don't edit wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, - name='fraggleViewport', parent=prnt, pos=wxPoint(338, 296), - size=wxSize(435, 296), + name='fraggleViewport', parent=prnt, pos=wxPoint(335, 382), + size=wxSize(427, 269), style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, title='NetFraggle 0.0.1') self._init_utils() - self.SetClientSize(wxSize(427, 269)) + self.SetClientSize(wxSize(427, 246)) self.SetMenuBar(self.menuBar1) def __init_preferences__(self): - self.preferencesCtl = fraggleCtlPreferences.create(self) + self.preferencesCtl = self.engine.preferences self.dialogPrefs = fraggleDialogPrefs.create(self) self.dialogPrefs.loadConfig() self.dialogPrefs.updateConfig() # new as of 2004-08-26: TopicFrame # new as of 2004-08-27: pass configList to TopicFrame - self.topicFrame = FraggleTopicFrame.create(self, self.preferencesCtl.configList) - self.topicFrame.Move(wxPoint(10, 10)) + self.topicFrame = FraggleTopicFrame.create(self) + self.topicFrame.Move(wxPoint(5, 5)) #frame.Show() #frame.Destroy() @@ -151,10 +155,9 @@ EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore) EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit) - #EVT_BUTTON(self.updateButton, wxID_FRAGGLETOPICFRAMEUPDATEBUTTON, - # self.OnUpdateButtonButton) - def __init__(self, parent): + import __main__ + self.engine = __main__.engine self._init_ctrls(parent) self.__init_preferences__() self.__init_taskbar_icon__()