X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80389ff7094bb385733198573fa091db5be480a1..f6d43eda3e8bc5c17cd3c55f037abcc4a4e043be:/wxPython/wx/tools/XRCed/xxx.py diff --git a/wxPython/wx/tools/XRCed/xxx.py b/wxPython/wx/tools/XRCed/xxx.py index 90542e52ce..1fb1c81ebe 100644 --- a/wxPython/wx/tools/XRCed/xxx.py +++ b/wxPython/wx/tools/XRCed/xxx.py @@ -49,9 +49,9 @@ class xxxParam(xxxNode): def value(self): return self.textNode.data.encode(g.currentEncoding) def update(self, value): - try: # handle exception if encoding is wrong + try: # handle exception if encoding is wrong self.textNode.data = unicode(value, g.currentEncoding) - except UnicodeDecodeError: + except UnicodeDecodeError: wxLogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate") # Integer parameter @@ -238,9 +238,11 @@ class xxxObject: else: # simple parameter self.params[tag] = xxxParam(node) else: + pass # Remove all other nodes - element.removeChild(node) - node.unlink() +# element.removeChild(node) +# node.unlink() + # Check that all required params are set for param in self.required: if not self.params.has_key(param): @@ -336,12 +338,10 @@ class xxxContainer(xxxObject): # Simulate normal parameter for encoding class xxxEncoding: - def __init__(self, val): - self.encd = val def value(self): - return self.encd + return g.currentEncoding def update(self, val): - self.encd = val + g.currentEncoding = val # Special class for root node class xxxMainNode(xxxContainer): @@ -353,7 +353,7 @@ class xxxMainNode(xxxContainer): # Reset required parameters after processing XML, because encoding is # a little special self.required = ['encoding'] - self.params['encoding'] = xxxEncoding(dom.encoding) + self.params['encoding'] = xxxEncoding() ################################################################################ # Top-level windwows @@ -418,8 +418,7 @@ class xxxBitmap(xxxObject): # Just like bitmap class xxxIcon(xxxObject): - allParams = ['icon'] - required = ['icon'] + allParams = [] ################################################################################ # Controls @@ -503,8 +502,8 @@ class xxxSplitterWindow(xxxContainer): allParams = ['orientation', 'sashpos', 'minsize', 'pos', 'size', 'style'] paramDict = {'orientation': ParamOrientation, 'sashpos': ParamUnit, 'minsize': ParamUnit } winStyles = ['wxSP_3D', 'wxSP_3DSASH', 'wxSP_3DBORDER', 'wxSP_BORDER', - 'wxSP_NOBORDER', 'wxSP_PERMIT_UNSPLIT', 'wxSP_LIVE_UPDATE', - 'wxSP_NO_XP_THEME' ] + 'wxSP_NOBORDER', 'wxSP_PERMIT_UNSPLIT', 'wxSP_LIVE_UPDATE', + 'wxSP_NO_XP_THEME' ] class xxxGenericDirCtrl(xxxObject): allParams = ['defaultfolder', 'filter', 'defaultfilter', 'pos', 'size', 'style']