--- nfo/projects/netfraggle/bin/fraggleMain.py 2004/08/25 23:47:07 1.3 +++ nfo/projects/netfraggle/bin/fraggleMain.py 2004/08/27 03:22:30 1.5 @@ -1,10 +1,21 @@ #!/usr/bin/env python #Boa:App:BoaApp -import os +# $Id: fraggleMain.py,v 1.5 2004/08/27 03:22:30 joko Exp $ +# $Log: fraggleMain.py,v $ +# Revision 1.5 2004/08/27 03:22:30 joko +# start singleton instance of FraggleEngine here +# +# Revision 1.4 2004/08/26 15:19:26 joko +# get rid of urlOpener here +# added key shortcuts to menu-items +# + +import sys, os from wxPython.wx import * -import fraggleEngine +from fraggleConstants import * +from fraggleEngine import * from fraggleViewport import * modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], @@ -25,8 +36,8 @@ if os.name == 'posix': fraggleViewport._init_coll_menu1_Items(self, parent) elif os.name == 'nt': - parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, 'Configure Netfraggle', "", wxITEM_NORMAL) - parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, 'Exit Netfraggle', "", wxITEM_NORMAL) + parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Configure Netfraggle', "", wxITEM_NORMAL) + parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "", wxITEM_NORMAL) EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) @@ -36,17 +47,16 @@ if os.name == 'posix': fraggleViewport._init_coll_menu2_Items(self, parent) elif os.name == 'nt': - parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, 'Contents', "", wxITEM_NORMAL) - parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, 'About', "", wxITEM_NORMAL) + parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, '&Contents', "", wxITEM_NORMAL) + parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, '&About', "", wxITEM_NORMAL) EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) - def main(): - #global url - #url = urlOpener() # MUST start before the gui - urlOpener = fraggleEngine.urlOpener() + sys.path.append(os.path.join(APPLOCATION, '..', 'libs')) + global engine + engine = FraggleEngine() application = BoaApp(0) application.MainLoop()