Merge branch 'maint'
[debian/gnuradio] / grc / gui / ActionHandler.py
index 59e535bd496e74ee304a376b94ecc19f179e371a..108e23a2355da942434e81f6a5d856401f830728 100644 (file)
@@ -29,7 +29,6 @@ import Preferences
 from threading import Thread
 import Messages
 from .. base import ParseXML
-import random
 from MainWindow import MainWindow
 from PropsDialog import PropsDialog
 import Dialogs
@@ -81,9 +80,7 @@ class ActionHandler:
                """
                try: assert self.get_focus_flag()
                except AssertionError: return False
-               try: Actions.get_action_from_key_press(event)()
-               except KeyError: return False
-               return True #handled by this method
+               return Actions.handle_key_press(event)
 
        def _quit(self, window, event):
                """
@@ -212,6 +209,8 @@ class ActionHandler:
                        Dialogs.HelpDialog()
                elif action == Actions.TYPES_WINDOW_DISPLAY:
                        Dialogs.TypesDialog(self.get_flow_graph().get_parent())
+               elif action == Actions.ERRORS_WINDOW_DISPLAY:
+                       Dialogs.ErrorsDialog(self.get_flow_graph())
                ##################################################
                # Param Modifications
                ##################################################
@@ -309,6 +308,7 @@ class ActionHandler:
                # Global Actions for all States
                ##################################################
                #update general buttons
+               Actions.ERRORS_WINDOW_DISPLAY.set_sensitive(not self.get_flow_graph().is_valid())
                Actions.ELEMENT_DELETE.set_sensitive(bool(self.get_flow_graph().get_selected_elements()))
                Actions.BLOCK_PARAM_MODIFY.set_sensitive(bool(self.get_flow_graph().get_selected_block()))
                Actions.BLOCK_ROTATE_CCW.set_sensitive(bool(self.get_flow_graph().get_selected_blocks()))