summaryrefslogtreecommitdiff
path: root/grc/gui/Application.py
diff options
context:
space:
mode:
authorJosh Morman <jmorman@perspectalabs.com>2019-08-30 15:26:43 -0400
committerMartin Braun <martin.braun@ettus.com>2019-09-17 14:30:50 -0500
commit44a6f5ddc82233730c9702888c6796874a352f07 (patch)
tree0d5dd53ff823d33821896930a962b0e83d43ade5 /grc/gui/Application.py
parenta5df144a2c4098b7681b0d83235d343483419dc9 (diff)
grc: option toggle the show id on all blocks
Addresses the issue of losing access to the block id on many/most blocks though there are scenarios where you may need to see them in GRC Added a menu item tied into the grc prefs that will show the block ids Fixes #2780
Diffstat (limited to 'grc/gui/Application.py')
-rw-r--r--grc/gui/Application.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/grc/gui/Application.py b/grc/gui/Application.py
index 3fee7a001e..6b773f4131 100644
--- a/grc/gui/Application.py
+++ b/grc/gui/Application.py
@@ -204,6 +204,7 @@ class Application(Gtk.Application):
Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR,
Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR_SIDEBAR,
Actions.TOGGLE_HIDE_VARIABLES,
+ Actions.TOGGLE_SHOW_BLOCK_IDS,
):
action.set_enabled(True)
if hasattr(action, 'load_from_preferences'):
@@ -512,6 +513,12 @@ class Application(Gtk.Application):
action.save_to_preferences()
varedit.save_to_preferences()
flow_graph_update()
+ elif action == Actions.TOGGLE_SHOW_BLOCK_IDS:
+ action.set_active(not action.get_active())
+ active = action.get_active()
+ Actions.NOTHING_SELECT()
+ action.save_to_preferences()
+ flow_graph_update()
elif action == Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR:
# TODO: There may be issues at startup since these aren't triggered
# the same was as Gtk.Actions when loading preferences.