]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/xrced.py
Get/SetTitle only for wxTopLevelWindow (wxMGL part).
[wxWidgets.git] / wxPython / wx / tools / XRCed / xrced.py
index 5ef935b9f3901a60ab297a4b7c85a139c6362d4a..a68597b7fd51e55943f7b06da312732ecb75a257 100644 (file)
@@ -314,6 +314,7 @@ class Frame(wxFrame):
         EVT_CLOSE(self, self.OnCloseWindow)
         EVT_KEY_DOWN(self, tools.OnKeyDown)
         EVT_KEY_UP(self, tools.OnKeyUp)
+        EVT_ICONIZE(self, self.OnIconize)
     
     def AppendRecent(self, menu):
         # add recently used files to the menu
@@ -963,6 +964,17 @@ Homepage: http://xrced.sourceforge.net\
     def OnCloseMiniFrame(self, evt):
         return
 
+    def OnIconize(self, evt):
+        conf.x, conf.y = self.GetPosition()
+        conf.width, conf.height = self.GetSize()
+        if conf.embedPanel:
+            conf.sashPos = self.splitter.GetSashPosition()
+        else:
+            conf.panelX, conf.panelY = self.miniFrame.GetPosition()
+            conf.panelWidth, conf.panelHeight = self.miniFrame.GetSize()
+            self.miniFrame.Iconize()
+        evt.Skip()
+
     def OnCloseWindow(self, evt):
         if not self.AskSave(): return
         if g.testWin: g.testWin.Destroy()
@@ -1071,6 +1083,10 @@ Homepage: http://xrced.sourceforge.net\
             #self.domCopy = tree.dom.cloneNode(True)
             self.domCopy = MyDocument()
             mainNode = self.domCopy.appendChild(tree.mainNode.cloneNode(True))
+            # Remove first child (test element)
+            testElem = mainNode.firstChild
+            mainNode.removeChild(testElem)
+            testElem.unlink()
             self.Indent(mainNode)
             self.domCopy.writexml(f, encoding = g.currentEncoding)
             f.close()