]> git.saurik.com Git - wxWidgets.git/commitdiff
Second fix for Copy/Paste (using expat.native_encoding property).
authorRoman Rolinsky <rolinsky@femagsoft.com>
Wed, 5 Apr 2006 14:55:17 +0000 (14:55 +0000)
committerRoman Rolinsky <rolinsky@femagsoft.com>
Wed, 5 Apr 2006 14:55:17 +0000 (14:55 +0000)
Added cellpos,cellspan properties for Spacer in GridBag sizer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index eb90262a21b012d0e07d28251bee84c62329bda2..8f27643994fdab5d82f8848ef71914424380a0e6 100644 (file)
@@ -1,3 +1,9 @@
+0.1.7-4
+-------
+
+Second fix for Copy/Paste (using expat.native_encoding property).
+Added cellpos,cellspan properties for Spacer in GridBag sizer.
+
 0.1.7-3
 -------
 
index aa405252836c73fdd6709e7cd1f3c022f715d9fa..e731674e41e34543991359fcf6509c7065174163 100644 (file)
@@ -15,7 +15,7 @@ import sys
 # Global constants
 
 progname = 'XRCed'
-version = '0.1.7-3'
+version = '0.1.7-4'
 # Minimal wxWindows version
 MinWxVersion = (2,6,0)
 if wxVERSION[:3] < MinWxVersion:
index 461a72dbd42bba150f7e1b642720037b64b33d2c..9da4ce74fea38c964b54a8769c9855efba1a87ca 100644 (file)
@@ -22,6 +22,7 @@ Options:
 
 from globals import *
 import os, sys, getopt, re, traceback, tempfile, shutil, cPickle
+from xml.parsers import expat
 
 # Local modules
 from tree import *                      # imports xxx which imports params
@@ -418,8 +419,7 @@ class Frame(wxFrame):
             data = wx.CustomDataObject('XRCED')
             # Set encoding in header
             # (False,True)
-            s = (xxx.element.toxml(encoding=g.currentEncoding),
-                 xxx.element.toxml())[not g.currentEncoding] 
+            s = xxx.element.toxml(encoding=expat.native_encoding)
             data.SetData(cPickle.dumps(s))
             wx.TheClipboard.SetData(data)
             wx.TheClipboard.Close()
@@ -593,8 +593,7 @@ class Frame(wxFrame):
             if wx.TheClipboard.Open():
                 data = wx.CustomDataObject('XRCED')
                 # (False, True)
-                s = (elem.toxml(encoding=g.currentEncoding),
-                     elem.toxml())[not g.currentEncoding] 
+                s = elem.toxml(encoding=expat.native_encoding)
                 data.SetData(cPickle.dumps(s))
                 wx.TheClipboard.SetData(data)
                 wx.TheClipboard.Close()
index 92df22cfe6b70c7bd8e0766d4c10c09dd76e942c..fa6ea642e3dd70240f47b76920bbd497f117598c 100644 (file)
@@ -874,6 +874,11 @@ class xxxSpacer(xxxObject):
     allParams = ['size', 'option', 'flag', 'border']
     paramDict = {'option': ParamInt}
     default = {'size': '0,0'}
+    def __init__(self, parent, element, refElem=None):
+        # For GridBag sizer items, extra parameters added
+        if isinstance(parent, xxxGridBagSizer):
+            self.allParams = self.allParams + ['cellpos', 'cellspan']
+        xxxObject.__init__(self, parent, element, refElem)
 
 class xxxMenuBar(xxxContainer):
     allParams = ['style']