1 |
#!/usr/bin/env python |
2 |
#Boa:App:BoaApp |
3 |
|
4 |
# $Id$ |
5 |
# $Log$ |
6 |
|
7 |
import os |
8 |
from wxPython.wx import * |
9 |
|
10 |
from fraggleViewport import * |
11 |
|
12 |
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
13 |
'fraggleViewport': [1, '', 'fraggleViewport.py']} |
14 |
|
15 |
class BoaApp(wxApp): |
16 |
def OnInit(self): |
17 |
wxInitAllImageHandlers() |
18 |
self.main = fraggleMainWin(None) |
19 |
# 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 |
|
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 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Configure Netfraggle', "", wxITEM_NORMAL) |
31 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "", wxITEM_NORMAL) |
32 |
|
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 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, '&Contents', "", wxITEM_NORMAL) |
42 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, '&About', "", wxITEM_NORMAL) |
43 |
|
44 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) |
45 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) |
46 |
|
47 |
def main(): |
48 |
application = BoaApp(0) |
49 |
application.MainLoop() |
50 |
|
51 |
if __name__ == '__main__': |
52 |
main() |