2 |
|
|
3 |
# $Id$ |
# $Id$ |
4 |
# $Log$ |
# $Log$ |
5 |
|
# Revision 1.16 2004/08/30 13:06:40 joko |
6 |
|
# U now gets preferences via self.engine |
7 |
|
# |
8 |
|
# Revision 1.15 2004/08/27 21:14:02 xabbu |
9 |
|
# TopicDetails can now be closed. |
10 |
|
# GUI change on Preferences Dialog in order to prepare multiple server profiles. |
11 |
|
# Small bugfixes to get the new topic windows working on posix platform. |
12 |
|
# |
13 |
|
# Revision 1.14 2004/08/27 04:39:06 joko |
14 |
|
# cleanup |
15 |
|
# |
16 |
# Revision 1.13 2004/08/27 03:25:44 joko |
# Revision 1.13 2004/08/27 03:25:44 joko |
17 |
# added FraggleTaskBarMenu |
# added FraggleTaskBarMenu |
18 |
# |
# |
37 |
|
|
38 |
from fraggleConstants import * |
from fraggleConstants import * |
39 |
import fraggleDialogPrefs |
import fraggleDialogPrefs |
|
import fraggleCtlPreferences |
|
40 |
import FraggleAboutDialog |
import FraggleAboutDialog |
41 |
import FraggleTopicFrame |
import FraggleTopicFrame |
42 |
import FraggleXMLRPC |
import FraggleXMLRPC |
64 |
def _init_coll_FraggleTaskBarMenu_Items(self, parent): |
def _init_coll_FraggleTaskBarMenu_Items(self, parent): |
65 |
# generated method, don't edit |
# generated method, don't edit |
66 |
|
|
67 |
restore = parent.Append(helpString='Restore', |
parent.Append(helpString='Restore', |
68 |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, |
69 |
item='Restore', kind=wxITEM_NORMAL) |
item='Restore', kind=wxITEM_NORMAL) |
70 |
parent.Append(helpString='Sync enabled', |
parent.Append(helpString='Sync enabled', |
73 |
parent.Append(helpString='Exit', |
parent.Append(helpString='Exit', |
74 |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit', |
id=wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, item='Exit', |
75 |
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) |
|
76 |
|
|
77 |
def _init_coll_menu2_Items(self, parent): |
def _init_coll_menu2_Items(self, parent): |
78 |
# generated method, don't edit |
# generated method, don't edit |
104 |
self.menuBar1.SetAutoLayout(1) |
self.menuBar1.SetAutoLayout(1) |
105 |
|
|
106 |
self.menu1 = wxMenu(title='') |
self.menu1 = wxMenu(title='') |
107 |
|
self._init_coll_menu1_Items(self.menu1) |
108 |
|
|
109 |
self.menu2 = wxMenu(title='') |
self.menu2 = wxMenu(title='') |
110 |
|
self._init_coll_menu2_Items(self.menu2) |
111 |
|
|
112 |
self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') |
self.FraggleTaskBarMenu = wxMenu(title=u'NetFraggle') |
113 |
|
self._init_coll_FraggleTaskBarMenu_Items(self.FraggleTaskBarMenu) |
114 |
|
|
115 |
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) |
|
116 |
|
|
117 |
def _init_ctrls(self, prnt): |
def _init_ctrls(self, prnt): |
118 |
# generated method, don't edit |
# generated method, don't edit |
119 |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
120 |
name='fraggleViewport', parent=prnt, pos=wxPoint(338, 296), |
name='fraggleViewport', parent=prnt, pos=wxPoint(335, 382), |
121 |
size=wxSize(435, 296), |
size=wxSize(427, 269), |
122 |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
123 |
title='NetFraggle 0.0.1') |
title='NetFraggle 0.0.1') |
124 |
self._init_utils() |
self._init_utils() |
125 |
self.SetClientSize(wxSize(427, 269)) |
self.SetClientSize(wxSize(427, 246)) |
126 |
self.SetMenuBar(self.menuBar1) |
self.SetMenuBar(self.menuBar1) |
127 |
|
|
128 |
def __init_preferences__(self): |
def __init_preferences__(self): |
129 |
self.preferencesCtl = fraggleCtlPreferences.create(self) |
self.preferencesCtl = self.engine.preferences |
130 |
self.dialogPrefs = fraggleDialogPrefs.create(self) |
self.dialogPrefs = fraggleDialogPrefs.create(self) |
131 |
self.dialogPrefs.loadConfig() |
self.dialogPrefs.loadConfig() |
132 |
self.dialogPrefs.updateConfig() |
self.dialogPrefs.updateConfig() |
133 |
|
|
134 |
# new as of 2004-08-26: TopicFrame |
# new as of 2004-08-26: TopicFrame |
135 |
# new as of 2004-08-27: pass configList to TopicFrame |
# new as of 2004-08-27: pass configList to TopicFrame |
136 |
self.topicFrame = FraggleTopicFrame.create(self, self.preferencesCtl.configList) |
self.topicFrame = FraggleTopicFrame.create(self) |
137 |
self.topicFrame.Move(wxPoint(10, 10)) |
self.topicFrame.Move(wxPoint(5, 5)) |
138 |
|
|
139 |
#frame.Show() |
#frame.Show() |
140 |
#frame.Destroy() |
#frame.Destroy() |
155 |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore) |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSRESTORE, self.OnTaskBarAppRestore) |
156 |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit) |
EVT_MENU(self.tbicon, wxID_FRAGGLEVIEWPORTFRAGGLETASKBARMENUITEMSEXIT, self.OnTaskBarAppExit) |
157 |
|
|
|
#EVT_BUTTON(self.updateButton, wxID_FRAGGLETOPICFRAMEUPDATEBUTTON, |
|
|
# self.OnUpdateButtonButton) |
|
|
|
|
158 |
def __init__(self, parent): |
def __init__(self, parent): |
159 |
|
import __main__ |
160 |
|
self.engine = __main__.engine |
161 |
self._init_ctrls(parent) |
self._init_ctrls(parent) |
162 |
self.__init_preferences__() |
self.__init_preferences__() |
163 |
self.__init_taskbar_icon__() |
self.__init_taskbar_icon__() |