Changeset 1322
- Timestamp:
- 05/30/07 23:51:38 (1 year ago)
- Files:
-
- gaphor/trunk/FAQ (modified) (1 diff)
- gaphor/trunk/TODO (modified) (1 diff)
- gaphor/trunk/gaphor/adapters/propertypages.py (modified) (2 diffs)
- gaphor/trunk/gaphor/diagram/interface.py (modified) (2 diffs)
- gaphor/trunk/gaphor/diagram/nameditem.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/FAQ
r463 r1322 2 2 ========================== 3 3 4 Q: I have installed DiaCanvas2 and everything went okay, however when I do a 5 "python setup.py config" it complains that it can not find DiaCanvas. 4 Q: Does Gaphor work on Windows 6 5 7 A: There is a good chance the diacanvas-python module is installed correctly, 8 but in /usr/local/lib/python2.[23]/site-packages. The easiest solution is 9 to add this directory to your PYTHONPATH environment variable: 6 A: Yes it does. Check out the gaphor-win32-libs package in Gaphor's subversion 7 repository. It contains all the libraries required to get Gaphor up and 8 running. All you need more is a Python 2.4 installation (the libraries are 9 compiled for Python 2.4, not 2.5). 10 10 11 export PYTHONPATH=/usr/local/lib/python2.[23]/site-packages12 13 As an alternative a setup.py script is provided in the python/ directory14 in the diacanvas2 source distribution.15 gaphor/trunk/TODO
r1291 r1322 7 7 Use a more recent version 8 8 9 - Popups for diagram items should be aranged through 10 <popup action='<class>-item-popup'>..</>. 11 - popups is a UI thing. Create adapters? 12 - Separate service for stereotype handling 13 - popups should be aware of the cursor position (e.g. near the end of a 14 line). (+1 for adapters) 15 - ... 9 - allow comments to render multi-line. 10 11 - add more property pages. 16 12 17 13 - Load / save regression testing 18 14 !!! Create some example diagrams, 19 15 20 - get rid of resource(). Create an Application instance instead (should21 make unit testing easier too).22 This should get rid of the pseudo singletons (_default* instances per module)23 - replace DataDir code with pkg_resources (ui.stock)24 - copy-buffer (separate copy service?)25 - make a service of ElementFactory26 27 16 - using stereotypes 28 17 - reimplement the mechanism that adds already existing relationships to the gaphor/trunk/gaphor/adapters/propertypages.py
r1319 r1322 6 6 # being edited. 7 7 8 TODO: 9 - stereotypes 10 - association / association ends. 11 - 8 12 """ 9 13 … … 88 92 89 93 component.provideAdapter(ClassPropertyPage, name='Properties') 94 95 96 class InterfacePropertyPage(NamedItemPropertyPage): 97 """ 98 Adapter which shows a property page for an interface view. 99 """ 100 101 interface.implements(IPropertyPage) 102 component.adapts(items.InterfaceItem) 103 104 def __init__(self, context): 105 super(InterfacePropertyPage, self).__init__(context) 106 107 def construct(self): 108 page = super(InterfacePropertyPage, self).construct() 109 110 # Fold toggle 111 hbox = gtk.HBox() 112 label = gtk.Label(_("Fold")) 113 label.set_justify(gtk.JUSTIFY_LEFT) 114 self.size_group.add_widget(label) 115 hbox.pack_start(label, expand=False) 116 button = gtk.CheckButton() 117 button.set_active(self.context.folded) 118 button.connect('toggled', self._on_fold_change) 119 hbox.pack_start(button) 120 hbox.show_all() 121 page.pack_start(hbox, expand=False) 122 123 hbox.show_all() 124 125 page.pack_start(hbox, expand=True) 126 127 return page 128 129 def _on_fold_change(self, button): 130 self.context.folded = button.get_active() 131 132 component.provideAdapter(InterfacePropertyPage, name='Properties') 90 133 91 134 gaphor/trunk/gaphor/diagram/interface.py
r1178 r1322 83 83 return self.drawing_style == self.DRAW_ICON 84 84 85 def _set_folded(self, folded): 86 if folded: 87 self.drawing_style = self.DRAW_ICON 88 for h in self._handles: h.movable = False 89 else: 90 self.drawing_style = self.DRAW_COMPARTMENT 91 for h in self._handles: h.movable = True 92 93 folded = property(is_folded, _set_folded) 94 85 95 def pre_update_icon(self, context): 86 96 """ … … 88 98 assembled (wired) or dotted (minimal) look. 89 99 """ 90 for h in self._handles: h.movable = False91 self.style.name_outside = True92 93 100 h_nw = self._handles[NW] 94 101 cx, cy = h_nw.x + self.width/2, h_nw.y + self.height/2 gaphor/trunk/gaphor/diagram/nameditem.py
r1201 r1322 39 39 self._name_size = (0, 0) 40 40 41 def on_subject_notify(self, pspec, notifiers=()): 42 #log.debug('Class.on_subject_notify(%s, %s)' % (pspec, notifiers)) 43 ElementItem.on_subject_notify(self, pspec, ('name',) + notifiers) 44 45 def on_subject_notify__name(self, subject, pspec=None): 46 self.request_update() 41 47 42 48 def get_name_size(self):
