Changeset 2191

Show
Ignore:
Timestamp:
01/30/08 01:19:45 (10 months ago)
Author:
arj..@yirdis.nl
Message:

Services now use Application's handle() method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/trunk/gaphor/services/actionmanager.py

    r1861 r2191  
    3737        if a: 
    3838            a.activate() 
    39             component.handle(ActionExecuted(action_id, a)) 
     39            self._app.handle(ActionExecuted(action_id, a)) 
    4040        else: 
    4141            log.warning('Unknown action: %s' % action_id) 
  • gaphor/trunk/gaphor/services/filemanager.py

    r2151 r2191  
    121121        filename = recent_files[index] 
    122122        self._load(filename) 
    123         component.handle(FileManagerStateChanged(self)) 
     123        self._app.handle(FileManagerStateChanged(self)) 
    124124         
    125125    @action(name='file-new', stock_id='gtk-new') 
     
    150150        main_window.show_diagram(diagram) 
    151151 
    152         component.handle(FileManagerStateChanged(self)) 
     152        self._app.handle(FileManagerStateChanged(self)) 
    153153 
    154154 
     
    249249            # It's a template: unset filename 
    250250            self.filename = None 
    251             component.handle(FileManagerStateChanged(self)) 
     251            self._app.handle(FileManagerStateChanged(self)) 
    252252 
    253253 
     
    257257        if filename: 
    258258            self._load(filename) 
    259             component.handle(FileManagerStateChanged(self)) 
     259            self._app.handle(FileManagerStateChanged(self)) 
    260260 
    261261 
     
    265265        if filename: 
    266266            self._save(filename) 
    267             component.handle(FileManagerStateChanged(self)) 
     267            self._app.handle(FileManagerStateChanged(self)) 
    268268        else: 
    269269            self.save_as() 
     
    284284        filesel.destroy() 
    285285        self._save(filename) 
    286         component.handle(FileManagerStateChanged(self)) 
     286        self._app.handle(FileManagerStateChanged(self)) 
    287287 
    288288 
  • gaphor/trunk/gaphor/services/undomanager.py

    r2099 r2191  
    166166 
    167167        self._current_transaction.add(action) 
    168         component.handle(UndoManagerStateChanged(self)) 
     168        self._app.handle(UndoManagerStateChanged(self)) 
    169169 
    170170        # TODO: should this be placed here? 
     
    188188 
    189189            self._current_transaction = None 
    190         component.handle(UndoManagerStateChanged(self)) 
     190        self._app.handle(UndoManagerStateChanged(self)) 
    191191        self._action_executed() 
    192192 
     
    213213                self.discard_transaction() 
    214214 
    215             component.handle(UndoManagerStateChanged(self)) 
     215            self._app.handle(UndoManagerStateChanged(self)) 
    216216 
    217217        self._action_executed() 
     
    224224        if self._transaction_depth == 0: 
    225225            self._current_transaction = None 
    226         component.handle(UndoManagerStateChanged(self)) 
     226        self._app.handle(UndoManagerStateChanged(self)) 
    227227        self._action_executed() 
    228228 
     
    246246        self._current_transaction = None 
    247247        self._transaction_depth = 0 
    248         component.handle(UndoManagerStateChanged(self)) 
     248        self._app.handle(UndoManagerStateChanged(self)) 
    249249        self._action_executed() 
    250250 
     
    266266        self._transaction_depth = 0 
    267267 
    268         component.handle(UndoManagerStateChanged(self)) 
     268        self._app.handle(UndoManagerStateChanged(self)) 
    269269        self._action_executed() 
    270270 
     
    331331            except KeyError: 
    332332                pass # Key was probably already removed in an unlink call 
    333             component.handle(ElementDeleteEvent(factory, element)) 
     333            self._app.handle(ElementDeleteEvent(factory, element)) 
    334334        self.add_undo_action(_undo_create_event) 
    335335 
     
    345345        def _undo_delete_event(): 
    346346            factory._elements[element.id] = element 
    347             component.handle(ElementCreateEvent(factory, element)) 
     347            self._app.handle(ElementCreateEvent(factory, element)) 
    348348        self.add_undo_action(_undo_delete_event) 
    349349