From: Kevin A. <ka...@us...> - 2004-08-12 19:14:33
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15782/resourceEditor/modules Modified Files: backgroundInfoDialog.py propertyEditor.py stackInfoDialog.py Log Message: getCommandLineArgs moved to util.py runOptionsDialog moved to templates.dialogs.runOptionsDialog.py dialog.py is now a thin wrapper around wx.lib.dialogs.py all dialog results now use DialogResults class instead of dictionary e.g. result.accepted instead of result['accepted'] see dialogs sample and other samples and tools for examples of change Index: backgroundInfoDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/backgroundInfoDialog.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** backgroundInfoDialog.py 15 Apr 2004 23:59:30 -0000 1.12 --- backgroundInfoDialog.py 12 Aug 2004 19:14:23 -0000 1.13 *************** *** 37,52 **** def on_btnForegroundColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result['accepted']: ! self.components.fldForegroundColor.text = str(result['color']) def on_btnBackgroundColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result['accepted']: ! self.components.fldBackgroundColor.text = str(result['color']) def on_btnFile_mouseClick(self, event): result = dialog.openFileDialog() ! if result['accepted']: ! path = result['paths'][0] filename = os.path.split(path)[-1] self.components.fldImage.text = filename --- 37,52 ---- def on_btnForegroundColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result.accepted: ! self.components.fldForegroundColor.text = str(result.color) def on_btnBackgroundColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result.accepted: ! self.components.fldBackgroundColor.text = str(result.color) def on_btnFile_mouseClick(self, event): result = dialog.openFileDialog() ! if result.accepted: ! path = result.paths[0] filename = os.path.split(path)[-1] self.components.fldImage.text = filename *************** *** 55,60 **** wildcard = "Icon Files (*.ico)|*.ico|XPM Files (*.xpm)|*.xpm|All Files (*.*)|*.*" result = dialog.openFileDialog(wildcard=wildcard) ! if result['accepted']: ! path = result['paths'][0] filename = os.path.split(path)[-1] self.components.fldIcon.text = filename --- 55,60 ---- wildcard = "Icon Files (*.ico)|*.ico|XPM Files (*.xpm)|*.xpm|All Files (*.*)|*.*" result = dialog.openFileDialog(wildcard=wildcard) ! if result.accepted: ! path = result.paths[0] filename = os.path.split(path)[-1] self.components.fldIcon.text = filename Index: stackInfoDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/stackInfoDialog.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** stackInfoDialog.py 10 May 2004 05:02:50 -0000 1.8 --- stackInfoDialog.py 12 Aug 2004 19:14:23 -0000 1.9 *************** *** 17,18 **** --- 17,24 ---- self.components.fldName.text = rsrc.application.name + def stackInfoDialog(parent): + dlg = StackInfoDialog(parent, parent.rsrc) + result = dlg.showModal() + result.text = dlg.components.fldName.text + dlg.destroy() + return result Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** propertyEditor.py 11 Aug 2004 01:58:03 -0000 1.48 --- propertyEditor.py 12 Aug 2004 19:14:23 -0000 1.49 *************** *** 270,275 **** def on_wColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result['accepted']: ! self.components.wField.text = str(result['color']) def on_wFont_mouseClick(self, event): --- 270,275 ---- def on_wColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result.accepted: ! self.components.wField.text = str(result.color) def on_wFont_mouseClick(self, event): *************** *** 282,288 **** f = font.Font(desc) result = dialog.fontDialog(self, f) ! if result['accepted']: #color = dlg.getColor() ! f = result['font'] #self.components.wField.SetValue("%s;%s" % (f, color)) self.components.wField.text = "%s" % f --- 282,288 ---- f = font.Font(desc) result = dialog.fontDialog(self, f) ! if result.accepted: #color = dlg.getColor() ! f = result.font #self.components.wField.SetValue("%s;%s" % (f, color)) self.components.wField.text = "%s" % f |