Changeset 1336

Show
Ignore:
Timestamp:
06/05/07 23:33:45 (1 year ago)
Author:
arj..@yirdis.nl
Message:

fixed attribute page; don't show association ends.

Files:

Legend:

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

    r1335 r1336  
    1818from zope import interface, component 
    1919from gaphor import UML 
     20from gaphor.UML.umllex import parse_attribute, render_attribute 
    2021import gaphas.item 
    2122 
     
    4445        hbox.pack_start(label, expand=False) 
    4546        entry = gtk.Entry()         
    46         entry.set_text(self.context.subject.name or '') 
     47        entry.set_text(self.context.subject and self.context.subject.name or '') 
    4748        entry.connect('changed', self._on_name_change) 
    4849        hbox.pack_start(entry) 
     
    170171         
    171172        for attribute in self.context.subject.ownedAttribute: 
    172             attributes.append([attribute.render(), attribute]) 
     173            if not attribute.association: 
     174                attributes.append([attribute.render(), attribute]) 
    173175        attributes.append(['', None]) 
    174176         
     
    181183        renderer.set_property('editable', True) 
    182184        renderer.connect("edited", self._on_cell_edited, 0) 
    183         tag_column = gtk.TreeViewColumn('Attribute', renderer, text=0) 
     185        tag_column = gtk.TreeViewColumn('Attributes', renderer, text=0) 
    184186        tree_view.append_column(tag_column) 
    185187         
     
    476478 
    477479    def __init__(self, context): 
    478         super(AssociationPropertyPage, self).__init__(
    479         self.context = context 
    480         self.size_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) 
     480        super(AssociationPropertyPage, self).__init__(context
     481        #self.context = context 
     482        #self.size_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) 
    481483         
    482484    def construct(self):