/[cvs]/nfo/projects/netfraggle/bin/fraggleViewport.py
ViewVC logotype

Diff of /nfo/projects/netfraggle/bin/fraggleViewport.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by joko, Fri Aug 27 03:25:44 2004 UTC revision 1.18 by xabbu, Sat Sep 4 20:26:01 2004 UTC
# Line 2  Line 2 
2    
3  # $Id$  # $Id$
4  # $Log$  # $Log$
5    # Revision 1.18  2004/09/04 20:26:01  xabbu
6    # +Added a button to the Preferences tab for showing the Modules Dialog.
7    #  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.
8    #
9    # +Added modules directory
10    #
11    # Revision 1.17  2004/09/01 21:43:30  xabbu
12    # +Moved funtion getDefaultDir from FraggleCtlPreferences to FraggleEngine for more convenience
13    # +FraggleCtlModules class creation for handling content modules
14    #
15    # Revision 1.16  2004/08/30 13:06:40  joko
16    # U now gets preferences via self.engine
17    #
18    # Revision 1.15  2004/08/27 21:14:02  xabbu
19    # TopicDetails can now be closed.
20    # GUI change on Preferences Dialog in order to prepare multiple server profiles.
21    # Small bugfixes to get the new topic windows working on posix platform.
22    #
23    # Revision 1.14  2004/08/27 04:39:06  joko
24    # cleanup
25    #
26  # Revision 1.13  2004/08/27 03:25:44  joko  # Revision 1.13  2004/08/27 03:25:44  joko
27  # added FraggleTaskBarMenu  # added FraggleTaskBarMenu
28  #  #
# Line 26  from wxPython.stc import * Line 47  from wxPython.stc import *
47    
48  from fraggleConstants import *  from fraggleConstants import *
49  import fraggleDialogPrefs  import fraggleDialogPrefs
50  import fraggleCtlPreferences  import FraggleDialogModules
51  import FraggleAboutDialog  import FraggleAboutDialog
52  import FraggleTopicFrame  import FraggleTopicFrame
53  import FraggleXMLRPC  import FraggleXMLRPC
# Line 36  def create(parent): Line 57  def create(parent):
57    
58  [wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1))  [wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1))
59    
60  [wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1,  [wxID_FRAGGLEVIEWPORTMENU1FMODULES, wxID_FRAGGLEVIEWPORTMENU1FPREFS,
61  ] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2))   wxID_FRAGGLEVIEWPORTMENU1ITEMS1,
62    ] = map(lambda _init_coll_menu1_Items: wxNewId(), range(3))
63    
64  [wxID_FRAGGLEVIEWPORTMENU2ABOUT, wxID_FRAGGLEVIEWPORTMENU2CONT,  [wxID_FRAGGLEVIEWPORTMENU2ABOUT, wxID_FRAGGLEVIEWPORTMENU2CONT,
65  ] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2))  ] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2))
# Line 54  class fraggleViewport(wxMDIParentFrame): Line 76  class fraggleViewport(wxMDIParentFrame):
76      def _init_coll_FraggleTaskBarMenu_Items(self, parent):      def _init_coll_FraggleTaskBarMenu_Items(self, parent):
77          # generated method, don't edit          # generated method, don't edit
78    
79          restore = parent.Append(helpString='Restore',          parent.Append(helpString='Restore',
80                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE,                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE,
81                item='Restore', kind=wxITEM_NORMAL)                item='Restore', kind=wxITEM_NORMAL)
82          parent.Append(helpString='Sync enabled',          parent.Append(helpString='Sync enabled',
# Line 63  class fraggleViewport(wxMDIParentFrame): Line 85  class fraggleViewport(wxMDIParentFrame):
85          parent.Append(helpString='Exit',          parent.Append(helpString='Exit',
86                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit',                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit',
87                kind=wxITEM_NORMAL)                kind=wxITEM_NORMAL)
         #EVT_MENU_OPEN(restore,  
         #      self.OnFraggleTaskBarMenuItemsrestoreMenu)  
         #EVT_MENU_OPEN(restore, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE,  
         #      self.OnFraggleTaskBarMenuItemsrestoreMenu)  
         #EVT_MENU(self, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT,  
         #      self.OnFraggleTaskBarMenuItemsexitMenu)  
88    
89      def _init_coll_menu2_Items(self, parent):      def _init_coll_menu2_Items(self, parent):
90          # generated method, don't edit          # generated method, don't edit
# Line 81  class fraggleViewport(wxMDIParentFrame): Line 97  class fraggleViewport(wxMDIParentFrame):
97      def _init_coll_menu1_Items(self, parent):      def _init_coll_menu1_Items(self, parent):
98          # generated method, don't edit          # generated method, don't edit
99    
100            parent.Append(helpString='Configure Modules',
101                  id=wxID_FRAGGLEVIEWPORTMENU1FMODULES, item='Modules',
102                  kind=wxITEM_NORMAL)
103          parent.Append(helpString='Configure Netfraggle',          parent.Append(helpString='Configure Netfraggle',
104                id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences',                id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences',
105                kind=wxITEM_NORMAL)                kind=wxITEM_NORMAL)
106          parent.Append(helpString='Exit Netfraggle',          parent.Append(helpString='Exit Netfraggle',
107                id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit',                id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit',
108                kind=wxITEM_NORMAL)                kind=wxITEM_NORMAL)
109            EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FMODULES,
110                  self.OnMenu1FmodulesMenu)
111            EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1FprefsMenu)
112            EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1Items1Menu)
113    
114      def _init_coll_menuBar1_Menus(self, parent):      def _init_coll_menuBar1_Menus(self, parent):
115          # generated method, don't edit          # generated method, don't edit
# Line 113  class fraggleViewport(wxMDIParentFrame): Line 136  class fraggleViewport(wxMDIParentFrame):
136      def _init_ctrls(self, prnt):      def _init_ctrls(self, prnt):
137          # generated method, don't edit          # generated method, don't edit
138          wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT,          wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT,
139                name='fraggleViewport', parent=prnt, pos=wxPoint(338, 296),                name='fraggleViewport', parent=prnt, pos=wxPoint(335, 382),
140                size=wxSize(435, 296),                size=wxSize(435, 273),
141                style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,                style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
142                title='NetFraggle 0.0.1')                title='NetFraggle 0.0.1')
143          self._init_utils()          self._init_utils()
144          self.SetClientSize(wxSize(427, 269))          self.SetClientSize(wxSize(427, 246))
145          self.SetMenuBar(self.menuBar1)          self.SetMenuBar(self.menuBar1)
146    
147        def __init_modules__(self):
148            self.modulesCtl = self.engine.modules
149            self.dialogModules = FraggleDialogModules.create(self)
150            
151      def __init_preferences__(self):      def __init_preferences__(self):
152          self.preferencesCtl = fraggleCtlPreferences.create(self)          self.preferencesCtl = self.engine.preferences
153          self.dialogPrefs = fraggleDialogPrefs.create(self)          self.dialogPrefs = fraggleDialogPrefs.create(self)
154          self.dialogPrefs.loadConfig()          self.dialogPrefs.loadConfig()
155          self.dialogPrefs.updateConfig()          self.dialogPrefs.updateConfig()
156    
157          # new as of 2004-08-26: TopicFrame          # new as of 2004-08-26: TopicFrame
158          # new as of 2004-08-27: pass configList to TopicFrame          # new as of 2004-08-27: pass configList to TopicFrame
159          self.topicFrame = FraggleTopicFrame.create(self, self.preferencesCtl.configList)          self.topicFrame = FraggleTopicFrame.create(self)
160          self.topicFrame.Move(wxPoint(10, 10))          self.topicFrame.Move(wxPoint(5, 5))
161                    
162          #frame.Show()          #frame.Show()
163          #frame.Destroy()          #frame.Destroy()
# Line 151  class fraggleViewport(wxMDIParentFrame): Line 178  class fraggleViewport(wxMDIParentFrame):
178              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore)              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore)
179              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit)              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit)
180                            
         #EVT_BUTTON(self.updateButton, wxID_FRAGGLETOPICFRAMEUPDATEBUTTON,  
         #      self.OnUpdateButtonButton)  
                     
181      def __init__(self, parent):      def __init__(self, parent):
182            import __main__
183            self.engine = __main__.engine
184          self._init_ctrls(parent)          self._init_ctrls(parent)
185            self.__init_modules__()
186          self.__init_preferences__()          self.__init_preferences__()
187          self.__init_taskbar_icon__()          self.__init_taskbar_icon__()
188          self.__init_xmlrpc__()          self.__init_xmlrpc__()
# Line 205  class fraggleViewport(wxMDIParentFrame): Line 232  class fraggleViewport(wxMDIParentFrame):
232          #event.Skip()          #event.Skip()
233          #self.Destroy()          #self.Destroy()
234          self.Close(True)          self.Close(True)
235    
236        def OnMenu1FmodulesMenu(self, event):
237            event.Skip()
238    
239        def OnMenu1FprefsMenu(self, event):
240            event.Skip()
241    
242        def OnMenu1Items1Menu(self, event):
243            event.Skip()
244                    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.18

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed