]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/multisash.py
compilation fix after removing wxImage(wxImage *) ctor
[wxWidgets.git] / wxPython / wx / lib / multisash.py
index f9841759976b67537019b2c2e1133761ff5e7a35..6be5e730aaba69358ca4a0477e8b2940167e2eea 100644 (file)
@@ -16,7 +16,7 @@
 # 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
 #
 # o wxMultiSash -> MultiSash
 # 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
 #
 # o wxMultiSash -> MultiSash
-# o wxMultiSplit -> MultiSplit wxMultiViewLeaf
+# o wxMultiSplit -> MultiSplit 
 # o wxMultiViewLeaf -> MultiViewLeaf
 #
 
 # o wxMultiViewLeaf -> MultiViewLeaf
 #
 
@@ -55,17 +55,18 @@ class MultiSash(wx.Window):
 
     def GetSaveData(self):
         saveData = {}
 
     def GetSaveData(self):
         saveData = {}
-        saveData['_defChild'] = str(self._defChild)
+        saveData['_defChild_class'] = self._defChild.__name__
+        saveData['_defChild_mod']   = self._defChild.__module__
         saveData['child'] = self.child.GetSaveData()
         return saveData
 
     def SetSaveData(self,data):
         saveData['child'] = self.child.GetSaveData()
         return saveData
 
     def SetSaveData(self,data):
-        dChild = data['_defChild']
-        mod = dChild.split('.')[0]
+        mod = data['_defChild_mod']
+        dChild = mod + '.' + data['_defChild_class']
         exec 'import %s' % mod
         self._defChild = eval(dChild)
         old = self.child
         exec 'import %s' % mod
         self._defChild = eval(dChild)
         old = self.child
-        self.child = MultiSplit(self,self,wxPoint(0,0),self.GetSize())
+        self.child = MultiSplit(self,self,wx.Point(0,0),self.GetSize())
         self.child.SetSaveData(data['child'])
         old.Destroy()
         self.OnMultiSize(None)
         self.child.SetSaveData(data['child'])
         old.Destroy()
         self.OnMultiSize(None)
@@ -302,9 +303,13 @@ class MultiViewLeaf(wx.Window):
 
         self.Bind(wx.EVT_SIZE,self.OnSize)
 
 
         self.Bind(wx.EVT_SIZE,self.OnSize)
 
+        self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE))
+
+
     def GetSaveData(self):
         saveData = {}
     def GetSaveData(self):
         saveData = {}
-        saveData['detailClass'] = str(self.detail.child.__class__)
+        saveData['detailClass_class'] = self.detail.child.__class__.__name__
+        saveData['detailClass_mod'] = self.detail.child.__module__
         if hasattr(self.detail.child,'GetSaveData'):
             attr = getattr(self.detail.child,'GetSaveData')
             if callable(attr):
         if hasattr(self.detail.child,'GetSaveData'):
             attr = getattr(self.detail.child,'GetSaveData')
             if callable(attr):
@@ -320,8 +325,8 @@ class MultiViewLeaf(wx.Window):
         return saveData
 
     def SetSaveData(self,data):
         return saveData
 
     def SetSaveData(self,data):
-        dChild = data['detailClass']
-        mod = dChild.split('.')[0]
+        mod = data['detailClass_mod']
+        dChild = mod + '.' + data['detailClass_class']
         exec 'import %s' % mod
         detClass = eval(dChild)
         self.SetDimensions(data['x'],data['y'],data['w'],data['h'])
         exec 'import %s' % mod
         detClass = eval(dChild)
         self.SetDimensions(data['x'],data['y'],data['w'],data['h'])
@@ -361,12 +366,17 @@ class MultiViewLeaf(wx.Window):
         return self.GetParent().CanSize(side,self)
 
     def OnSize(self,evt):
         return self.GetParent().CanSize(side,self)
 
     def OnSize(self,evt):
-        self.sizerHor.OnSize(evt)
-        self.sizerVer.OnSize(evt)
-        self.creatorHor.OnSize(evt)
-        self.creatorVer.OnSize(evt)
-        self.detail.OnSize(evt)
-        self.closer.OnSize(evt)
+        def doresize():
+            try:
+                self.sizerHor.OnSize(evt)
+                self.sizerVer.OnSize(evt)
+                self.creatorHor.OnSize(evt)
+                self.creatorVer.OnSize(evt)
+                self.detail.OnSize(evt)
+                self.closer.OnSize(evt)
+            except:
+                pass
+        wx.CallAfter(doresize)
 
 #----------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------
 
@@ -450,6 +460,9 @@ class MultiSizer(wx.Window):
         self.Bind(wx.EVT_LEFT_DOWN,self.OnPress)
         self.Bind(wx.EVT_LEFT_UP,self.OnRelease)
 
         self.Bind(wx.EVT_LEFT_DOWN,self.OnPress)
         self.Bind(wx.EVT_LEFT_UP,self.OnRelease)
 
+        self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE))
+
+
     def CalcSizePos(self,parent):
         pw,ph = parent.GetSize()
         if self.side == MV_HOR:
     def CalcSizePos(self,parent):
         pw,ph = parent.GetSize()
         if self.side == MV_HOR: