[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/06: grc: fix context menu in props dialo
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/06: grc: fix context menu in props dialog text displays |
Date: |
Mon, 22 Jun 2015 14:32:23 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit cb3f3c64fed4e05ee3bcc1947f3855dcaddf0f2d
Author: Sebastian Koslowski <address@hidden>
Date: Sun Jun 21 22:35:02 2015 +0200
grc: fix context menu in props dialog text displays
---
grc/gui/Dialogs.py | 18 ++++++++++++++----
grc/gui/PropsDialog.py | 6 +++---
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index e1fc680..61d677a 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -23,7 +23,8 @@ import gtk
import Utils
import Actions
-class TextDisplay(gtk.TextView):
+
+class SimpleTextDisplay(gtk.TextView):
"""A non editable gtk text view."""
def __init__(self, text=''):
@@ -41,10 +42,18 @@ class TextDisplay(gtk.TextView):
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
+class TextDisplay(SimpleTextDisplay):
+
+ def __init__(self, text=''):
+ """
+ TextDisplay constructor.
+
+ Args:
+ text: the text to display (string)
+ """
+ SimpleTextDisplay.__init__(self, text)
+ self.scroll_lock = True
self.connect("populate-popup", self.populate_popup)
def insert(self, line):
@@ -116,6 +125,7 @@ class TextDisplay(gtk.TextView):
menu.show_all()
return False
+
def MessageDialogHelper(type, buttons, title=None, markup=None,
default_response=None, extra_buttons=None):
"""
Create a modal message dialog and run it.
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py
index 91f7f4f..470e2d5 100644
--- a/grc/gui/PropsDialog.py
+++ b/grc/gui/PropsDialog.py
@@ -21,7 +21,7 @@ import pygtk
pygtk.require('2.0')
import gtk
-from Dialogs import TextDisplay
+from Dialogs import SimpleTextDisplay
from Constants import MIN_DIALOG_WIDTH, MIN_DIALOG_HEIGHT
import Utils
@@ -95,14 +95,14 @@ class PropsDialog(gtk.Dialog):
self._params_boxes.append((tab, label, vbox))
# Docs for the block
- self._docs_text_display = TextDisplay()
+ self._docs_text_display = SimpleTextDisplay()
self._docs_box = gtk.ScrolledWindow()
self._docs_box.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self._docs_box.add_with_viewport(self._docs_text_display)
notebook.append_page(self._docs_box, gtk.Label("Documentation"))
# Error Messages for the block
- self._error_messages_text_display = TextDisplay()
+ self._error_messages_text_display = SimpleTextDisplay()
self._error_box = gtk.ScrolledWindow()
self._error_box.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self._error_box.add_with_viewport(self._error_messages_text_display)
- [Commit-gnuradio] [gnuradio] branch maint updated (b9034d5 -> 3bff8fa), git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 05/06: Merge remote-tracking branch 'tom/qtgui/cpfix' into maint, git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 02/06: grc: fix generate mode error message (#800), git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 01/06: completing the half sentence about when to use C++, git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 03/06: qtgui: fixed issue #801 with controlpanel in the frequency display., git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'gnuradio-wg-grc/maint_grcwg' into maint, git, 2015/06/22
- [Commit-gnuradio] [gnuradio] 04/06: grc: fix context menu in props dialog text displays,
git <=