Changeset 1174:ab29a90a7042
- Timestamp:
- 05/21/08 23:03:29 (22 months ago)
- Author:
- Tobias Eberle <info@…>
- Branch:
- default
- Message:
-
project: show "Project Properties" in popup menu in project list (fixed #149)
- Location:
- pida/services/project
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1158
|
r1174
|
|
| 129 | 129 | def on_project_ol__right_click(self, ol, project, event): |
| 130 | 130 | self.svc.boss.cmd('contexts', 'popup_menu', context='dir-menu', |
| 131 | | dir_name=project.source_directory, event=event) |
| | 131 | dir_name=project.source_directory, event=event, project=True) |
| 132 | 132 | |
| 133 | 133 | def set_current_project(self, project): |
| … |
… |
|
| 249 | 249 | self.subscribe_foreign('editor', 'started', |
| 250 | 250 | self.editor_started) |
| | 251 | self.subscribe_foreign('contexts', 'show-menu', self.show_menu) |
| | 252 | self.subscribe_foreign('contexts', 'menu-deactivated', |
| | 253 | self.menu_deactivated) |
| 251 | 254 | |
| 252 | 255 | def plugin_started(self, plugin): |
| … |
… |
|
| 259 | 262 | def editor_started(self): |
| 260 | 263 | self.svc.set_last_project() |
| | 264 | |
| | 265 | def show_menu(self, menu, context, **kw): |
| | 266 | if (context == 'dir-menu'): |
| | 267 | self.svc.get_action('project_properties').set_visible( |
| | 268 | kw.has_key('project')) |
| | 269 | |
| | 270 | def menu_deactivated(self, menu, context, **kw): |
| | 271 | if (context == 'dir-menu'): |
| | 272 | self.svc.get_action('project_properties').set_visible(True) |
| 261 | 273 | |
| 262 | 274 | |
| … |
… |
|
| 347 | 359 | def subscribe_all_foreign(self): |
| 348 | 360 | self.subscribe_foreign('project', IProjectController, GenericExecutionController) |
| | 361 | self.subscribe_foreign('contexts', 'dir-menu', |
| | 362 | (self.svc.get_action_group(), 'project-dir-menu.xml')) |
| 349 | 363 | |
| 350 | 364 | |