Debian Codegraph @

envisage/ui/workbench/action/exit_action.py

raw
1 # (C) Copyright 2007-2025 Enthought, Inc., Austin, TX
2 # All rights reserved.
3 #
4 # This software is provided without warranty under the terms of the BSD
5 # license included in LICENSE.txt and may be redistributed only under
6 # the conditions described in the aforementioned license. The license
7 # is also available online at http://www.enthought.com/licenses/BSD.txt
8 #
9 # Thanks for using Enthought open source!
10 """ An action that exits the workbench. """
11
12
13 from pyface.action.api import Action
14
15 # Enthought library imports.
16 from pyface.api import ImageResource
17
18
19 class ExitAction(Action):
20 """An action that exits the workbench."""
21
22 #### 'Action' interface ###################################################
23
24 # A longer description of the action.
25 description = "Exit the application"
26
27 # The action's image (displayed on tool bar tools etc).
28 image = ImageResource("exit")
29
30 # The action's name (displayed on menus/tool bar tools etc).
31 name = "Exit"
32
33 # A short description of the action used for tooltip text etc.
34 tooltip = "Exit the application"
35
36 ###########################################################################
37 # 'Action' interface.
38 ###########################################################################
39
40 def perform(self, event):
41 """Perform the action."""
42
43 self.window.application.exit()