From 11752ea4f6868594b511fceac05d5677670e2f1c Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <koslowski@kit.edu>
Date: Fri, 17 Jul 2015 10:03:17 +0200
Subject: grc: only show code preview tab after user enables it

---
 grc/gui/ActionHandler.py | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'grc/gui/ActionHandler.py')

diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 1ce4aeda2d..584b4120e6 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -124,6 +124,7 @@ class ActionHandler:
                 Actions.CLEAR_REPORTS, Actions.SAVE_REPORTS,
                 Actions.TOGGLE_AUTO_HIDE_PORT_LABELS, Actions.TOGGLE_SNAP_TO_GRID,
                 Actions.TOGGLE_SHOW_BLOCK_COMMENTS,
+                Actions.TOGGLE_SHOW_CODE_PREVIEW_TAB,
             ): action.set_sensitive(True)
             if ParseXML.xml_failures:
                 Messages.send_xml_errors_if_any(ParseXML.xml_failures)
@@ -146,6 +147,7 @@ class ActionHandler:
                 Actions.TOGGLE_SCROLL_LOCK,
                 Actions.TOGGLE_SNAP_TO_GRID,
                 Actions.TOGGLE_SHOW_BLOCK_COMMENTS,
+                Actions.TOGGLE_SHOW_CODE_PREVIEW_TAB,
             ): action.load_from_preferences()
         elif action == Actions.APPLICATION_QUIT:
             if self.main_window.close_pages():
@@ -410,6 +412,8 @@ class ActionHandler:
             action.save_to_preferences()
         elif action == Actions.TOGGLE_SHOW_BLOCK_COMMENTS:
             action.save_to_preferences()
+        elif action == Actions.TOGGLE_SHOW_CODE_PREVIEW_TAB:
+            action.save_to_preferences()
         ##################################################
         # Param Modifications
         ##################################################
-- 
cgit v1.2.3