2 |
|
|
3 |
# $Id$ |
# $Id$ |
4 |
# $Log$ |
# $Log$ |
5 |
|
# Revision 1.17 2004/09/01 21:43:30 xabbu |
6 |
|
# +Moved funtion getDefaultDir from FraggleCtlPreferences to FraggleEngine for more convenience |
7 |
|
# +FraggleCtlModules class creation for handling content modules |
8 |
|
# |
9 |
|
# Revision 1.16 2004/08/30 13:06:40 joko |
10 |
|
# U now gets preferences via self.engine |
11 |
|
# |
12 |
|
# Revision 1.15 2004/08/27 21:14:02 xabbu |
13 |
|
# TopicDetails can now be closed. |
14 |
|
# GUI change on Preferences Dialog in order to prepare multiple server profiles. |
15 |
|
# Small bugfixes to get the new topic windows working on posix platform. |
16 |
|
# |
17 |
|
# Revision 1.14 2004/08/27 04:39:06 joko |
18 |
|
# cleanup |
19 |
|
# |
20 |
# Revision 1.13 2004/08/27 03:25:44 joko |
# Revision 1.13 2004/08/27 03:25:44 joko |
21 |
# added FraggleTaskBarMenu |
# added FraggleTaskBarMenu |
22 |
# |
# |
41 |
|
|
42 |
from fraggleConstants import * |
from fraggleConstants import * |
43 |
import fraggleDialogPrefs |
import fraggleDialogPrefs |
|
import fraggleCtlPreferences |
|
44 |
import FraggleAboutDialog |
import FraggleAboutDialog |
45 |
import FraggleTopicFrame |
import FraggleTopicFrame |
46 |
import FraggleXMLRPC |
import FraggleXMLRPC |
68 |
def _init_coll_FraggleTaskBarMenu_Items(self, parent): |
def _init_coll_FraggleTaskBarMenu_Items(self, parent): |
69 |
# generated method, don't edit |
# generated method, don't edit |
70 |
|
|
71 |
restore = parent.Append(helpString='Restore', |
parent.Append(helpString='Restore', |
72 |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, |
73 |
item='Restore', kind=wxITEM_NORMAL) |
item='Restore', kind=wxITEM_NORMAL) |
74 |
parent.Append(helpString='Sync enabled', |
parent.Append(helpString='Sync enabled', |
77 |
parent.Append(helpString='Exit', |
parent.Append(helpString='Exit', |
78 |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit', |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit', |
79 |
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) |
|
80 |
|
|
81 |
def _init_coll_menu2_Items(self, parent): |
def _init_coll_menu2_Items(self, parent): |
82 |
# generated method, don't edit |
# generated method, don't edit |
108 |
self.menuBar1.SetAutoLayout(1) |
self.menuBar1.SetAutoLayout(1) |
109 |
|
|
110 |
self.menu1 = wxMenu(title='') |
self.menu1 = wxMenu(title='') |
111 |
|
self._init_coll_menu1_Items(self.menu1) |
112 |
|
|
113 |
self.menu2 = wxMenu(title='') |
self.menu2 = wxMenu(title='') |
114 |
|
self._init_coll_menu2_Items(self.menu2) |
115 |
|
|
116 |
self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') |
self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') |
117 |
|
self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu) |
118 |
|
|
119 |
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) |
|
120 |
|
|
121 |
def _init_ctrls(self, prnt): |
def _init_ctrls(self, prnt): |
122 |
# generated method, don't edit |
# generated method, don't edit |
123 |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
124 |
name='fraggleViewport', parent=prnt, pos=wxPoint(338, 296), |
name='fraggleViewport', parent=prnt, pos=wxPoint(335, 382), |
125 |
size=wxSize(435, 296), |
size=wxSize(427, 269), |
126 |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
127 |
title='NetFraggle 0.0.1') |
title='NetFraggle 0.0.1') |
128 |
self._init_utils() |
self._init_utils() |
129 |
self.SetClientSize(wxSize(427, 269)) |
self.SetClientSize(wxSize(427, 246)) |
130 |
self.SetMenuBar(self.menuBar1) |
self.SetMenuBar(self.menuBar1) |
131 |
|
|
132 |
|
def __init_modules__(self): |
133 |
|
self.modulesCtl = self.engine.modules |
134 |
|
self.dialogModules = FraggleDialogModules.create(self) |
135 |
|
|
136 |
def __init_preferences__(self): |
def __init_preferences__(self): |
137 |
self.preferencesCtl = fraggleCtlPreferences.create(self) |
self.preferencesCtl = self.engine.preferences |
138 |
self.dialogPrefs = fraggleDialogPrefs.create(self) |
self.dialogPrefs = fraggleDialogPrefs.create(self) |
139 |
self.dialogPrefs.loadConfig() |
self.dialogPrefs.loadConfig() |
140 |
self.dialogPrefs.updateConfig() |
self.dialogPrefs.updateConfig() |
141 |
|
|
142 |
# new as of 2004-08-26: TopicFrame |
# new as of 2004-08-26: TopicFrame |
143 |
# new as of 2004-08-27: pass configList to TopicFrame |
# new as of 2004-08-27: pass configList to TopicFrame |
144 |
self.topicFrame = FraggleTopicFrame.create(self, self.preferencesCtl.configList) |
self.topicFrame = FraggleTopicFrame.create(self) |
145 |
self.topicFrame.Move(wxPoint(10, 10)) |
self.topicFrame.Move(wxPoint(5, 5)) |
146 |
|
|
147 |
#frame.Show() |
#frame.Show() |
148 |
#frame.Destroy() |
#frame.Destroy() |
163 |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore) |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore) |
164 |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit) |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit) |
165 |
|
|
|
#EVT_BUTTON(self.updateButton, wxID_FRAGGLETOPICFRAMEUPDATEBUTTON, |
|
|
# self.OnUpdateButtonButton) |
|
|
|
|
166 |
def __init__(self, parent): |
def __init__(self, parent): |
167 |
|
import __main__ |
168 |
|
self.engine = __main__.engine |
169 |
self._init_ctrls(parent) |
self._init_ctrls(parent) |
170 |
self.__init_preferences__() |
self.__init_preferences__() |
171 |
self.__init_taskbar_icon__() |
self.__init_taskbar_icon__() |