commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6122 - in trunk: gnue-designer/src gnue-designer/src/base gnue-designer


From: jcater
Subject: r6122 - in trunk: gnue-designer/src gnue-designer/src/base gnue-designer/src/base/tools gnue-forms/src/uidrivers/wx
Date: Mon, 2 Aug 2004 22:46:52 -0500 (CDT)

Author: jcater
Date: 2004-08-02 22:46:51 -0500 (Mon, 02 Aug 2004)
New Revision: 6122

Modified:
   trunk/gnue-designer/src/Designer.py
   trunk/gnue-designer/src/base/Icons.py
   trunk/gnue-designer/src/base/tools/PropertyEditor.py
   trunk/gnue-forms/src/uidrivers/wx/GFwxApp.py
Log:
initial work on getting Designer to work with wx 2.5+

Modified: trunk/gnue-designer/src/Designer.py
===================================================================
--- trunk/gnue-designer/src/Designer.py 2004-08-03 01:46:23 UTC (rev 6121)
+++ trunk/gnue-designer/src/Designer.py 2004-08-03 03:46:51 UTC (rev 6122)
@@ -71,12 +71,10 @@
 from base import TemplateParser, TemplateChooser, MRUManager
 from gnue.forms.GFConfig import ConfigOptions
 from base.Config import ConfigOptions as DesignerConfigOptions
+from gnue.forms.uidrivers.wx.GFwxApp import setWxApp
 
 import time
 
-from gnue.forms.uidrivers.wx import UILoginHandler #  import UIdriver as 
UIwxpython
-
-
 class Designer(GClientApp, wxApp):
 
   # GClientApp stuff...
@@ -100,8 +98,17 @@
     self.configurationManager.registerAlias('gConfigNav', 'navigator')
     self.configurationManager.registerAlias('gConfigForms', 'forms')
     self.configurationManager.registerAlias('gConfigReports', 'reports')
-
+    
+    # Set Form's wxApp, so it doesn't try to create another. 
+    setWxApp(self)
+    
+    # This has to happen after setWxApp, 
+    # otherwise bad things happen. (and  
+    # we don't like bad things, do we?)   
+    from gnue.forms.uidrivers.wx import UILoginHandler
     self.getConnectionManager().setLoginHandler(UILoginHandler())
+    
+    # Load individual module information
     self.loadModuleInformation()
 
     wxApp.__init__(self,0)

Modified: trunk/gnue-designer/src/base/Icons.py
===================================================================
--- trunk/gnue-designer/src/base/Icons.py       2004-08-03 01:46:23 UTC (rev 
6121)
+++ trunk/gnue-designer/src/base/Icons.py       2004-08-03 03:46:51 UTC (rev 
6122)
@@ -37,7 +37,7 @@
     pass
 
 treeIconMap = {}
-treeIconList = myImageList(16,16,false)
+treeIconList = myImageList(18,18,false)
 
 iconlocation = 
os.path.join(GConfig.getInstalledBase('designer_images','common_images'),'designer')
 
@@ -56,16 +56,12 @@
 for f in ('block','datasource','entry','import','pagewidget',
           'page','trigger','properties'):
   if os.path.isfile('%s/destree_%s.%s' % (iconlocation, f,iconextension)):
+    print '%s/destree_%s.%s' % (iconlocation, f,iconextension)
     treeIconMap[f] = treeIconList.AddIcon(
-        wxIcon('%s/destree_%s.%s' % (iconlocation, f,iconextension), icontype))
+        wxIcon('%s/destree_%s.%s' % (iconlocation, f,iconextension), 
+             icontype))
   else:
     treeIconMap[f] = treeIconList.AddIcon(wxNullIcon)
 
 
-
-
-
-
-
-
-
+  
\ No newline at end of file

Modified: trunk/gnue-designer/src/base/tools/PropertyEditor.py
===================================================================
--- trunk/gnue-designer/src/base/tools/PropertyEditor.py        2004-08-03 
01:46:23 UTC (rev 6121)
+++ trunk/gnue-designer/src/base/tools/PropertyEditor.py        2004-08-03 
03:46:51 UTC (rev 6122)
@@ -129,7 +129,7 @@
 
   def __init__(self, editor, parent):
     wxScrolledWindow.__init__(self, parent, -1, style = wxHSCROLL)
-    self.splitter = splitter = wxSplitterWindow(self, -1, style=wxSP_FULLSASH 
| wxSP_NOBORDER)
+    self.splitter = splitter = wxSplitterWindow(self, -1, style=wxSP_3DSASH | 
wxSP_NOBORDER)
     self.object = None
     self.editor = editor
     self.fields = []

Modified: trunk/gnue-forms/src/uidrivers/wx/GFwxApp.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx/GFwxApp.py        2004-08-03 01:46:23 UTC 
(rev 6121)
+++ trunk/gnue-forms/src/uidrivers/wx/GFwxApp.py        2004-08-03 03:46:51 UTC 
(rev 6122)
@@ -34,27 +34,33 @@
 __wxApp = None
 
 def getWxApp():
-    global __wxApp
+  global __wxApp
 
-    if not __wxApp:
-        GDebug.printMesg(7,"WxApp initializing")
-        __wxApp = GFwxApp(0)
-    return __wxApp
+  if not __wxApp:
+      GDebug.printMesg(7,"WxApp initializing")
+      __wxApp = GFwxApp(0)
+  return __wxApp
 
+  
+def setWxApp(wxapp):
+  global __wxApp
+  __wxApp = wxapp
+  
+
 class GFwxApp(wxApp):
-    _mainLoop= None
-    
-    def OnInit(self):
-        GDebug.printMesg(7,"WxApp initializing")
-        wxInitAllImageHandlers()
-        return true
+  _mainLoop= None
+  
+  def OnInit(self):
+    GDebug.printMesg(7,"WxApp initializing")
+    wxInitAllImageHandlers()
+    return True
 
-    def MainLoop (self):
-        # just to launch one wx's mainloop
-        # otherwise, the app does not finishes cleanly when several windows 
are open
-        # 'cause the first mainloop gets all the events
-        # and the others just sit and wait for something to happen
-        if self._mainLoop==None:
-            self._mainLoop= 1
-            wxApp.MainLoop (self)
-            
+  def MainLoop (self):
+    # just to launch one wx's mainloop
+    # otherwise, the app does not finishes cleanly when several windows are 
open
+    # 'cause the first mainloop gets all the events
+    # and the others just sit and wait for something to happen
+    if self._mainLoop==None:
+        self._mainLoop= True
+        wxApp.MainLoop (self)
+          





reply via email to

[Prev in Thread] Current Thread [Next in Thread]