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 |
# Revision 1.17 2004/09/01 21:43:30 xabbu |
12 |
# +Moved funtion getDefaultDir from FraggleCtlPreferences to FraggleEngine for more convenience |
# +Moved funtion getDefaultDir from FraggleCtlPreferences to FraggleEngine for more convenience |
13 |
# +FraggleCtlModules class creation for handling content modules |
# +FraggleCtlModules class creation for handling content modules |
47 |
|
|
48 |
from fraggleConstants import * |
from fraggleConstants import * |
49 |
import fraggleDialogPrefs |
import fraggleDialogPrefs |
50 |
|
import FraggleDialogModules |
51 |
import FraggleAboutDialog |
import FraggleAboutDialog |
52 |
import FraggleTopicFrame |
import FraggleTopicFrame |
53 |
import FraggleXMLRPC |
import FraggleXMLRPC |
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)) |
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 |
123 |
self.menuBar1.SetAutoLayout(1) |
self.menuBar1.SetAutoLayout(1) |
124 |
|
|
125 |
self.menu1 = wxMenu(title='') |
self.menu1 = wxMenu(title='') |
|
self._init_coll_menu1_Items(self.menu1) |
|
126 |
|
|
127 |
self.menu2 = wxMenu(title='') |
self.menu2 = wxMenu(title='') |
|
self._init_coll_menu2_Items(self.menu2) |
|
128 |
|
|
129 |
self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') |
self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') |
|
self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu) |
|
130 |
|
|
131 |
self._init_coll_menuBar1_Menus(self.menuBar1) |
self._init_coll_menuBar1_Menus(self.menuBar1) |
132 |
|
self._init_coll_menu1_Items(self.menu1) |
133 |
|
self._init_coll_menu2_Items(self.menu2) |
134 |
|
self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu) |
135 |
|
|
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(335, 382), |
name='fraggleViewport', parent=prnt, pos=wxPoint(335, 382), |
140 |
size=wxSize(427, 269), |
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() |
182 |
import __main__ |
import __main__ |
183 |
self.engine = __main__.engine |
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__() |
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 |
|
|