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