git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37579
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
# Global constants
progname = 'XRCed'
# Global constants
progname = 'XRCed'
# Minimal wxWindows version
MinWxVersion = (2,6,0)
if wxVERSION[:3] < MinWxVersion:
# Minimal wxWindows version
MinWxVersion = (2,6,0)
if wxVERSION[:3] < MinWxVersion:
xxx = tree.GetPyData(selected)
wx.TheClipboard.Open()
data = wx.CustomDataObject('XRCED')
xxx = tree.GetPyData(selected)
wx.TheClipboard.Open()
data = wx.CustomDataObject('XRCED')
- data.SetData(cPickle.dumps(xxx.element))
+ data.SetData(cPickle.dumps(xxx.element.toxml()))
wx.TheClipboard.SetData(data)
wx.TheClipboard.Close()
self.SetStatusText('Copied')
wx.TheClipboard.SetData(data)
wx.TheClipboard.Close()
self.SetStatusText('Copied')
return
wx.TheClipboard.GetData(data)
wx.TheClipboard.Close()
return
wx.TheClipboard.GetData(data)
wx.TheClipboard.Close()
- elem = cPickle.loads(data.GetData())
+ xml = cPickle.loads(data.GetData()) # xml representation of element
+ elem = minidom.parseString(xml).childNodes[0]
# Tempopary xxx object to test things
xxx = MakeXXXFromDOM(parent, elem)
# Tempopary xxx object to test things
xxx = MakeXXXFromDOM(parent, elem)
# Check compatibility
error = False
# Top-level
# Check compatibility
error = False
# Top-level
# Update tools
g.tools.UpdateUI()
# Update tools
g.tools.UpdateUI()
- #undoMan.RegisterUndo(UndoPasteCreate(parentLeaf, parent, newItem, selected))
+ undoMan.RegisterUndo(UndoPasteCreate(parentLeaf, parent, newItem, selected))
# Update view?
if g.testWin and tree.IsHighlatable(selected):
if conf.autoRefresh:
# Update view?
if g.testWin and tree.IsHighlatable(selected):
if conf.autoRefresh: