Changeset 193
- Timestamp:
- 04/01/03 10:33:35 (6 years ago)
- Files:
-
- trunk/gaphor/ChangeLog (modified) (1 diff)
- trunk/gaphor/TODO (modified) (2 diffs)
- trunk/gaphor/data/gaphor-diagram-ui.xml (modified) (5 diffs)
- trunk/gaphor/gaphor/ui/commandregistry.py (modified) (1 diff)
- trunk/gaphor/gaphor/ui/diagramwindow.py (modified) (1 diff)
- trunk/gaphor/setup.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gaphor/ChangeLog
r192 r193 1 2002-03-31 Arjan Molenaar <arjanmolenaar@hetnet.nl> 2 3 * setup.py: check versions of modules. 4 1 5 2002-03-22 Arjan Molenaar <arjanmolenaar@hetnet.nl> 2 6 trunk/gaphor/TODO
r191 r193 8 8 - Items visible/hidden doesn't work properly when opening a diagram. 9 9 10 ---11 It seems like PyObject's do not live as long as GObject objects. Once a PyObject12 object has no references to itself, it can be destroyed (or at least it's13 dictionary can). This should have been prevented in the pygobject_dealloc()14 function in the PyGTK package. For most items there is no problem, since they15 are referenced by a UML modelelement. Some, such as CommentLineItem, end up16 with an empty dictionary after loading.17 18 Currently gaphor/storage.py contains a lot of debug stuff, COmmentLineItem uses19 get/set_data to store its id.20 ---21 10 - Diagram items should be created for lots of model elements 22 11 (we currently have Actor, UseCase, Comment and the fancy line that connects … … 42 31 - A more pattern driven design (using Factories, Singletons etc.). We're doing 43 32 a pretty good job already, though... 44 - Add features to classes (attribute and operation).45 33 - Let commands determine if they are visible/sensible, instead of a 34 has_capability function on the diagram item. 46 35 - Create a Classifier item, which should function as superclass for Class, 47 36 Interface, Stereotype, Datatype, etc. trunk/gaphor/data/gaphor-diagram-ui.xml
r185 r193 61 61 <!-- Generic popup menu: --> 62 62 <popup name="DiagramView"> 63 <menuitem name="EditDelete" verb=""/>64 <separator/>65 63 <!-- For classes: --> 66 64 <menuitem name="CreateAttribute" verb=""/> … … 73 71 <menuitem name="Orthogonal" verb="" type="toggle"/> 74 72 <separator/> 73 <menuitem name="EditDelete" verb=""/> 74 <menuitem name="DeleteAttribute" verb=""/> 75 <menuitem name="DeleteOperation" verb=""/> 76 <separator/> 75 77 <menuitem name="SnapToGrid" verb="" type="toggle"/> 76 78 </popup> … … 79 81 item they are meny to be used for. --> 80 82 <popup name="Association"> 81 <menuitem name="EditDelete" verb=""/>82 <separator/>83 83 <menuitem name="AddSegment" verb=""/> 84 84 <menuitem name="DeleteSegment" verb=""/> … … 86 86 <separator/> 87 87 <submenu _label="Side A"> 88 <menuitem name="Head_isNavigable" verb="" type="toggle"/> 89 <separator/> 90 <menuitem name="Head_None" verb="" type="radio" group="ak_head"/> 91 <menuitem name="Head_Aggregate" verb="" type="radio" group="ak_head"/> 92 <menuitem name="Head_Composite" verb="" type="radio" group="ak_head"/> 93 </submenu> 94 <submenu _label="Side B"> 88 95 <menuitem name="Tail_isNavigable" verb="" type="toggle"/> 89 96 <separator/> … … 92 99 <menuitem name="Tail_Composite" verb="" type="radio" group="ak_tail"/> 93 100 </submenu> 94 <submenu _label="Side B"> 95 <menuitem name="Head_isNavigable" verb="" type="toggle"/> 96 <separator/> 97 <menuitem name="Head_None" verb="" type="radio" group="ak_head"/> 98 <menuitem name="Head_Aggregate" verb="" type="radio" group="ak_head"/> 99 <menuitem name="Head_Composite" verb="" type="radio" group="ak_head"/> 100 </submenu> 101 <separator/> 102 <menuitem name="EditDelete" verb=""/> 101 103 <separator/> 102 104 <menuitem name="SnapToGrid" verb="" type="toggle"/> trunk/gaphor/gaphor/ui/commandregistry.py
r185 r193 17 17 18 18 def __call__(self, ui_component, name, type=-1, state=0): 19 print 'CommandExecuter.__call__:', ui_component, name, type, state19 #print 'CommandExecuter.__call__:', ui_component, name, type, state 20 20 if not self.executing: 21 21 self.executing = 1 trunk/gaphor/gaphor/ui/diagramwindow.py
r191 r193 73 73 self._construct_window(name='diagram', 74 74 title=title, 75 size=( 400, 400),75 size=(550, 550), 76 76 contents=table, 77 77 params={ 'window': self }) trunk/gaphor/setup.py
r191 r193 37 37 38 38 user_options = [ 39 ('pkg-config=', None, 'Path to pkg-config'),39 #('pkg-config=', None, 'Path to pkg-config'), 40 40 ] 41 41 42 pkg_config_checked=False43 config_failed= False42 #pkg_config_checked=False 43 config_failed=[] 44 44 45 45 def initialize_options(self): 46 self.pkg_config = 'pkg-config' 46 #self.pkg_config = 'pkg-config' 47 pass 47 48 48 49 def finalize_options(self): 49 50 # Check for existence of pkg-config 50 status, output = getstatusoutput('%s --version' % self.pkg_config) 51 if status != 0: 52 print 'pkg-config not found.' 53 raise SystemExit 54 print 'Found pkg-config version %s' % output 51 #status, output = getstatusoutput('%s --version' % self.pkg_config) 52 #if status != 0: 53 # print 'pkg-config not found.' 54 # raise SystemExit 55 #print 'Found pkg-config version %s' % output 56 pass 55 57 56 58 def run(self): … … 64 66 65 67 self.module_check('xml.parsers.expat') 66 self.module_check('gobject') 68 #self.module_check('gobject', 'glib_version', (2, 0)) 69 self.module_check('gtk', 'gtk_version', (2, 0), 70 'pygtk_version', (1, 99, 16)) 67 71 self.module_check('gnome') 68 72 self.module_check('gnome.ui') … … 71 75 self.module_check('bonobo.ui') 72 76 self.module_check('gconf') 73 self.module_check('diacanvas') 74 77 self.module_check('diacanvas', 'diacanvas_version', (0, 9, 2)) 78 79 print '' 75 80 if self.config_failed: 76 81 print 'Config failed.' 82 print 'The following modules can not be found or are to old:' 83 print ' ', str(self.config_failed)[1:-1] 84 print '' 77 85 raise SystemExit 86 else: 87 print 'Config succeeded.' 88 print 'You can run Gaphor by typing: python setup.py run' 78 89 79 90 def pkg_config_check(self, package, version): … … 82 93 if retval: 83 94 print '!!! Required package %s not found.' % package 84 self.config_failed = True95 self.config_failed.append(package) 85 96 return 86 97 pkg_version_str = getoutput('%s --modversion %s' % (self.pkg_config, package)) … … 91 102 else: 92 103 print "!!! Package '%s' has version %s, should have at least version %s." % ( package, pkg_version_str, version ) 93 self.config_failed = True 94 95 def module_check(self, module): 104 self.config_failed.append(package) 105 106 def module_check(self, module, *version_checks): 107 """Check for the availability of a module. 108 109 version_checks is a set of ket/version pairs that should be true. 110 """ 96 111 try: 97 __import__(module)112 mod = __import__(module) 98 113 except ImportError: 99 114 print "!!! Required module '%s' not found." % module 100 self.config_failed = True115 self.config_failed.append(module) 101 116 else: 102 117 print "Module '%s' found." % module 103 118 while version_checks: 119 self.version_check(mod, version_checks[0], version_checks[1]) 120 version_checks = version_checks[2:] 121 122 def version_check(self, module, key, ver): 123 import string 124 s_ver = string.join(map(str, ver), '.') 125 print " Checking key '%s.%s' >= %s..." % (module.__name__, key, s_ver), 126 try: 127 modver = getattr(module, key) 128 except: 129 print "Not found." % key 130 self.config_failed.append(module.__name__) 131 else: 132 s_modver = string.join(map(str, modver), '.') 133 if modver >= ver: 134 print "Okay (%s)." % s_modver 135 else: 136 print "Failed (%s)" % s_modver 137 self.config_failed.append(module.__name__) 104 138 105 139 class build_py_Gaphor(build_py):
