Changeset 1222

Show
Ignore:
Timestamp:
04/15/07 13:47:55 (2 years ago)
Author:
arj..@yirdis.nl
Message:

Added Properties service.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/trunk/gaphor/actions/mainactions.py

    r1219 r1222  
    681681    def get_menu(self): 
    682682        recent_files = resource('recent-files', []) 
    683         window = resource('MainWindow') 
     683        window = Application.get_service('gui_manager').main_window 
    684684        file_list = [] 
    685685        for f, i in zip(recent_files, xrange(len(recent_files))): 
  • gaphor/trunk/gaphor/data/plugins/checkmetamodel/checkmodelgui.py

    r565 r1222  
    99import gaphor 
    1010from gaphor.ui.abstractwindow import AbstractWindow 
    11 from gaphor.plugin import resource 
     11from gaphor.plugin import Application 
    1212import checkmodel 
    1313 
     
    7979        print 'Looking for element', element 
    8080        if element.presentation: 
    81             main_window = resource('MainWindow') 
     81            main_window = Application.get_service('gui_manager').main_window 
    8282            presentation = element.presentation[0] 
    8383            diagram = presentation.canvas.diagram 
  • gaphor/trunk/gaphor/diagram/tool.py

    r1216 r1222  
    245245        self.is_released = True 
    246246        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() 
    249249                pool.get_action('Pointer').active = True 
    250250            return gaphas.tool.PlacementTool.on_button_release(self, context, event) 
  • gaphor/trunk/gaphor/plugin.py

    r1135 r1222  
    22"""This module provides everything needed to create a plugin. 
    33 
    4 resource - Get/set application wide resources 
     4Application - Get/set application wide resources 
    55import_plugin - The save way to import other plugins into your plugin. 
    66 
     
    1919import os.path 
    2020from gaphor import resource 
     21from gaphor.application import Application 
    2122 
    2223from gaphor.misc.action import Action as _Action 
  • gaphor/trunk/setup.py

    r1209 r1222  
    7878        ], 
    7979        'gaphor.services': [ 
     80            'properties = gaphor.services.properties:Properties', 
    8081            'undo_manager = gaphor.services.undomanager:UndoManager', 
    8182            #'plugin_manager = gaphor.services.pluginmanager:PluginManager',