Debian Codegraph @

envisage/ui/workbench/workbench_preferences_page.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 """ The main preferences page for the workbench. """
11
12
13 # Enthought library imports.
14 from apptools.preferences.ui.api import PreferencesPage
15 from traits.api import Bool
16 from traitsui.api import View
17
18
19 class WorkbenchPreferencesPage(PreferencesPage):
20 """The main preferences page for the workbench."""
21
22 #### 'PreferencesPage' interface ##########################################
23
24 # The page's category (e.g. 'General/Appearance'). The empty string means
25 # that this is a top-level page.
26 category = ""
27
28 # The page's help identifier (optional). If a help Id *is* provided then
29 # there will be a 'Help' button shown on the preference page.
30 help_id = ""
31
32 # The page name (this is what is shown in the preferences dialog.
33 name = "General"
34
35 # The path to the preferences node that contains the preferences.
36 preferences_path = "envisage.ui.workbench"
37
38 #### Preferences ##########################################################
39
40 # Should the user be prompted before exiting the workbench?
41 prompt_on_exit = Bool(True)
42
43 #### Traits UI views ######################################################
44
45 trait_view = View("prompt_on_exit")