| 1 |
#!/usr/bin/env python |
#!/usr/bin/env python |
| 2 |
#Boa:App:BoaApp |
#Boa:App:BoaApp |
| 3 |
|
|
| 4 |
import os |
# $Id$ |
| 5 |
|
# $Log$ |
| 6 |
|
# Revision 1.8 2004/09/05 10:09:26 xabbu |
| 7 |
|
# + Bug that menues where displayed incorrectly on nt like os resolved. |
| 8 |
|
# + Removed OS dependend menu creation in faggleMain -> moved to fraggleViewPort |
| 9 |
|
# + Modules configuration dialog can be displayed by selecting Files->Modules now |
| 10 |
|
# |
| 11 |
|
# Revision 1.7 2004/08/30 13:55:12 joko |
| 12 |
|
# + caching phpsessionid here |
| 13 |
|
# |
| 14 |
|
# Revision 1.6 2004/08/30 13:01:47 joko |
| 15 |
|
# U prepend "libs"-dir to path |
| 16 |
|
# |
| 17 |
|
# Revision 1.5 2004/08/27 03:22:30 joko |
| 18 |
|
# start singleton instance of FraggleEngine here |
| 19 |
|
# |
| 20 |
|
# Revision 1.4 2004/08/26 15:19:26 joko |
| 21 |
|
# get rid of urlOpener here |
| 22 |
|
# added key shortcuts to menu-items |
| 23 |
|
# |
| 24 |
|
|
| 25 |
|
import sys, os |
| 26 |
from wxPython.wx import * |
from wxPython.wx import * |
| 27 |
|
|
| 28 |
import fraggleEngine |
from fraggleConstants import * |
| 29 |
|
from fraggleEngine import * |
| 30 |
from fraggleViewport import * |
from fraggleViewport import * |
| 31 |
|
|
| 32 |
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
| 44 |
class fraggleMainWin(fraggleViewport): |
class fraggleMainWin(fraggleViewport): |
| 45 |
def _init_coll_menu1_Items(self, parent): |
def _init_coll_menu1_Items(self, parent): |
| 46 |
|
|
| 47 |
if os.name == 'posix': |
|
| 48 |
fraggleViewport._init_coll_menu1_Items(self, parent) |
fraggleViewport._init_coll_menu1_Items(self, parent) |
| 49 |
elif os.name == 'nt': |
|
|
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) |
|
| 50 |
|
|
| 51 |
def _init_coll_menu2_Items(self, parent): |
def _init_coll_menu2_Items(self, parent): |
| 52 |
|
|
| 53 |
if os.name == 'posix': |
|
| 54 |
fraggleViewport._init_coll_menu2_Items(self, parent) |
fraggleViewport._init_coll_menu2_Items(self, parent) |
| 55 |
elif os.name == 'nt': |
|
|
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) |
|
|
|
|
| 56 |
|
|
| 57 |
def main(): |
def main(): |
| 58 |
#global url |
global engine, phpsessionid |
| 59 |
#url = urlOpener() # MUST start before the gui |
sys.path.insert(0, os.path.join(APPLOCATION, '..', 'libs')) |
| 60 |
urlOpener = fraggleEngine.urlOpener() |
engine = FraggleEngine() |
| 61 |
|
# TODO: move elsewhere! |
| 62 |
|
phpsessionid = "" |
| 63 |
application = BoaApp(0) |
application = BoaApp(0) |
| 64 |
application.MainLoop() |
application.MainLoop() |
| 65 |
|
|