Second fix for Copy/Paste (using expat.native_encoding property).

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
This commit is contained in:
Roman Rolinsky 2006-04-05 14:55:17 +00:00
parent a29cce78aa
commit 28e65e0fa0
4 changed files with 15 additions and 5 deletions

View 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
-------

View 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:

View 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()

View 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']