/[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.4 - (show annotations)
Thu Aug 26 15:19:26 2004 UTC (19 years, 10 months ago) by joko
Branch: MAIN
Changes since 1.3: +7 -9 lines
File MIME type: text/x-python
get rid of urlOpener here
added key shortcuts to menu-items

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()

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