]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed Cut command, added support for MenuBar inside Frame/Dialog.
authorRoman Rolinsky <rolinsky@femagsoft.com>
Thu, 16 Feb 2006 17:19:39 +0000 (17:19 +0000)
committerRoman Rolinsky <rolinsky@femagsoft.com>
Thu, 16 Feb 2006 17:19:39 +0000 (17:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/tools/XRCed/CHANGES.txt
wxPython/wx/tools/XRCed/globals.py
wxPython/wx/tools/XRCed/tree.py
wxPython/wx/tools/XRCed/xrced.py

index fbb041aaf4490151c8935a4c282bab16a5efd75d..164dc7958859bc4a66ba30c03961158633d2236f 100644 (file)
@@ -1,3 +1,8 @@
+0.1.7-2
+-------
+
+Fixed Cut command, added support for MenuBar inside Frame/Dialog.
+
 0.1.7-1
 -------
 
 0.1.7-1
 -------
 
index a81d987e2a65cb1b6ff2dcaeeb01097176df437d..d99e82352300a17f70c93acfd8799589af3b186b 100644 (file)
@@ -15,7 +15,7 @@ import sys
 # Global constants
 
 progname = 'XRCed'
 # Global constants
 
 progname = 'XRCed'
-version = '0.1.7-1'
+version = '0.1.7-2'
 # Minimal wxWindows version
 MinWxVersion = (2,6,0)
 if wxVERSION[:3] < MinWxVersion:
 # Minimal wxWindows version
 MinWxVersion = (2,6,0)
 if wxVERSION[:3] < MinWxVersion:
index 77a86720debe77db0921b804d712bc614c07cf48..0e78ba4844121a7545687b52dfaf92f86eca3408 100644 (file)
@@ -653,9 +653,9 @@ class XML_Tree(wxTreeCtrl):
         # Top-level sizer? return window's sizer
         if xxx.isSizer and isinstance(parentWin, wxWindow):
             return parentWin.GetSizer()
         # Top-level sizer? return window's sizer
         if xxx.isSizer and isinstance(parentWin, wxWindow):
             return parentWin.GetSizer()
-        elif isinstance(xxx, xxxStatusBar):  return None
-        elif isinstance(xxx, xxxToolBar):
-            # If it's the main toolbar, we can't really select it
+        elif xxx.__class__ in [xxxStatusBar, xxxMenu, xxxMenuItem, xxxSeparator]:  return None
+        elif xxx.__class__ in [xxxToolBar, xxxMenuBar]:
+            # If it's the main toolbar or menubar, we can't really select it
             if xxx.parent.__class__ == xxxFrame:  return None
         elif isinstance(xxx.parent, xxxToolBar):
             # Select complete toolbar
             if xxx.parent.__class__ == xxxFrame:  return None
         elif isinstance(xxx.parent, xxxToolBar):
             # Select complete toolbar
index 4088a8943d1295be9ce7bd5c4e5074230e9365f2..ac593cb6e92ab1d4508d42f08992a425874be857 100644 (file)
@@ -463,9 +463,12 @@ class Frame(wxFrame):
         error = False
         # Top-level
         x = xxx.treeObject()
         error = False
         # Top-level
         x = xxx.treeObject()
-        if x.__class__ in [xxxDialog, xxxFrame, xxxMenuBar, xxxWizard]:
+        if x.__class__ in [xxxDialog, xxxFrame, xxxWizard]:
             # Top-level classes
             if parent.__class__ != xxxMainNode: error = True
             # Top-level classes
             if parent.__class__ != xxxMainNode: error = True
+        elif x.__class__ == xxxMenuBar:
+            # Menubar can be put in frame or dialog
+            if parent.__class__ not in [xxxMainNode, xxxFrame, xxxDialog]: error = True
         elif x.__class__ == xxxToolBar:
             # Toolbar can be top-level of child of panel or frame
             if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame] and \
         elif x.__class__ == xxxToolBar:
             # Toolbar can be top-level of child of panel or frame
             if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame] and \
@@ -576,7 +579,7 @@ class Frame(wxFrame):
         if evt.GetId() == wxID_CUT:
             wx.TheClipboard.Open()
             data = wx.CustomDataObject('XRCED')
         if evt.GetId() == wxID_CUT:
             wx.TheClipboard.Open()
             data = wx.CustomDataObject('XRCED')
-            data.SetData(cPickle.dumps(elem))
+            data.SetData(cPickle.dumps(elem.toxml()))
             wx.TheClipboard.SetData(data)
             wx.TheClipboard.Close()
         tree.pendingHighLight = None
             wx.TheClipboard.SetData(data)
             wx.TheClipboard.Close()
         tree.pendingHighLight = None