1 |
#!/usr/bin/env python |
#!/usr/bin/env python |
2 |
#Boa:App:BoaApp |
#Boa:App:BoaApp |
3 |
|
|
4 |
from wxPython.wx import * |
# $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 fraggleViewport |
import sys, os |
26 |
|
from wxPython.wx import * |
27 |
|
|
28 |
|
from fraggleConstants import * |
29 |
|
from fraggleEngine import * |
30 |
|
from fraggleViewport import * |
31 |
|
|
32 |
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
modules ={'fraggleDialogPrefs': [0, '', 'fraggleDialogPrefs.py'], |
33 |
'fraggleViewport': [1, '', 'fraggleViewport.py']} |
'fraggleViewport': [1, '', 'fraggleViewport.py']} |
35 |
class BoaApp(wxApp): |
class BoaApp(wxApp): |
36 |
def OnInit(self): |
def OnInit(self): |
37 |
wxInitAllImageHandlers() |
wxInitAllImageHandlers() |
38 |
self.main = fraggleViewport.create(None) |
self.main = fraggleMainWin(None) |
39 |
# needed when running from Boa under Windows 9X |
# needed when running from Boa under Windows 9X |
40 |
self.SetTopWindow(self.main) |
self.SetTopWindow(self.main) |
41 |
self.main.Show();self.main.Hide();self.main.Show() |
self.main.Show();self.main.Hide();self.main.Show() |
42 |
return True |
return True |
43 |
|
|
44 |
|
class fraggleMainWin(fraggleViewport): |
45 |
|
def _init_coll_menu1_Items(self, parent): |
46 |
|
|
47 |
|
|
48 |
|
fraggleViewport._init_coll_menu1_Items(self, parent) |
49 |
|
|
50 |
|
|
51 |
|
def _init_coll_menu2_Items(self, parent): |
52 |
|
|
53 |
|
|
54 |
|
fraggleViewport._init_coll_menu2_Items(self, parent) |
55 |
|
|
56 |
|
|
57 |
def main(): |
def main(): |
58 |
|
global engine, phpsessionid |
59 |
|
sys.path.insert(0, os.path.join(APPLOCATION, '..', 'libs')) |
60 |
|
engine = FraggleEngine() |
61 |
|
# TODO: move elsewhere! |
62 |
|
phpsessionid = "" |
63 |
application = BoaApp(0) |
application = BoaApp(0) |
64 |
application.MainLoop() |
application.MainLoop() |
65 |
|
|