Changeset 1222
- Timestamp:
- 04/15/07 13:47:55 (2 years ago)
- Files:
-
- gaphor/trunk/gaphor/actions/mainactions.py (modified) (1 diff)
- gaphor/trunk/gaphor/data/plugins/checkmetamodel/checkmodelgui.py (modified) (2 diffs)
- gaphor/trunk/gaphor/diagram/tool.py (modified) (1 diff)
- gaphor/trunk/gaphor/plugin.py (modified) (2 diffs)
- gaphor/trunk/gaphor/services/properties.py (added)
- gaphor/trunk/gaphor/services/tests/test_properties.py (added)
- gaphor/trunk/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/gaphor/actions/mainactions.py
r1219 r1222 681 681 def get_menu(self): 682 682 recent_files = resource('recent-files', []) 683 window = resource('MainWindow')683 window = Application.get_service('gui_manager').main_window 684 684 file_list = [] 685 685 for f, i in zip(recent_files, xrange(len(recent_files))): gaphor/trunk/gaphor/data/plugins/checkmetamodel/checkmodelgui.py
r565 r1222 9 9 import gaphor 10 10 from gaphor.ui.abstractwindow import AbstractWindow 11 from gaphor.plugin import resource11 from gaphor.plugin import Application 12 12 import checkmodel 13 13 … … 79 79 print 'Looking for element', element 80 80 if element.presentation: 81 main_window = resource('MainWindow')81 main_window = Application.get_service('gui_manager').main_window 82 82 presentation = element.presentation[0] 83 83 diagram = presentation.canvas.diagram gaphor/trunk/gaphor/diagram/tool.py
r1216 r1222 245 245 self.is_released = True 246 246 try: 247 if resource('reset-tool-after-create', False):248 pool = resource('MainWindow').get_action_pool()247 if Application.get_service('properties')('reset-tool-after-create', False): 248 pool = Application.get_service('gui_manager').main_window.get_action_pool() 249 249 pool.get_action('Pointer').active = True 250 250 return gaphas.tool.PlacementTool.on_button_release(self, context, event) gaphor/trunk/gaphor/plugin.py
r1135 r1222 2 2 """This module provides everything needed to create a plugin. 3 3 4 resource- Get/set application wide resources4 Application - Get/set application wide resources 5 5 import_plugin - The save way to import other plugins into your plugin. 6 6 … … 19 19 import os.path 20 20 from gaphor import resource 21 from gaphor.application import Application 21 22 22 23 from gaphor.misc.action import Action as _Action gaphor/trunk/setup.py
r1209 r1222 78 78 ], 79 79 'gaphor.services': [ 80 'properties = gaphor.services.properties:Properties', 80 81 'undo_manager = gaphor.services.undomanager:UndoManager', 81 82 #'plugin_manager = gaphor.services.pluginmanager:PluginManager',
