From: Kevin A. <ka...@us...> - 2004-08-22 19:11:44
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29030/tools/resourceEditor Modified Files: resourceEditor.py Log Message: added function wrappers for dialogInfoDialog, menuDialog, and stringDialog Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** resourceEditor.py 22 Aug 2004 18:44:53 -0000 1.209 --- resourceEditor.py 22 Aug 2004 19:11:34 -0000 1.210 *************** *** 21,27 **** from modules import stackInfoDialog from modules import menuDialog ! from modules.newComponentDialog import newComponentDialog from modules import stringDialog ! from modules.dialogInfoDialog import DialogInfoDialog from modules.propertyEditor import PropertyEditor from modules import resourceOutput --- 21,27 ---- from modules import stackInfoDialog from modules import menuDialog ! from modules import newComponentDialog from modules import stringDialog ! from modules import dialogInfoDialog from modules.propertyEditor import PropertyEditor from modules import resourceOutput *************** *** 1033,1037 **** optionalAttributes = registry.Registry.getInstance().components[desc['type']]._spec._optionalAttributes.keys() ! result = newComponentDialog(self, desc, optionalAttributes, offsets, promptString) if result.accepted: name = result.name --- 1033,1037 ---- optionalAttributes = registry.Registry.getInstance().components[desc['type']]._spec._optionalAttributes.keys() ! result = newComponentDialog.newComponentDialog(self, desc, optionalAttributes, offsets, promptString) if result.accepted: name = result.name *************** *** 1310,1323 **** background.position = self.GetPositionTuple() background.size = self.GetSizeTuple() ! dlg = DialogInfoDialog(self, background) ! result = dlg.showModal() if result.accepted: ! background.name = dlg.components.fldName.text ! background.title = dlg.components.fldTitle.text ! background.position = eval(dlg.components.fldPosition.text) ! background.size = eval(dlg.components.fldSize.text) self.updatePanel(self.rsrc) self.documentChanged = True - dlg.destroy() --- 1310,1321 ---- background.position = self.GetPositionTuple() background.size = self.GetSizeTuple() ! result = dialogInfoDialog.dialogInfoDialog(self, background) if result.accepted: ! background.name = result.name ! background.title = result.title ! background.position = result.position ! background.size = result.size self.updatePanel(self.rsrc) self.documentChanged = True *************** *** 1327,1339 **** except: menubar = None ! dlg = menuDialog.MenuDialog(self, menubar) ! result = dlg.showModal() if result.accepted: ! if len(dlg.menuList) == 0: ! self.rsrc.application.backgrounds[0].menubar = None ! else: ! self.rsrc.application.backgrounds[0].menubar = menuDialog.menuResourceFromList(dlg.menuList) self.documentChanged = True - dlg.destroy() def on_editStrings_command(self, event): --- 1325,1332 ---- except: menubar = None ! result = menuDialog.menuDialog(self, menubar) if result.accepted: ! self.rsrc.application.backgrounds[0].menubar = result.menubar self.documentChanged = True def on_editStrings_command(self, event): *************** *** 1348,1360 **** except: stringList = {} ! dlg = stringDialog.StringDialog(self, stringList) ! result = dlg.showModal() if result.accepted: if self.editingDialog: ! self.rsrc.strings = stringDialog.stringResourceFromList(dlg.stringList) else: ! self.rsrc.application.backgrounds[0].strings = stringDialog.stringResourceFromList(dlg.stringList) self.documentChanged = True - dlg.destroy() --- 1341,1351 ---- except: stringList = {} ! result = stringDialog.stringDialog(self, stringList) if result.accepted: if self.editingDialog: ! self.rsrc.strings = result.stringList else: ! self.rsrc.application.backgrounds[0].strings = result.stringList self.documentChanged = True |