1 |
xabbu |
1.1 |
#!/usr/bin/env python |
2 |
|
|
#Boa:App:BoaApp |
3 |
|
|
|
4 |
joko |
1.4 |
# $Id$ |
5 |
|
|
# $Log$ |
6 |
|
|
|
7 |
xabbu |
1.3 |
import os |
8 |
xabbu |
1.1 |
from wxPython.wx import * |
9 |
|
|
|
10 |
xabbu |
1.3 |
from fraggleViewport import * |
11 |
xabbu |
1.1 |
|
12 |
|
|
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
13 |
|
|
'fraggleViewport': [1, '', 'fraggleViewport.py']} |
14 |
|
|
|
15 |
|
|
class BoaApp(wxApp): |
16 |
|
|
def OnInit(self): |
17 |
|
|
wxInitAllImageHandlers() |
18 |
xabbu |
1.3 |
self.main = fraggleMainWin(None) |
19 |
xabbu |
1.1 |
# needed when running from Boa under Windows 9X |
20 |
|
|
self.SetTopWindow(self.main) |
21 |
|
|
self.main.Show();self.main.Hide();self.main.Show() |
22 |
|
|
return True |
23 |
xabbu |
1.3 |
|
24 |
|
|
class fraggleMainWin(fraggleViewport): |
25 |
|
|
def _init_coll_menu1_Items(self, parent): |
26 |
|
|
|
27 |
|
|
if os.name == 'posix': |
28 |
|
|
fraggleViewport._init_coll_menu1_Items(self, parent) |
29 |
|
|
elif os.name == 'nt': |
30 |
joko |
1.4 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Configure Netfraggle', "", wxITEM_NORMAL) |
31 |
|
|
parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "", wxITEM_NORMAL) |
32 |
xabbu |
1.3 |
|
33 |
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
34 |
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
35 |
|
|
|
36 |
|
|
def _init_coll_menu2_Items(self, parent): |
37 |
|
|
|
38 |
|
|
if os.name == 'posix': |
39 |
|
|
fraggleViewport._init_coll_menu2_Items(self, parent) |
40 |
|
|
elif os.name == 'nt': |
41 |
joko |
1.4 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, '&Contents', "", wxITEM_NORMAL) |
42 |
|
|
parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, '&About', "", wxITEM_NORMAL) |
43 |
xabbu |
1.3 |
|
44 |
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) |
45 |
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) |
46 |
|
|
|
47 |
xabbu |
1.1 |
def main(): |
48 |
|
|
application = BoaApp(0) |
49 |
|
|
application.MainLoop() |
50 |
|
|
|
51 |
|
|
if __name__ == '__main__': |
52 |
|
|
main() |