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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations)
Mon Aug 30 13:01:47 2004 UTC (20 years, 2 months ago) by joko
Branch: MAIN
Changes since 1.5: +5 -2 lines
File MIME type: text/x-python
U prepend "libs"-dir to path

1 xabbu 1.1 #!/usr/bin/env python
2     #Boa:App:BoaApp
3    
4 joko 1.6 # $Id: fraggleMain.py,v 1.5 2004/08/27 03:22:30 joko Exp $
5 joko 1.5 # $Log: fraggleMain.py,v $
6 joko 1.6 # Revision 1.5 2004/08/27 03:22:30 joko
7     # start singleton instance of FraggleEngine here
8     #
9 joko 1.5 # Revision 1.4 2004/08/26 15:19:26 joko
10     # get rid of urlOpener here
11     # added key shortcuts to menu-items
12     #
13 joko 1.4
14 joko 1.5 import sys, os
15 xabbu 1.1 from wxPython.wx import *
16    
17 joko 1.5 from fraggleConstants import *
18     from fraggleEngine import *
19 xabbu 1.3 from fraggleViewport import *
20 xabbu 1.1
21     modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'],
22     'fraggleViewport': [1, '', 'fraggleViewport.py']}
23    
24     class BoaApp(wxApp):
25     def OnInit(self):
26     wxInitAllImageHandlers()
27 xabbu 1.3 self.main = fraggleMainWin(None)
28 xabbu 1.1 # needed when running from Boa under Windows 9X
29     self.SetTopWindow(self.main)
30     self.main.Show();self.main.Hide();self.main.Show()
31     return True
32 xabbu 1.3
33     class fraggleMainWin(fraggleViewport):
34     def _init_coll_menu1_Items(self, parent):
35    
36     if os.name == 'posix':
37     fraggleViewport._init_coll_menu1_Items(self, parent)
38     elif os.name == 'nt':
39 joko 1.4 parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Configure Netfraggle', "", wxITEM_NORMAL)
40     parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "", wxITEM_NORMAL)
41 xabbu 1.3
42     EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu)
43     EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu)
44    
45     def _init_coll_menu2_Items(self, parent):
46    
47     if os.name == 'posix':
48     fraggleViewport._init_coll_menu2_Items(self, parent)
49     elif os.name == 'nt':
50 joko 1.4 parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, '&Contents', "", wxITEM_NORMAL)
51     parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, '&About', "", wxITEM_NORMAL)
52 xabbu 1.3
53     EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu)
54     EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu)
55    
56 xabbu 1.1 def main():
57 joko 1.6 sys.path.insert(0, os.path.join(APPLOCATION, '..', 'libs'))
58 joko 1.5 global engine
59     engine = FraggleEngine()
60 xabbu 1.1 application = BoaApp(0)
61     application.MainLoop()
62    
63     if __name__ == '__main__':
64     main()

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