From: Kevin A. <ka...@us...> - 2004-08-24 19:01:52
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12833/tools/resourceEditor/modules Modified Files: backgroundInfoDialog.py propertyEditor.py propertyEditor.rsrc.py Log Message: added relativePath function, used by resourceEditor added File... button to Property Editor Index: backgroundInfoDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/backgroundInfoDialog.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** backgroundInfoDialog.py 24 Aug 2004 07:17:40 -0000 1.15 --- backgroundInfoDialog.py 24 Aug 2004 19:01:37 -0000 1.16 *************** *** 49,53 **** if result.accepted: path = result.paths[0] ! filename = os.path.split(path)[-1] self.components.fldImage.text = filename --- 49,53 ---- if result.accepted: path = result.paths[0] ! filename = util.relativePath(self.parent.filename, path) self.components.fldImage.text = filename *************** *** 57,61 **** if result.accepted: path = result.paths[0] ! filename = os.path.split(path)[-1] self.components.fldIcon.text = filename --- 57,61 ---- if result.accepted: path = result.paths[0] ! filename = util.relativePath(self.parent.filename, path) self.components.fldIcon.text = filename Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** propertyEditor.py 24 Aug 2004 07:17:40 -0000 1.51 --- propertyEditor.py 24 Aug 2004 19:01:37 -0000 1.52 *************** *** 31,35 **** self.editItems = [self.components.wField, self.components.wColor, self.components.wFont, self.components.wTextArea, ! self.components.wChecked, self.components.wPop] # KEA 2001-08-14 --- 31,36 ---- self.editItems = [self.components.wField, self.components.wColor, self.components.wFont, self.components.wTextArea, ! self.components.wChecked, self.components.wPop, ! self.components.wFile,] # KEA 2001-08-14 *************** *** 89,92 **** --- 90,101 ---- self.updateComponent() + def on_wFile_mouseClick(self, event): + path, filename = os.path.split(self.components.wField.text) + result = dialog.openFileDialog(self, directory=path, filename=filename) + if result.accepted: + self.components.wField.text = util.relativePath(self._parent.filename, result.paths[0]) + if self.autoAttributeUpdate: + self.updateComponent() + def addWidgetToComponentList(self, widget): *************** *** 389,392 **** --- 398,403 ---- elif propName == 'font': self.components.wFont.visible = True + elif propName == 'file': + self.components.wFile.visible = True self.components.wName.text = propName + ":" Index: propertyEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.rsrc.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** propertyEditor.rsrc.py 14 Aug 2004 07:46:20 -0000 1.11 --- propertyEditor.rsrc.py 24 Aug 2004 19:01:37 -0000 1.12 *************** *** 55,58 **** --- 55,65 ---- }, + {'type':'Button', + 'name':'wFile', + 'position':(320, 130), + 'label':'File...', + 'visible':0, + }, + {'type':'TextField', 'name':'wField', |