diff options
author | Josh Morman <mormjb@gmail.com> | 2020-01-08 12:47:25 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-08 10:21:20 -0800 |
commit | e3c27362d7a0d7c0da55b97ec8b7ba0c7ef1ed84 (patch) | |
tree | b882bded5435af11b81c477997ed82340d1f0cc6 /grc/gui/Config.py | |
parent | 445aa4792dcdf4a8bf14600e6d931451e36f0eaa (diff) |
grc: remove canvas_size as a flowgraph option
It was mostly removed with the feature of auto-resizing the canvase
This just removes the option from the options block and some other
unused code
Diffstat (limited to 'grc/gui/Config.py')
-rw-r--r-- | grc/gui/Config.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/grc/gui/Config.py b/grc/gui/Config.py index d78c3f040a..03bc927034 100644 --- a/grc/gui/Config.py +++ b/grc/gui/Config.py @@ -101,18 +101,6 @@ class Config(CoreConfig): return self._gr_prefs.get_string('grc-docs', 'wiki_block_docs_url_prefix', '') @property - def default_canvas_size(self): - try: # ugly, but matches current code style - raw = self._gr_prefs.get_string('grc', 'canvas_default_size', '1280, 1024') - value = tuple(int(x.strip('() ')) for x in raw.split(',')) - if len(value) != 2 or not all(300 < x < 4096 for x in value): - raise ValueError - return value - except (ValueError, TypeError): - print("Error: invalid 'canvas_default_size' setting.", file=sys.stderr) - return Constants.DEFAULT_CANVAS_SIZE_DEFAULT - - @property def font_size(self): try: # ugly, but matches current code style font_size = self._gr_prefs.get_long('grc', 'canvas_font_size', @@ -192,7 +180,7 @@ class Config(CoreConfig): def variable_editor_position(self, pos=None, sidebar=False): # Figure out default if sidebar: - w, h = self.main_window_size() + _, h = self.main_window_size() return self.entry('variable_editor_sidebar_position', pos, default=int(h*0.7)) else: return self.entry('variable_editor_position', pos, default=int(self.blocks_window_position()*0.5)) |