Changeset 2122

Show
Ignore:
Timestamp:
09/14/07 12:22:42 (1 year ago)
Author:
wrobe..@pld-linux.org
Message:

- added better tooltips for class' attributes and operations tree views

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/trunk/gaphor/adapters/propertypages.py

    r2121 r2122  
    446446 
    447447 
    448 def create_tree_view(model, names): 
     448def create_tree_view(model, names, tip=""): 
    449449    """ 
    450450    Create a tree view for a editable tree model. 
     
    464464    tree_view.connect('key_press_event', swap_on_keypress) 
    465465 
    466     tip = """\ 
     466    tip = tip + """ 
    467467Press ENTER to edit item, BS/DEL to remove item. 
    468468Use -/= to move items up or down.\ 
     
    743743        self.model = ClassAttributes(self.context) 
    744744         
    745         tree_view = create_tree_view(self.model, (_('Attributes'),)) 
     745        tip = """\ 
     746Add and edit class attributes according to UML syntax. Attribute syntax examples 
     747- attr 
     748- + attr: int 
     749- # /attr: int 
     750""" 
     751        tree_view = create_tree_view(self.model, (_('Attributes'),), tip) 
    746752        page.pack_start(tree_view) 
    747753 
     
    790796 
    791797        self.model = ClassOperations(self.context) 
    792         tree_view = create_tree_view(self.model, (_('Operation'),)) 
     798        tip = """\ 
     799Add and edit class operations according to UML syntax. Operation syntax examples 
     800- call() 
     801- + call(a: int, b: str) 
     802- # call(a: int: b: str): bool 
     803""" 
     804        tree_view = create_tree_view(self.model, (_('Operation'),), tip) 
    793805        page.pack_start(tree_view) 
    794806