From: Kevin A. <ka...@us...> - 2004-08-11 01:58:12
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17941/tools/resourceEditor/modules Modified Files: propertyEditor.py resourceOutput.py Log Message: updated file and size attribute handling to support resourceEditor Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** propertyEditor.py 10 May 2004 17:16:13 -0000 1.47 --- propertyEditor.py 11 Aug 2004 01:58:03 -0000 1.48 *************** *** 10,13 **** --- 10,14 ---- import resourceOutput import time + import os import string *************** *** 253,258 **** #print "attribute change took:", endTime - startTime else: ! setattr(widget, propName, value) ! #print propName, value # KEA 2002-02-23 self._parent.showSizingHandles(wName) --- 254,268 ---- #print "attribute change took:", endTime - startTime else: ! if wClass in ['Image', 'ImageButton'] and propName == 'file': ! cwd = os.getcwd() ! try: ! os.chdir(self._parent.filename) ! except: ! pass ! setattr(widget, propName, value) ! os.chdir(cwd) ! else: ! setattr(widget, propName, value) ! #print propName, value # KEA 2002-02-23 self._parent.showSizingHandles(wName) Index: resourceOutput.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/resourceOutput.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** resourceOutput.py 9 Aug 2004 21:40:47 -0000 1.27 --- resourceOutput.py 11 Aug 2004 01:58:03 -0000 1.28 *************** *** 48,52 **** # try and determine default sizes width, height = aWidget.size ! if aWidget.__class__.__name__ not in ['BitmapCanvas', 'HtmlWindow', 'IEHtmlWindow', 'Gauge']: bestWidth, bestHeight = aWidget.GetBestSize() if bestWidth == width: --- 48,54 ---- # try and determine default sizes width, height = aWidget.size ! if aWidget.__class__.__name__ in imgWidgets: ! width, height = aWidget._size ! elif aWidget.__class__.__name__ not in ['BitmapCanvas', 'HtmlWindow', 'IEHtmlWindow', 'Gauge']: bestWidth, bestHeight = aWidget.GetBestSize() if bestWidth == width: |