summaryrefslogtreecommitdiff
path: root/grc/src/gui/Preferences.py
diff options
context:
space:
mode:
authorjblum2008-11-27 07:12:15 +0000
committerjblum2008-11-27 07:12:15 +0000
commitf8fe10054cba4a8dbf012f328eb86c9ef1c75869 (patch)
treec31bfce9fad20519610ff373a135efb1d6776435 /grc/src/gui/Preferences.py
parent373dd3bd1f46d09eb2ef2e4aeefe3f1be58c6ab1 (diff)
downloadgnuradio-f8fe10054cba4a8dbf012f328eb86c9ef1c75869.tar.gz
gnuradio-f8fe10054cba4a8dbf012f328eb86c9ef1c75869.tar.bz2
gnuradio-f8fe10054cba4a8dbf012f328eb86c9ef1c75869.zip
resizable reports window
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10078 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/gui/Preferences.py')
-rw-r--r--grc/src/gui/Preferences.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/grc/src/gui/Preferences.py b/grc/src/gui/Preferences.py
index 80c4232b8..741ed8ca7 100644
--- a/grc/src/gui/Preferences.py
+++ b/grc/src/gui/Preferences.py
@@ -50,7 +50,7 @@ class _Preferences(object):
self.snap_to_grid_param = self._prefs_block.get_param('snap_to_grid')
self.grid_size_param = self._prefs_block.get_param('grid_size')
self.show_grid_param = self._prefs_block.get_param('show_grid')
- self.show_reports_param = self._prefs_block.get_param('show_reports')
+ self.reports_window_position_param = self._prefs_block.get_param('reports_window_position')
self.restore_files_param = self._prefs_block.get_param('restore_files')
self.window_size_param = self._prefs_block.get_param('window_size')
self.file_open_param = self._prefs_block.get_param('file_open')
@@ -75,10 +75,9 @@ Snap to Grid forces the upper right corner of the signal block to align with a g
(
'Appearance',
'''
-Show or hide the reports window at the bottom of the main window.
Show or hide all paramater labels in the signal blocks.
''',
- [self.show_reports_param, self.show_params_param],
+ [self.show_params_param],
),
(
'Misc',
@@ -113,8 +112,11 @@ def files_open(files=None):
if files is not None: _get_prefs().files_open_param.set_value('\n'.join(files))
else: return _get_prefs().files_open_param.get_value().split('\n')
-def show_reports_window():
- return _get_prefs().show_reports_param.get_value() == 'show'
+def reports_window_position(pos=None):
+ if pos is not None: _get_prefs().reports_window_position_param.set_value('%d'%pos)
+ else:
+ try: return int(_get_prefs().reports_window_position_param.get_value()) or 1 #greater than 0
+ except: return -1
def get_grid_size():
return int(_get_prefs().grid_size_param.get_value())