git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38468
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)
if wx.TheClipboard.Open():
data = wx.CustomDataObject('XRCED')
xxx = tree.GetPyData(selected)
if wx.TheClipboard.Open():
data = wx.CustomDataObject('XRCED')
- data.SetData(cPickle.dumps(xxx.element.toxml()))
+ # Set encoding in header
+ # (False,True)
+ s = (xxx.element.toxml(encoding=g.currentEncoding),
+ xxx.element.toxml())[not g.currentEncoding]
+ data.SetData(cPickle.dumps(s))
wx.TheClipboard.SetData(data)
wx.TheClipboard.Close()
self.SetStatusText('Copied')
wx.TheClipboard.SetData(data)
wx.TheClipboard.Close()
self.SetStatusText('Copied')
if evt.GetId() == wxID_CUT:
if wx.TheClipboard.Open():
data = wx.CustomDataObject('XRCED')
if evt.GetId() == wxID_CUT:
if wx.TheClipboard.Open():
data = wx.CustomDataObject('XRCED')
- data.SetData(cPickle.dumps(elem.toxml()))
+ # (False, True)
+ s = (elem.toxml(encoding=g.currentEncoding),
+ elem.toxml())[not g.currentEncoding]
+ data.SetData(cPickle.dumps(s))
wx.TheClipboard.SetData(data)
wx.TheClipboard.Close()
else:
wx.TheClipboard.SetData(data)
wx.TheClipboard.Close()
else: