commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r8916 - in trunk/gnue-designer/src: base base/tools ui/wx ui/wx/u


From: jcater
Subject: [gnue] r8916 - in trunk/gnue-designer/src: base base/tools ui/wx ui/wx/uihelpers
Date: Tue, 24 Oct 2006 00:49:22 -0500 (CDT)

Author: jcater
Date: 2006-10-24 00:49:19 -0500 (Tue, 24 Oct 2006)
New Revision: 8916

Modified:
   trunk/gnue-designer/src/base/Document.py
   trunk/gnue-designer/src/base/ToolBase.py
   trunk/gnue-designer/src/base/tools/TreeView.py
   trunk/gnue-designer/src/ui/wx/Base.py
   trunk/gnue-designer/src/ui/wx/Instance.py
   trunk/gnue-designer/src/ui/wx/uihelpers/PyAUI.py
   trunk/gnue-designer/src/ui/wx/uihelpers/PythonEditor.py
Log:
fixed a few keystroke binding errors; misc typos

Modified: trunk/gnue-designer/src/base/Document.py
===================================================================
--- trunk/gnue-designer/src/base/Document.py    2006-10-24 04:25:15 UTC (rev 
8915)
+++ trunk/gnue-designer/src/base/Document.py    2006-10-24 05:49:19 UTC (rev 
8916)
@@ -711,7 +711,7 @@
     # ---------------------------------------------------------------
     def _OnSave(self, event):
         if not len(self._path):
-            self.OnSaveAs(event)
+            self._OnSaveAs(event)
         else:
             self.save()
 

