Changeset 2191
- Timestamp:
- 01/30/08 01:19:45 (10 months ago)
- Files:
-
- gaphor/trunk/gaphor/services/actionmanager.py (modified) (1 diff)
- gaphor/trunk/gaphor/services/filemanager.py (modified) (6 diffs)
- gaphor/trunk/gaphor/services/undomanager.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/gaphor/services/actionmanager.py
r1861 r2191 37 37 if a: 38 38 a.activate() 39 component.handle(ActionExecuted(action_id, a))39 self._app.handle(ActionExecuted(action_id, a)) 40 40 else: 41 41 log.warning('Unknown action: %s' % action_id) gaphor/trunk/gaphor/services/filemanager.py
r2151 r2191 121 121 filename = recent_files[index] 122 122 self._load(filename) 123 component.handle(FileManagerStateChanged(self))123 self._app.handle(FileManagerStateChanged(self)) 124 124 125 125 @action(name='file-new', stock_id='gtk-new') … … 150 150 main_window.show_diagram(diagram) 151 151 152 component.handle(FileManagerStateChanged(self))152 self._app.handle(FileManagerStateChanged(self)) 153 153 154 154 … … 249 249 # It's a template: unset filename 250 250 self.filename = None 251 component.handle(FileManagerStateChanged(self))251 self._app.handle(FileManagerStateChanged(self)) 252 252 253 253 … … 257 257 if filename: 258 258 self._load(filename) 259 component.handle(FileManagerStateChanged(self))259 self._app.handle(FileManagerStateChanged(self)) 260 260 261 261 … … 265 265 if filename: 266 266 self._save(filename) 267 component.handle(FileManagerStateChanged(self))267 self._app.handle(FileManagerStateChanged(self)) 268 268 else: 269 269 self.save_as() … … 284 284 filesel.destroy() 285 285 self._save(filename) 286 component.handle(FileManagerStateChanged(self))286 self._app.handle(FileManagerStateChanged(self)) 287 287 288 288 gaphor/trunk/gaphor/services/undomanager.py
r2099 r2191 166 166 167 167 self._current_transaction.add(action) 168 component.handle(UndoManagerStateChanged(self))168 self._app.handle(UndoManagerStateChanged(self)) 169 169 170 170 # TODO: should this be placed here? … … 188 188 189 189 self._current_transaction = None 190 component.handle(UndoManagerStateChanged(self))190 self._app.handle(UndoManagerStateChanged(self)) 191 191 self._action_executed() 192 192 … … 213 213 self.discard_transaction() 214 214 215 component.handle(UndoManagerStateChanged(self))215 self._app.handle(UndoManagerStateChanged(self)) 216 216 217 217 self._action_executed() … … 224 224 if self._transaction_depth == 0: 225 225 self._current_transaction = None 226 component.handle(UndoManagerStateChanged(self))226 self._app.handle(UndoManagerStateChanged(self)) 227 227 self._action_executed() 228 228 … … 246 246 self._current_transaction = None 247 247 self._transaction_depth = 0 248 component.handle(UndoManagerStateChanged(self))248 self._app.handle(UndoManagerStateChanged(self)) 249 249 self._action_executed() 250 250 … … 266 266 self._transaction_depth = 0 267 267 268 component.handle(UndoManagerStateChanged(self))268 self._app.handle(UndoManagerStateChanged(self)) 269 269 self._action_executed() 270 270 … … 331 331 except KeyError: 332 332 pass # Key was probably already removed in an unlink call 333 component.handle(ElementDeleteEvent(factory, element))333 self._app.handle(ElementDeleteEvent(factory, element)) 334 334 self.add_undo_action(_undo_create_event) 335 335 … … 345 345 def _undo_delete_event(): 346 346 factory._elements[element.id] = element 347 component.handle(ElementCreateEvent(factory, element))347 self._app.handle(ElementCreateEvent(factory, element)) 348 348 self.add_undo_action(_undo_delete_event) 349 349
