/[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.19 by xabbu, Sun Sep 5 00:21:10 2004 UTC
# Line 2  Line 2 
2    
3  # $Id$  # $Id$
4  # $Log$  # $Log$
5    # Revision 1.19  2004/09/05 00:21:10  xabbu
6    # +Fixed File Menu Modules item on Posix system. Gotta do testing on Windows with it.
7    #
8    # Revision 1.18  2004/09/04 20:26:01  xabbu
9    # +Added a button to the Preferences tab for showing the Modules Dialog.
10    #  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.
11    #
12    # +Added modules directory
13    #
14    # Revision 1.17  2004/09/01 21:43:30  xabbu
15    # +Moved funtion getDefaultDir from FraggleCtlPreferences to FraggleEngine for more convenience
16    # +FraggleCtlModules class creation for handling content modules
17    #
18    # Revision 1.16  2004/08/30 13:06:40  joko
19    # U now gets preferences via self.engine
20    #
21    # Revision 1.15  2004/08/27 21:14:02  xabbu
22    # TopicDetails can now be closed.
23    # GUI change on Preferences Dialog in order to prepare multiple server profiles.
24    # Small bugfixes to get the new topic windows working on posix platform.
25    #
26    # Revision 1.14  2004/08/27 04:39:06  joko
27    # cleanup
28    #
29  # Revision 1.13  2004/08/27 03:25:44  joko  # Revision 1.13  2004/08/27 03:25:44  joko
30  # added FraggleTaskBarMenu  # added FraggleTaskBarMenu
31  #  #
# Line 26  from wxPython.stc import * Line 50  from wxPython.stc import *
50    
51  from fraggleConstants import *  from fraggleConstants import *
52  import fraggleDialogPrefs  import fraggleDialogPrefs
53  import fraggleCtlPreferences  import FraggleDialogModules
54  import FraggleAboutDialog  import FraggleAboutDialog
55  import FraggleTopicFrame  import FraggleTopicFrame
56  import FraggleXMLRPC  import FraggleXMLRPC
# Line 36  def create(parent): Line 60  def create(parent):
60    
61  [wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1))  [wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1))
62    
63  [wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1,  [wxID_FRAGGLEVIEWPORTMENU1FMODULES, wxID_FRAGGLEVIEWPORTMENU1FPREFS,
64  ] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2))   wxID_FRAGGLEVIEWPORTMENU1ITEMS1,
65    ] = map(lambda _init_coll_menu1_Items: wxNewId(), range(3))
66    
67  [wxID_FRAGGLEVIEWPORTMENU2ABOUT, wxID_FRAGGLEVIEWPORTMENU2CONT,  [wxID_FRAGGLEVIEWPORTMENU2ABOUT, wxID_FRAGGLEVIEWPORTMENU2CONT,
68  ] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2))  ] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2))
# Line 54  class fraggleViewport(wxMDIParentFrame): Line 79  class fraggleViewport(wxMDIParentFrame):
79      def _init_coll_FraggleTaskBarMenu_Items(self, parent):      def _init_coll_FraggleTaskBarMenu_Items(self, parent):
80          # generated method, don't edit          # generated method, don't edit
81    
82          restore = parent.Append(helpString='Restore',          parent.Append(helpString='Restore',
83                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE,                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE,
84                item='Restore', kind=wxITEM_NORMAL)                item='Restore', kind=wxITEM_NORMAL)
85          parent.Append(helpString='Sync enabled',          parent.Append(helpString='Sync enabled',
# Line 63  class fraggleViewport(wxMDIParentFrame): Line 88  class fraggleViewport(wxMDIParentFrame):
88          parent.Append(helpString='Exit',          parent.Append(helpString='Exit',
89                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit',                id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit',
90                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)  
91    
92      def _init_coll_menu2_Items(self, parent):      def _init_coll_menu2_Items(self, parent):
93          # generated method, don't edit          # generated method, don't edit
# Line 81  class fraggleViewport(wxMDIParentFrame): Line 100  class fraggleViewport(wxMDIParentFrame):
100      def _init_coll_menu1_Items(self, parent):      def _init_coll_menu1_Items(self, parent):
101          # generated method, don't edit          # generated method, don't edit
102    
103            parent.Append(helpString='Configure Modules',
104                  id=wxID_FRAGGLEVIEWPORTMENU1FMODULES, item='Modules',
105                  kind=wxITEM_NORMAL)
106          parent.Append(helpString='Configure Netfraggle',          parent.Append(helpString='Configure Netfraggle',
107                id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences',                id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences',
108                kind=wxITEM_NORMAL)                kind=wxITEM_NORMAL)
109          parent.Append(helpString='Exit Netfraggle',          parent.Append(helpString='Exit Netfraggle',
110                id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit',                id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit',
111                kind=wxITEM_NORMAL)                kind=wxITEM_NORMAL)
112            EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FMODULES,
113                  self.OnMenu1FmodulesMenu)
114            EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1FprefsMenu)
115            EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1Items1Menu)
116    
117      def _init_coll_menuBar1_Menus(self, parent):      def _init_coll_menuBar1_Menus(self, parent):
118          # generated method, don't edit          # generated method, don't edit
# Line 100  class fraggleViewport(wxMDIParentFrame): Line 126  class fraggleViewport(wxMDIParentFrame):
126          self.menuBar1.SetAutoLayout(1)          self.menuBar1.SetAutoLayout(1)
127    
128          self.menu1 = wxMenu(title='')          self.menu1 = wxMenu(title='')
129            self._init_coll_menu1_Items(self.menu1)
130    
131          self.menu2 = wxMenu(title='')          self.menu2 = wxMenu(title='')
132            self._init_coll_menu2_Items(self.menu2)
133    
134          self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle')          self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle')
135            self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu)
136    
137          self._init_coll_menuBar1_Menus(self.menuBar1)          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)  
138    
139      def _init_ctrls(self, prnt):      def _init_ctrls(self, prnt):
140          # generated method, don't edit          # generated method, don't edit
141          wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT,          wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT,
142                name='fraggleViewport', parent=prnt, pos=wxPoint(338, 296),                name='fraggleViewport', parent=prnt, pos=wxPoint(335, 382),
143                size=wxSize(435, 296),                size=wxSize(427, 246),
144                style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,                style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
145                title='NetFraggle 0.0.1')                title='NetFraggle 0.0.1')
146          self._init_utils()          self._init_utils()
147          self.SetClientSize(wxSize(427, 269))          self.SetClientSize(wxSize(427, 223))
148          self.SetMenuBar(self.menuBar1)          self.SetMenuBar(self.menuBar1)
149    
150        def __init_modules__(self):
151            self.modulesCtl = self.engine.modules
152            self.dialogModules = FraggleDialogModules.create(self)
153            
154      def __init_preferences__(self):      def __init_preferences__(self):
155          self.preferencesCtl = fraggleCtlPreferences.create(self)          self.preferencesCtl = self.engine.preferences
156          self.dialogPrefs = fraggleDialogPrefs.create(self)          self.dialogPrefs = fraggleDialogPrefs.create(self)
157          self.dialogPrefs.loadConfig()          self.dialogPrefs.loadConfig()
158          self.dialogPrefs.updateConfig()          self.dialogPrefs.updateConfig()
159    
160          # new as of 2004-08-26: TopicFrame          # new as of 2004-08-26: TopicFrame
161          # new as of 2004-08-27: pass configList to TopicFrame          # new as of 2004-08-27: pass configList to TopicFrame
162          self.topicFrame = FraggleTopicFrame.create(self, self.preferencesCtl.configList)          self.topicFrame = FraggleTopicFrame.create(self)
163          self.topicFrame.Move(wxPoint(10, 10))          self.topicFrame.Move(wxPoint(5, 5))
164                    
165          #frame.Show()          #frame.Show()
166          #frame.Destroy()          #frame.Destroy()
# Line 151  class fraggleViewport(wxMDIParentFrame): Line 181  class fraggleViewport(wxMDIParentFrame):
181              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore)              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore)
182              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit)              EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit)
183                            
         #EVT_BUTTON(self.updateButton, wxID_FRAGGLETOPICFRAMEUPDATEBUTTON,  
         #      self.OnUpdateButtonButton)  
                     
184      def __init__(self, parent):      def __init__(self, parent):
185            import __main__
186            self.engine = __main__.engine
187          self._init_ctrls(parent)          self._init_ctrls(parent)
188            self.__init_modules__()
189          self.__init_preferences__()          self.__init_preferences__()
190          self.__init_taskbar_icon__()          self.__init_taskbar_icon__()
191          self.__init_xmlrpc__()          self.__init_xmlrpc__()
# Line 205  class fraggleViewport(wxMDIParentFrame): Line 235  class fraggleViewport(wxMDIParentFrame):
235          #event.Skip()          #event.Skip()
236          #self.Destroy()          #self.Destroy()
237          self.Close(True)          self.Close(True)
238    
239        def OnMenu1FmodulesMenu(self, event):
240            self.dialogModules.Show()
241            event.Skip()
242    
243        def OnMenu1FprefsMenu(self, event):
244            event.Skip()
245    
246        def OnMenu1Items1Menu(self, event):
247            event.Skip()
248                    

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

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