Modified: trunk/gnue-designer/src/base/ToolBase.py
===================================================================
--- trunk/gnue-designer/src/base/ToolBase.py    2006-10-24 04:25:15 UTC (rev 
8915)
+++ trunk/gnue-designer/src/base/ToolBase.py    2006-10-24 05:49:19 UTC (rev 
8916)
@@ -93,21 +93,25 @@
     Tool interfaces with a Notebook control as their outer component
     """
     def _createOuterInterfaces(self):
-        notebook = self.notebook = NotebookCtrl.NotebookCtrl(self, -1,
-                style=NotebookCtrl.NC_DEFAULT_STYLE|NotebookCtrl.NC_BOTTOM)
-        notebook.HideOnSingleTab()
-        notebook.EnableHiding()
-        notebook.SetTabHeight(10)
-        notebook.SetPadding(wx.Size(1,1))
+        ## NotebookCtrl:
+        #notebook = self.notebook = NotebookCtrl.NotebookCtrl(self, -1,
+                #style=NotebookCtrl.NC_DEFAULT_STYLE|NotebookCtrl.NC_BOTTOM)
+        #notebook.HideOnSingleTab()
+        #notebook.EnableHiding()
+        #notebook.SetTabHeight(10)
+        #notebook.SetPadding(wx.Size(1,1))
 
+        notebook = self.notebook = wx.Notebook(self, -1)
+
         self.document.app.ui.autoSizer(self, notebook)
 
         ToolBase._createOuterInterfaces(self)
 
     def addPage(self, page, text):
-        self.notebook.AddPage(page, text)
-        self.notebook.SetPageTextFont(self.notebook.GetPageCount()-1,
-             wx.SMALL_FONT)
+        ## NotebookCtrl:
+        #self.notebook.AddPage(page, text)
+        #self.notebook.SetPageTextFont(self.notebook.GetPageCount()-1,
+             #wx.SMALL_FONT)
         return page
 
     def deletePage(self, id):

Modified: trunk/gnue-designer/src/base/tools/TreeView.py
===================================================================
--- trunk/gnue-designer/src/base/tools/TreeView.py      2006-10-24 04:25:15 UTC 
(rev 8915)
+++ trunk/gnue-designer/src/base/tools/TreeView.py      2006-10-24 05:49:19 UTC 
(rev 8916)
@@ -82,8 +82,8 @@
 
         self.inittree()
         self.rootObject.walk(self.inventoryObject)
-        tree.Expand(root)
-        self.Fit()
+        ##tree.Expand(root)
+        ##self.Fit()
 
     # For use by subclasses
     def inittree(self):

Modified: trunk/gnue-designer/src/ui/wx/Base.py
===================================================================
--- trunk/gnue-designer/src/ui/wx/Base.py       2006-10-24 04:25:15 UTC (rev 
8915)
+++ trunk/gnue-designer/src/ui/wx/Base.py       2006-10-24 05:49:19 UTC (rev 
8916)
@@ -54,7 +54,7 @@
     raise "GNUe Designer requires wxPython 2.6.1 or greater."
 
 # Issue stability warning for old wx versions
-if wx.__version__ < '2.6.2.1':
+if wx.__version__ < '2.6.3':
     print
     print "*" * 70
     print "WARNING: GNUe Designer is unstable on wxPython %s." % wx.__version__

Modified: trunk/gnue-designer/src/ui/wx/Instance.py
===================================================================
--- trunk/gnue-designer/src/ui/wx/Instance.py   2006-10-24 04:25:15 UTC (rev 
8915)
+++ trunk/gnue-designer/src/ui/wx/Instance.py   2006-10-24 05:49:19 UTC (rev 
8916)
@@ -33,6 +33,10 @@
 # External Imports
 #----------------------------------------------------------------------------
 import wx
+try:
+    import wx.aui as PyAUI  # For wx 2.7+, use the builtin library
+except ImportError:
+    from uihelpers import PyAUI  # Use the less-stable python version
 
 #----------------------------------------------------------------------------
 # GNUe Imports
@@ -41,7 +45,6 @@
 from gnue.designer.base import Goat
 from gnue.designer import PACKAGE as TITLE
 from gnue.designer.base.PrimaryToolBar import PrimaryToolBar
-from uihelpers import PyAUI
 from uihelpers import NotebookCtrl
 from MenuBar import MenuBar
 
@@ -133,10 +136,11 @@
         self._auiMgr.Update()
 
         self.Show(True)
+        print "1"
 
         # Removing this refresh causes a segfault,
         # but the PyAUI examples don't have it??
-        self.Layout()
+        #self.Layout()
 
 
 
@@ -164,8 +168,12 @@
                 self._editorIcons.Add(icon)
 
         object._editorComponent = tool
-        page = self.editNotebook.AddPage(tool, tool._caption, False, iconIndex)
 
+        ## NotebookCtrl:
+        ##page = self.editNotebook.AddPage(tool, tool._caption, False, 
iconIndex)
+
+        page = self.editNotebook.AddPage(tool, tool._caption)
+
     def close(self):
         self.Destroy()
 
@@ -179,17 +187,21 @@
     def initTools(self):
         self.tools = []
 
-        # Create a center notebook pane
-        self.editNotebook = notebook = NotebookCtrl.NotebookCtrl(
+        ## Create a center notebook pane
+        ## NotebookCtrl:
+        #self.editNotebook = notebook = NotebookCtrl.NotebookCtrl(
+               #self,-1)
+        #notebook.SetImageList(self._editorIcons)
+        #notebook.EnableHiding()
+        #notebook.SetHighlightSelection()
+        ##notebook.SetUseFocusIndicator()
+        #notebook.SetDrawX(style=2)
+        ##notebook.SetImageToCloseButton()
+        ##notebook.SetTabHeight(20)
+        #notebook.EnableTabGradients()
+
+        self.editNotebook = notebook = wx.Notebook(
                self,-1)
-        notebook.SetImageList(self._editorIcons)
-        notebook.EnableHiding()
-        notebook.SetHighlightSelection()
-        #notebook.SetUseFocusIndicator()
-        notebook.SetDrawX(style=2)
-        #notebook.SetImageToCloseButton()
-        #notebook.SetTabHeight(20)
-        notebook.EnableTabGradients()
         self._auiMgr.AddPane(notebook, PyAUI.PaneInfo().Name('Editor').\
               Caption('Editor').CenterPane())
 
@@ -325,10 +337,14 @@
 
 
         # Setup PyAUI (the docking framework)
-        self._auiMgr = PyAUI.FrameManager(self)
-        self._auiMgr.SetFrame(self)
-        self._auiMgr.SetDockArt(MyDockArt())
+        self._auiMgr = PyAUI.FrameManager()
 
+        # In wx 2.7+, we can call PyAUI.FrameManager(self)
+        # and eliminate the next line.
+        self._auiMgr.SetManagedWindow(self)
+
+        self._auiMgr.SetArtProvider(MyDockArt())
+
         # Set our icon
         icon = Goat.getGoatIcon()
         self.SetIcon(icon)

Modified: trunk/gnue-designer/src/ui/wx/uihelpers/PyAUI.py
===================================================================
--- trunk/gnue-designer/src/ui/wx/uihelpers/PyAUI.py    2006-10-24 04:25:15 UTC 
(rev 8915)
+++ trunk/gnue-designer/src/ui/wx/uihelpers/PyAUI.py    2006-10-24 05:49:19 UTC 
(rev 8916)
@@ -4876,4 +4876,4 @@
 # ===================================================================
 
 FrameManager.SetManagedWindow = FrameManager.SetFrame
-FrameManager.SetArtProvider = FrameManager.SetDockArt
\ No newline at end of file
+FrameManager.SetArtManager = FrameManager.SetDockArt
\ No newline at end of file

Modified: trunk/gnue-designer/src/ui/wx/uihelpers/PythonEditor.py
===================================================================
--- trunk/gnue-designer/src/ui/wx/uihelpers/PythonEditor.py     2006-10-24 
04:25:15 UTC (rev 8915)
+++ trunk/gnue-designer/src/ui/wx/uihelpers/PythonEditor.py     2006-10-24 
05:49:19 UTC (rev 8916)
@@ -91,6 +91,8 @@
         else:
             self.SetViewWhiteSpace(0)
             self.SetTabWidth(4)
+            self.tabWidth = 4
+            self.indentation = "    "
             self.SetIndentationGuides(1)
             self.SetUseTabs(0)
             self.SetEdgeMode(wx_stc.STC_EDGE_LINE)
@@ -200,7 +202,7 @@
 
     def OnKeyDown(self, event):
         """"""
-        key     = event.KeyCode()
+        key     = event.KeyCode
         control = event.ControlDown()
         #shift=event.ShiftDown()
         alt     = event.AltDown()
@@ -232,7 +234,7 @@
             event.Skip()
 
     def OnChar(self,event):
-        key     = event.KeyCode()
+        key     = event.KeyCode
         control = event.ControlDown()
         alt     = event.AltDown()
         # GF We avoid an error while evaluating chr(key), next line.





reply via email to

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