summaryrefslogtreecommitdiff
path: root/grc/gui/Preferences.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/Preferences.py')
-rw-r--r--grc/gui/Preferences.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/grc/gui/Preferences.py b/grc/gui/Preferences.py
index 3ebee24345..5fbdfe927a 100644
--- a/grc/gui/Preferences.py
+++ b/grc/gui/Preferences.py
@@ -35,7 +35,7 @@ _config_parser = ConfigParser.SafeConfigParser()
def file_extension():
- return '.'+_platform.get_key()
+ return '.grc'
def load(platform):
@@ -140,13 +140,34 @@ def add_recent_file(file_name):
set_recent_files(recent_files[:10]) # Keep up to 10 files
-def reports_window_position(pos=None):
- return entry('reports_window_position', pos, default=-1) or 1
+def console_window_position(pos=None):
+ return entry('console_window_position', pos, default=-1) or 1
def blocks_window_position(pos=None):
return entry('blocks_window_position', pos, default=-1) or 1
+def variable_editor_position(pos=None, sidebar=False):
+ # Figure out default
+ if sidebar:
+ w, h = main_window_size()
+ return entry('variable_editor_sidebar_position', pos, default=int(h*0.7))
+ else:
+ return entry('variable_editor_position', pos, default=int(blocks_window_position()*0.5))
+
+
+def variable_editor_sidebar(pos=None):
+ return entry('variable_editor_sidebar', pos, default=False)
+
+
+def variable_editor_confirm_delete(pos=None):
+ return entry('variable_editor_confirm_delete', pos, default=True)
+
+
def xterm_missing(cmd=None):
return entry('xterm_missing', cmd, default='INVALID_XTERM_SETTING')
+
+
+def screen_shot_background_transparent(transparent=None):
+ return entry('screen_shot_background_transparent', transparent, default=False)