Changes merged
authorlaurent
Tue, 15 Dec 2009 10:06:01 +0100
changeset 515 022e034bd4b8
parent 514 d36a89dcd21c (diff)
parent 512 36aeab46f27d (current diff)
child 516 6a926af33ebc
Changes merged
LPCBeremiz.py
--- a/Beremiz.py	Mon Dec 14 21:05:10 2009 +0100
+++ b/Beremiz.py	Tue Dec 15 10:06:01 2009 +0100
@@ -386,6 +386,7 @@
                   size=wx.Size(0, 0), style=wx.TE_MULTILINE|wx.TE_RICH2)
         self.LogConsole.Bind(wx.EVT_LEFT_DCLICK, self.OnLogConsoleDClick)
         self.BottomNoteBook.AddPage(self.LogConsole, _("Log Console"))
+        self.BottomNoteBook.Split(self.BottomNoteBook.GetPageIndex(self.LogConsole), wx.RIGHT)
         
         self._init_beremiz_sizers()
 
@@ -432,11 +433,7 @@
         self._Refresh(TITLE, TOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)
 
     def RiseLogConsole(self):
-        for idx in xrange(self.BottomNoteBook.GetPageCount()):
-            window = self.BottomNoteBook.GetPage(idx)
-            if window == self.LogConsole:
-                self.BottomNoteBook.SetSelection(idx)
-                break
+        self.BottomNoteBook.SetSelection(self.BottomNoteBook.GetPageIndex(self.LogConsole))
         
     def RefreshTitle(self):
         name = _("Beremiz")
--- a/LPCBeremiz.py	Mon Dec 14 21:05:10 2009 +0100
+++ b/LPCBeremiz.py	Tue Dec 15 10:06:01 2009 +0100
@@ -991,9 +991,15 @@
                 self.CollapseLocation(locations_infos, "root")
 
 frame = None
+app = None
+
+def GetApp():
+    global app
+    return app
+wx.GetApp = GetApp
 
 def BeremizStartProc(plugin_root):
-    global frame
+    global frame, app
 
     app = wx.PySimpleApp()
     app.SetAppName('beremiz')
@@ -1025,6 +1031,7 @@
     app.MainLoop()
 
     frame = None
+    app = None
 
 class StdoutPseudoFile:
     """ Base class for file like objects to facilitate StdOut for the Shell."""