1 |
xabbu |
1.1 |
#!/usr/bin/env python |
2 |
|
|
#Boa:App:BoaApp |
3 |
|
|
|
4 |
xabbu |
1.8 |
# $Id: fraggleMain.py,v 1.7 2004/08/30 13:55:12 joko Exp $ |
5 |
joko |
1.5 |
# $Log: fraggleMain.py,v $ |
6 |
xabbu |
1.8 |
# Revision 1.7 2004/08/30 13:55:12 joko |
7 |
|
|
# + caching phpsessionid here |
8 |
|
|
# |
9 |
joko |
1.7 |
# Revision 1.6 2004/08/30 13:01:47 joko |
10 |
|
|
# U prepend "libs"-dir to path |
11 |
|
|
# |
12 |
joko |
1.6 |
# Revision 1.5 2004/08/27 03:22:30 joko |
13 |
|
|
# start singleton instance of FraggleEngine here |
14 |
|
|
# |
15 |
joko |
1.5 |
# 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 |
joko |
1.4 |
|
20 |
joko |
1.5 |
import sys, os |
21 |
xabbu |
1.1 |
from wxPython.wx import * |
22 |
|
|
|
23 |
joko |
1.5 |
from fraggleConstants import * |
24 |
|
|
from fraggleEngine import * |
25 |
xabbu |
1.3 |
from fraggleViewport import * |
26 |
xabbu |
1.1 |
|
27 |
|
|
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
28 |
|
|
'fraggleViewport': [1, '', 'fraggleViewport.py']} |
29 |
|
|
|
30 |
|
|
class BoaApp(wxApp): |
31 |
|
|
def OnInit(self): |
32 |
|
|
wxInitAllImageHandlers() |
33 |
xabbu |
1.3 |
self.main = fraggleMainWin(None) |
34 |
xabbu |
1.1 |
# needed when running from Boa under Windows 9X |
35 |
|
|
self.SetTopWindow(self.main) |
36 |
|
|
self.main.Show();self.main.Hide();self.main.Show() |
37 |
|
|
return True |
38 |
xabbu |
1.3 |
|
39 |
|
|
class fraggleMainWin(fraggleViewport): |
40 |
|
|
def _init_coll_menu1_Items(self, parent): |
41 |
|
|
|
42 |
xabbu |
1.8 |
|
43 |
xabbu |
1.3 |
fraggleViewport._init_coll_menu1_Items(self, parent) |
44 |
xabbu |
1.8 |
|
45 |
xabbu |
1.3 |
|
46 |
|
|
def _init_coll_menu2_Items(self, parent): |
47 |
|
|
|
48 |
xabbu |
1.8 |
|
49 |
xabbu |
1.3 |
fraggleViewport._init_coll_menu2_Items(self, parent) |
50 |
xabbu |
1.8 |
|
51 |
xabbu |
1.3 |
|
52 |
xabbu |
1.1 |
def main(): |
53 |
joko |
1.7 |
global engine, phpsessionid |
54 |
joko |
1.6 |
sys.path.insert(0, os.path.join(APPLOCATION, '..', 'libs')) |
55 |
joko |
1.5 |
engine = FraggleEngine() |
56 |
joko |
1.7 |
# TODO: move elsewhere! |
57 |
|
|
phpsessionid = "" |
58 |
xabbu |
1.1 |
application = BoaApp(0) |
59 |
|
|
application.MainLoop() |
60 |
|
|
|
61 |
|
|
if __name__ == '__main__': |
62 |
|
|
main() |