From: Alex T. <ale...@us...> - 2005-10-27 22:54:49
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3840/modules Modified Files: multipropertyEditor.py multipropertyEditor.rsrc.py Log Message: Add option of alphabetizing component list. Index: multipropertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/multipropertyEditor.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** multipropertyEditor.py 1 Aug 2005 11:18:14 -0000 1.4 --- multipropertyEditor.py 27 Oct 2005 22:54:41 -0000 1.5 *************** *** 43,46 **** --- 43,50 ---- self.standardPrefixes = ["txt", "fld", "btn", "chk", "pop", "clr", "fnt"] + self.compOrderControls = ['SendToBack', 'MoveBack', + 'reLayer', 'MoveTogether', + 'MoveForward', 'SendToFront'] + self.multiCompControls = ['stbAlign', 'alignRight', 'alignLeft', 'alignTop', 'alignBottom', *************** *** 204,207 **** --- 208,212 ---- if not self._parent.multipleSelected: return + self.components.alphabetizeComponents.enabled = False ###### multicol ###### lastList = self.components.wComponentList.getStringSelection() *************** *** 773,776 **** --- 778,784 ---- def clearPropertyList(self): self.PropertyListClear() + + def on_alphabetizeComponents_mouseClick(self, event): + self.displayComponents(self._comp) *************** *** 779,794 **** self.components.wComponentList.Clear() if self._parent.multipleSelected: for c in self.multiCompControls: self.components[c].visible = True for c,pref in self._parent.multipleComponents: ! self.addWidgetToComponentList(self._comp[c]) else: for c in self.multiCompControls: self.components[c].visible = False self._comp = components ! for c in components.order: ! #print "display", c, self._parent.isSizingHandle(c) ! if c not in self._parent.sizingHandleNames and not self._parent.isSizingHandle(c): ! self.addWidgetToComponentList(components[c]) self.components.wComponentList.Thaw() self.components.wComponentList.Refresh() --- 787,820 ---- self.components.wComponentList.Clear() if self._parent.multipleSelected: + self.components.alphabetizeComponents.enabled = False for c in self.multiCompControls: self.components[c].visible = True for c,pref in self._parent.multipleComponents: ! self.addWidgetToComponentList(self._comp[c]) ! else: + self.components.alphabetizeComponents.enabled = True for c in self.multiCompControls: self.components[c].visible = False self._comp = components ! #rint "here ", self.components.alphabetizeComponents.checked ! if self.components.alphabetizeComponents.checked: ! for c in self.compOrderControls: ! self.components[c].enabled = False ! xxx = [] ! for c in components.order: ! #print "display", c, self._parent.isSizingHandle(c) ! if c not in self._parent.sizingHandleNames and not self._parent.isSizingHandle(c): ! xxx.append(components[c]) ! xxx.sort() ! for c in xxx: ! self.addWidgetToComponentList(c) ! else: ! for c in self.compOrderControls: ! self.components[c].enabled = True ! for c in components.order: ! #print "display", c, self._parent.isSizingHandle(c) ! if c not in self._parent.sizingHandleNames and not self._parent.isSizingHandle(c): ! self.addWidgetToComponentList(components[c]) self.components.wComponentList.Thaw() self.components.wComponentList.Refresh() Index: multipropertyEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/multipropertyEditor.rsrc.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** multipropertyEditor.rsrc.py 27 Jul 2005 21:47:51 -0000 1.1 --- multipropertyEditor.rsrc.py 27 Oct 2005 22:54:41 -0000 1.2 *************** *** 12,15 **** --- 12,21 ---- {'type':'CheckBox', + 'name':'alphabetizeComponents', + 'position':(5, 231), + 'label':'Alphabetize Components', + }, + + {'type':'CheckBox', 'name':'chkallowNameLabelVariation', 'position':(149, 24), *************** *** 20,24 **** {'type':'ImageButton', 'name':'SendToBack', ! 'position':(8, 244), 'size':(24, 32), 'border':'3d', --- 26,30 ---- {'type':'ImageButton', 'name':'SendToBack', ! 'position':(8, 301), 'size':(24, 32), 'border':'3d', *************** *** 30,34 **** {'type':'ImageButton', 'name':'MoveBack', ! 'position':(32, 244), 'size':(24, 32), 'border':'3d', --- 36,40 ---- {'type':'ImageButton', 'name':'MoveBack', ! 'position':(32, 301), 'size':(24, 32), 'border':'3d', *************** *** 40,44 **** {'type':'ImageButton', 'name':'reLayer', ! 'position':(56, 276), 'size':(32, 32), 'border':'3d', --- 46,50 ---- {'type':'ImageButton', 'name':'reLayer', ! 'position':(56, 333), 'size':(32, 32), 'border':'3d', *************** *** 50,54 **** {'type':'ImageButton', 'name':'MoveTogether', ! 'position':(56, 244), 'size':(32, 32), 'border':'3d', --- 56,60 ---- {'type':'ImageButton', 'name':'MoveTogether', ! 'position':(56, 301), 'size':(32, 32), 'border':'3d', *************** *** 60,64 **** {'type':'ImageButton', 'name':'MoveForward', ! 'position':(88, 244), 'size':(24, 32), 'border':'3d', --- 66,70 ---- {'type':'ImageButton', 'name':'MoveForward', ! 'position':(88, 301), 'size':(24, 32), 'border':'3d', *************** *** 70,74 **** {'type':'ImageButton', 'name':'SendToFront', ! 'position':(112, 244), 'size':(24, 32), 'border':'3d', --- 76,80 ---- {'type':'ImageButton', 'name':'SendToFront', ! 'position':(112, 301), 'size':(24, 32), 'border':'3d', *************** *** 255,260 **** 'position':(356, 135), 'size':(35, -1), ! 'command':'color', ! 'label':'...', }, --- 261,266 ---- 'position':(356, 135), 'size':(35, -1), ! 'command':'color', ! 'label':'...', }, *************** *** 264,268 **** 'size':(35, -1), 'command':'color', ! 'label':'...', }, --- 270,274 ---- 'size':(35, -1), 'command':'color', ! 'label':'...', }, *************** *** 301,305 **** 'name':'fldfont', 'position':(250, 234), - 'size':(100, -1), }, --- 307,310 ---- *************** *** 489,493 **** {'type':'List', 'name':'wComponentList', ! 'position':(5, 20), 'size':(134, 204), 'items':[], --- 494,498 ---- {'type':'List', 'name':'wComponentList', ! 'position':(7, 21), 'size':(134, 204), 'items':[], |