diff options
Diffstat (limited to 'grc/gui/Constants.py')
-rw-r--r-- | grc/gui/Constants.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/grc/gui/Constants.py b/grc/gui/Constants.py index 022564cd77..2f0f7794be 100644 --- a/grc/gui/Constants.py +++ b/grc/gui/Constants.py @@ -17,7 +17,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ -import gtk +from __future__ import absolute_import + +from gi.repository import Gtk from ..core.Constants import * @@ -25,10 +27,6 @@ from ..core.Constants import * # default path for the open/save dialogs DEFAULT_FILE_PATH = os.getcwd() -# file extensions -IMAGE_FILE_EXTENSION = '.png' -TEXT_FILE_EXTENSION = '.txt' - # name for new/unsaved flow graphs NEW_FLOGRAPH_TITLE = 'untitled' @@ -36,7 +34,7 @@ NEW_FLOGRAPH_TITLE = 'untitled' MIN_WINDOW_WIDTH = 600 MIN_WINDOW_HEIGHT = 400 # dialog constraints -MIN_DIALOG_WIDTH = 500 +MIN_DIALOG_WIDTH = 600 MIN_DIALOG_HEIGHT = 500 # default sizes DEFAULT_BLOCKS_WINDOW_WIDTH = 100 @@ -53,7 +51,7 @@ PARAM_FONT = "Sans 7.5" STATE_CACHE_SIZE = 42 # Shared targets for drag and drop of blocks -DND_TARGETS = [('STRING', gtk.TARGET_SAME_APP, 0)] +DND_TARGETS = [('STRING', Gtk.TargetFlags.SAME_APP, 0)] # label constraint dimensions LABEL_SEPARATION = 3 @@ -70,6 +68,7 @@ PORT_SEPARATION = 32 PORT_MIN_WIDTH = 20 PORT_LABEL_HIDDEN_WIDTH = 10 +PORT_EXTRA_BUS_HEIGHT = 40 # minimal length of connector CONNECTOR_EXTENSION_MINIMAL = 11 @@ -84,11 +83,8 @@ CONNECTOR_ARROW_HEIGHT = 17 # possible rotations in degrees POSSIBLE_ROTATIONS = (0, 90, 180, 270) -# How close can the mouse get to the window border before mouse events are ignored. -BORDER_PROXIMITY_SENSITIVITY = 50 - # How close the mouse can get to the edge of the visible window before scrolling is invoked. -SCROLL_PROXIMITY_SENSITIVITY = 30 +SCROLL_PROXIMITY_SENSITIVITY = 50 # When the window has to be scrolled, move it this distance in the required direction. SCROLL_DISTANCE = 15 @@ -96,6 +92,13 @@ SCROLL_DISTANCE = 15 # How close the mouse click can be to a line and register a connection select. LINE_SELECT_SENSITIVITY = 5 +DEFAULT_BLOCK_MODULE_TOOLTIP = """\ +This subtree holds all blocks (from OOT modules) that specify no module name. \ +The module name is the root category enclosed in square brackets. + +Please consider contacting OOT module maintainer for any block in here \ +and kindly ask to update their GRC Block Descriptions or Block Tree to include a module name.""" + def update_font_size(font_size): global PORT_SEPARATION, BLOCK_FONT, PORT_FONT, PARAM_FONT, FONT_SIZE |