diff options
author | Seth Hitefield <sdhitefield@gmail.com> | 2014-06-11 11:27:55 -0400 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2014-06-13 11:04:26 +0200 |
commit | 9d6284c1e2317995c2ac959de0fa4f0668c0064d (patch) | |
tree | 9ffa264f8a910dd93f2ec923d22afd40c4c7086b /grc | |
parent | 8949a9e00e989e98abf334f839b7a4e91a2339e4 (diff) |
grc: Changed dialog to directly call the SCROLL_LOCK and CLEAR_REPORTS actions.
Moved clear reports under view and grouped all Report menu items together
Diffstat (limited to 'grc')
-rw-r--r-- | grc/gui/ActionHandler.py | 3 | ||||
-rw-r--r-- | grc/gui/Actions.py | 8 | ||||
-rw-r--r-- | grc/gui/Bars.py | 3 | ||||
-rw-r--r-- | grc/gui/Dialogs.py | 6 |
4 files changed, 9 insertions, 11 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index d76940515f..70e8064c5d 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -61,9 +61,6 @@ class ActionHandler: self.main_window = MainWindow(platform) self.main_window.connect('delete-event', self._quit) self.main_window.connect('key-press-event', self._handle_key_press) - # Add actions the report/log text_view can call back to from its context menu - self.main_window.text_display.clear_action = Actions.CLEAR_REPORTS - self.main_window.text_display.scroll_action = Actions.TOGGLE_SCROLL_LOCK self.get_page = self.main_window.get_page self.get_flow_graph = self.main_window.get_flow_graph self.get_focus_flag = self.main_window.get_focus_flag diff --git a/grc/gui/Actions.py b/grc/gui/Actions.py index bf05ea71e5..abd5017d16 100644 --- a/grc/gui/Actions.py +++ b/grc/gui/Actions.py @@ -282,8 +282,8 @@ TOGGLE_BLOCKS_WINDOW = ToggleAction( keypresses=(gtk.keysyms.b, gtk.gdk.CONTROL_MASK), ) TOGGLE_SCROLL_LOCK = ToggleAction( - label='_Scroll Lock', - tooltip='Toggle scrool lock of the logging window', + label='_Report Scroll Lock', + tooltip='Toggle scroll lock for the report window', ) ABOUT_WINDOW_DISPLAY = Action( label='_About', @@ -350,8 +350,8 @@ FIND_BLOCKS = Action( gtk.keysyms.slash, NO_MODS_MASK), ) CLEAR_REPORTS = Action( - label='_Clear Logs', - tooltip='Clear Logs', + label='_Clear Reports', + tooltip='Clear Reports', stock_id=gtk.STOCK_CLEAR, ) OPEN_HIER = Action( diff --git a/grc/gui/Bars.py b/grc/gui/Bars.py index defde1cc57..11e35c992b 100644 --- a/grc/gui/Bars.py +++ b/grc/gui/Bars.py @@ -89,12 +89,13 @@ MENU_BAR_LIST = ( Actions.BLOCK_DISABLE, None, Actions.BLOCK_PARAM_MODIFY, - Actions.CLEAR_REPORTS, ]), (gtk.Action('View', '_View', None, None), [ Actions.TOGGLE_BLOCKS_WINDOW, + None, Actions.TOGGLE_REPORTS_WINDOW, Actions.TOGGLE_SCROLL_LOCK, + Actions.CLEAR_REPORTS, None, Actions.ERRORS_WINDOW_DISPLAY, Actions.FIND_BLOCKS, diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py index f9a355128d..1b7be1a11a 100644 --- a/grc/gui/Dialogs.py +++ b/grc/gui/Dialogs.py @@ -21,6 +21,7 @@ import pygtk pygtk.require('2.0') import gtk import Utils +import Actions class TextDisplay(gtk.TextView): """A non editable gtk text view.""" @@ -82,10 +83,9 @@ class TextDisplay(gtk.TextView): # Callback functions to handle the scrolling lock and clear context menus options # Action functions are set by the ActionHandler's init function def clear_cb(self, menu_item, web_view): - self.clear_action() + Actions.CLEAR_REPORTS() def scroll_back_cb(self, menu_item, web_view): - # Trigger the toggle action - self.scroll_action() + Actions.TOGGLE_SCROLL_LOCK() # Create a popup menu for the scroll lock and clear functions. def populate_popup(self, view, menu): |