summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2014-06-13 11:03:43 +0200
committerSebastian Koslowski <koslowski@kit.edu>2014-06-13 11:05:05 +0200
commit04de4b8d8cbb38d2b7dd10c30dc8bbd66d9ca370 (patch)
tree64e86676600ac5b1b6afde4dac81b2904620f8a3
parent9d6284c1e2317995c2ac959de0fa4f0668c0064d (diff)
grc: minor edits. removed extra whitespace
-rw-r--r--grc/gui/ActionHandler.py1
-rw-r--r--grc/gui/Actions.py2
-rw-r--r--grc/gui/Dialogs.py23
-rw-r--r--grc/gui/MainWindow.py2
4 files changed, 14 insertions, 14 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 70e8064c5d..6ad2d5576f 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -381,7 +381,6 @@ class ActionHandler:
self.main_window.text_display.scroll_to_end()
elif action == Actions.CLEAR_REPORTS:
self.main_window.text_display.clear()
-
elif action == Actions.TOGGLE_HIDE_DISABLED_BLOCKS:
Actions.NOTHING_SELECT()
##################################################
diff --git a/grc/gui/Actions.py b/grc/gui/Actions.py
index abd5017d16..3aa9e61472 100644
--- a/grc/gui/Actions.py
+++ b/grc/gui/Actions.py
@@ -282,7 +282,7 @@ TOGGLE_BLOCKS_WINDOW = ToggleAction(
keypresses=(gtk.keysyms.b, gtk.gdk.CONTROL_MASK),
)
TOGGLE_SCROLL_LOCK = ToggleAction(
- label='_Report Scroll Lock',
+ label='_Reports Scroll Lock',
tooltip='Toggle scroll lock for the report window',
)
ABOUT_WINDOW_DISPLAY = Action(
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index 1b7be1a11a..0ffba8e0e8 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -40,10 +40,10 @@ class TextDisplay(gtk.TextView):
self.set_editable(False)
self.set_cursor_visible(False)
self.set_wrap_mode(gtk.WRAP_WORD_CHAR)
-
+
# Added for scroll locking
self.scroll_lock = True
-
+
# Add a signal for populating the popup menu
self.connect("populate-popup", self.populate_popup)
@@ -71,11 +71,11 @@ class TextDisplay(gtk.TextView):
return line[back_count:]
def scroll_to_end(self):
- if (self.scroll_lock == True):
+ if self.scroll_lock:
buffer = self.get_buffer()
buffer.move_mark(buffer.get_insert(), buffer.get_end_iter())
self.scroll_to_mark(buffer.get_insert(), 0.0)
-
+
def clear(self):
buffer = self.get_buffer()
buffer.delete(buffer.get_start_iter(), buffer.get_end_iter())
@@ -83,19 +83,20 @@ 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):
- Actions.CLEAR_REPORTS()
+ Actions.CLEAR_REPORTS()
+
def scroll_back_cb(self, menu_item, web_view):
Actions.TOGGLE_SCROLL_LOCK()
-
- # Create a popup menu for the scroll lock and clear functions.
+
def populate_popup(self, view, menu):
+ """Create a popup menu for the scroll lock and clear functions"""
menu.append(gtk.SeparatorMenuItem())
-
+
lock = gtk.CheckMenuItem("Scroll Lock")
menu.append(lock)
- lock.set_active(self.scroll_lock)
- lock.connect('activate', self.scroll_back_cb, view)
-
+ lock.set_active(self.scroll_lock)
+ lock.connect('activate', self.scroll_back_cb, view)
+
clear = gtk.ImageMenuItem(gtk.STOCK_CLEAR)
menu.append(clear)
clear.connect('activate', self.clear_cb, view)
diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py
index e763855fd4..f309d34a2e 100644
--- a/grc/gui/MainWindow.py
+++ b/grc/gui/MainWindow.py
@@ -155,7 +155,7 @@ class MainWindow(gtk.Window):
line: the new text
"""
self.text_display.insert(line)
-
+
############################################################
# Pages: create and close
############################################################