~ubuntu-branches/ubuntu/hardy/mayavi2/hardy-backports

« back to all changes in this revision

Viewing changes to enthought.envisage/enthought/envisage/single_project/plugin_definition.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2008-07-25 09:03:34 UTC
  • mfrom: (2.2.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080725090334-1hbb9fn8b3as5qy0
Tags: 2.2.0-1~hardy1
Automated backport upload; no source changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
import os
17
17
 
18
18
# Enthought library imports
19
 
from enthought.envisage import ExtensionPoint, PluginDefinition
20
19
from enthought.envisage.action.action_plugin_definition import \
21
20
    Action, ActionSet, Group, Location, Menu
 
21
from enthought.envisage.api import \
 
22
     ExtensionPoint, PluginDefinition, find_definition
22
23
from enthought.envisage.core.core_plugin_definition import Preferences, \
23
24
    Runnable
24
25
from enthought.envisage.resource.resource_plugin_definition import \
40
41
# The plugin's globally unique identifier (also used as the prefix for all
41
42
# identifiers defined in this module).
42
43
ID = 'enthought.envisage.single_project'
 
44
IMAGE_PATH = find_definition( ID )
43
45
 
44
46
# The ID used for actions, groups, and menus that apply to the project view
45
47
# control when nothing is selected.
128
130
class NewProjectAction(Action):
129
131
    description = 'Create a project'
130
132
    id = 'NewProject'
131
 
    image = 'new_project'
 
133
    image = 'document-new'
 
134
    image_path = [IMAGE_PATH]
132
135
    method_name = 'create'
133
136
    name = '&New...'
134
137
    object = 'service://' + IPROJECT_UI
137
140
class OpenProjectAction(Action):
138
141
    description = 'Open an existing project'
139
142
    id = 'OpenProject'
140
 
    image = 'open_project'
 
143
    image = 'document-open'
 
144
    image_path = [IMAGE_PATH]
141
145
    method_name = 'open'
142
146
    name = '&Open...'
143
147
    object = 'service://' + IPROJECT_UI
148
152
    description = 'Save the current project'
149
153
    enabled = False
150
154
    id = 'SaveProject'
151
 
    image = 'save_project'
 
155
    image = 'document-save'
 
156
    image_path = [IMAGE_PATH]
152
157
    lazy_load = False
153
158
    name = '&Save'
154
159
    tooltip = 'Save this project'
158
163
    description = 'Save the current project to a different location'
159
164
    enabled = False
160
165
    id = 'SaveAsProject'
161
 
    image = 'save_as_project'
 
166
    image = 'document-save-as'
 
167
    image_path = [IMAGE_PATH]
162
168
    lazy_load = False
163
169
    name = 'Save &As...'
164
170
    tooltip = 'Save this project to a different location'
168
174
    description = 'Close the current project'
169
175
    enabled = False
170
176
    id = 'CloseProject'
171
 
    image = 'close_project'
 
177
    image = 'document-close'
 
178
    image_path = [IMAGE_PATH]
172
179
    lazy_load = False
173
180
    name = '&Close'
174
181
    tooltip = 'Close this project'
287
294
    defaults = {
288
295
        # Preferred path for saving/opening projects
289
296
        'preferred_path': os.path.expanduser('~'),
 
297
        'autosave_interval' : 5,
290
298
    }
291
299
)
292
300