Changeset 3826

Show
Ignore:
Timestamp:
12/20/07 18:14:36 (1 year ago)
Author:
ed
Message:

Added some missing context menu items to grid sizers.

Changed the docstring for the RegID property to the docstring in the framework. The old one explained the difference in the Class Designer code, and not its actual usage.

Changed the tree sheet to use makeProxyProperty() to simplify the code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ide/ClassDesignerComponents.py

    r3770 r3826  
    14661466            pop.appendSeparator() 
    14671467            pop.append(_("Edit Sizer Settings"), OnHit=self.onEditSizer) 
     1468            self.Controller.addSlotOptions(self, pop, sepBefore=True) 
    14681469        return pop 
    14691470 
  • trunk/ide/ClassDesignerControlMixin.py

    r3730 r3826  
    780780                "ShowPanelSplitMenu" : {"type" : bool, "readonly" : False}, 
    781781                "Split" : {"type" : bool, "readonly" : False}} 
    782         spinnerProps = {"Max": {"type" : int, "readonly" : False}, 
     782        spinnerProps = { 
     783#               "Increment": {"type": float, "readonly": False}, 
     784                "Max": {"type" : int, "readonly" : False}, 
    783785                "Min": {"type" : int, "readonly" : False}, 
    784786                "SpinnerWrap": {"type" : bool, "readonly" : False}} 
     
    12691271            main control?  (bool)""")) 
    12701272     
     1273    # Placeholder for the actual RegID property 
    12711274    RegID = property(_getRegID, _setRegID, None, 
    1272             _("Placeholder for the actual RegID property  (str)"))  
     1275            _("A unique identifier used for referencing by other objects. (str)")) 
    12731276     
    12741277    Selected = property(_getSelected, _setSelected, None, 
  • trunk/ide/ClassDesignerTreeSheet.py

    r3515 r3826  
    1717from MenuDesignerComponents import SeparatorPanel 
    1818dui = dabo.ui 
     19from dabo.ui import makeProxyProperty 
    1920 
    2021 
    2122class TreeSheet(dui.dPanel): 
     23    def _initProperties(self): 
     24        self.tree = None 
     25        return super(TreeSheet, self)._initProperties() 
     26         
     27     
     28    def _constructed(self): 
     29        return hasattr(self, "tree") and isinstance(self.tree, dui.dTreeView) 
     30         
     31         
    2232    def afterInit(self): 
    2333        self._slotCaption = _("Empty Sizer Slot") 
    2434        self._spacerCaption = _("Spacer") 
    25         self.tree = dui.dTreeView(self, MultipleSelect=self.MultipleSelect,  
    26                 ShowButtons=True) 
     35        self.tree = dui.dTreeView(self, ShowButtons=True) 
    2736        plat = self.Application.Platform 
    2837        if plat == "Mac": 
     
    412421 
    413422 
    414   def _getMultipleSelect(self): 
    415       try: 
    416           ret = self._multipleSelect 
    417       except AttributeError: 
    418           ret = self._multipleSelect = True 
    419       return ret 
    420  
    421   def _setMultipleSelect(self, val): 
    422       if self._constructed(): 
    423           self._multipleSelect = val 
    424           try: 
    425               self.tree.MultipleSelect = val 
    426           except AttributeError: 
    427               # tree isn't constructed yet 
    428                dabo.ui.setAfter(self.Tree, "MultipleSelect", val) 
    429       else: 
    430           self._properties["MultipleSelect"] = val 
     423#     def _getMultipleSelect(self): 
     424#         try: 
     425#             ret = self._multipleSelect 
     426#         except AttributeError: 
     427#             ret = self._multipleSelect = True 
     428#         return ret 
     429#  
     430#     def _setMultipleSelect(self, val): 
     431#         if self._constructed(): 
     432#             self._multipleSelect = val 
     433#             try: 
     434#                 self.tree.MultipleSelect = val 
     435#             except AttributeError: 
     436#                 # tree isn't constructed yet 
     437#              dabo.ui.setAfter(self.tree, "MultipleSelect", val) 
     438#         else: 
     439#             self._properties["MultipleSelect"] = val 
    431440 
    432441 
     
    434443            _("Object to which this one reports events  (object (varies))")) 
    435444 
    436     MultipleSelect = property(_getMultipleSelect, _setMultipleSelect, None, 
    437             _("Determines if the tree supports multiple selection  (bool)")) 
    438      
     445#   MultipleSelect = property(_getMultipleSelect, _setMultipleSelect, None, 
     446#           _("Determines if the tree supports multiple selection  (bool)")) 
     447     
     448    _proxyDict = {} 
     449    MultipleSelect = makeProxyProperty(_proxyDict, "MultipleSelect", "tree", )