/[cvs]/nfo/projects/netfraggle/bin/fraggleMain.py
ViewVC logotype

Contents of /nfo/projects/netfraggle/bin/fraggleMain.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Wed Aug 25 23:47:07 2004 UTC (19 years, 10 months ago) by xabbu
Branch: MAIN
Changes since 1.2: +27 -2 lines
File MIME type: text/x-python
class fraggleMainWin from fraggleViewport.py

1 #!/usr/bin/env python
2 #Boa:App:BoaApp
3
4 import os
5 from wxPython.wx import *
6
7 import fraggleEngine
8 from fraggleViewport import *
9
10 modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'],
11 'fraggleViewport': [1, '', 'fraggleViewport.py']}
12
13 class BoaApp(wxApp):
14 def OnInit(self):
15 wxInitAllImageHandlers()
16 self.main = fraggleMainWin(None)
17 # 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
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
46 def main():
47 #global url
48 #url = urlOpener() # MUST start before the gui
49 urlOpener = fraggleEngine.urlOpener()
50 application = BoaApp(0)
51 application.MainLoop()
52
53 if __name__ == '__main__':
54 main()

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed