/[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.5 - (hide annotations)
Fri Aug 27 03:22:30 2004 UTC (20 years, 2 months ago) by joko
Branch: MAIN
Changes since 1.4: +12 -3 lines
File MIME type: text/x-python
start singleton instance of FraggleEngine here

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

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