| 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.7 2004/08/30 13:55:12 joko |
| 7 |
|
# + caching phpsessionid here |
| 8 |
|
# |
| 9 |
|
# Revision 1.6 2004/08/30 13:01:47 joko |
| 10 |
|
# U prepend "libs"-dir to path |
| 11 |
|
# |
| 12 |
|
# Revision 1.5 2004/08/27 03:22:30 joko |
| 13 |
|
# start singleton instance of FraggleEngine here |
| 14 |
|
# |
| 15 |
|
# Revision 1.4 2004/08/26 15:19:26 joko |
| 16 |
|
# get rid of urlOpener here |
| 17 |
|
# added key shortcuts to menu-items |
| 18 |
|
# |
| 19 |
|
|
| 20 |
|
import sys, os |
| 21 |
from wxPython.wx import * |
from wxPython.wx import * |
| 22 |
|
|
| 23 |
import fraggleEngine |
from fraggleConstants import * |
| 24 |
|
from fraggleEngine import * |
| 25 |
from fraggleViewport import * |
from fraggleViewport import * |
| 26 |
|
|
| 27 |
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
| 42 |
if os.name == 'posix': |
if os.name == 'posix': |
| 43 |
fraggleViewport._init_coll_menu1_Items(self, parent) |
fraggleViewport._init_coll_menu1_Items(self, parent) |
| 44 |
elif os.name == 'nt': |
elif os.name == 'nt': |
| 45 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, 'Configure Netfraggle', "", wxITEM_NORMAL) |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Configure Netfraggle', "", wxITEM_NORMAL) |
| 46 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, 'Exit Netfraggle', "", wxITEM_NORMAL) |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "", wxITEM_NORMAL) |
| 47 |
|
|
| 48 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
| 49 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
| 53 |
if os.name == 'posix': |
if os.name == 'posix': |
| 54 |
fraggleViewport._init_coll_menu2_Items(self, parent) |
fraggleViewport._init_coll_menu2_Items(self, parent) |
| 55 |
elif os.name == 'nt': |
elif os.name == 'nt': |
| 56 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, 'Contents', "", wxITEM_NORMAL) |
parent.Append(wxID_FRAGGLEVIEWPORTMENU2CONT, '&Contents', "", wxITEM_NORMAL) |
| 57 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, 'About', "", wxITEM_NORMAL) |
parent.Append(wxID_FRAGGLEVIEWPORTMENU2ABOUT, '&About', "", wxITEM_NORMAL) |
| 58 |
|
|
| 59 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) |
| 60 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) |
| 61 |
|
|
|
|
|
| 62 |
def main(): |
def main(): |
| 63 |
#global url |
global engine, phpsessionid |
| 64 |
#url = urlOpener() # MUST start before the gui |
sys.path.insert(0, os.path.join(APPLOCATION, '..', 'libs')) |
| 65 |
urlOpener = fraggleEngine.urlOpener() |
engine = FraggleEngine() |
| 66 |
|
# TODO: move elsewhere! |
| 67 |
|
phpsessionid = "" |
| 68 |
application = BoaApp(0) |
application = BoaApp(0) |
| 69 |
application.MainLoop() |
application.MainLoop() |
| 70 |
|
|