diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2015-06-21 22:35:02 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2015-06-22 11:05:08 +0200 |
commit | cb3f3c64fed4e05ee3bcc1947f3855dcaddf0f2d (patch) | |
tree | faca55a49805b5fd216b466a0284795f10d00a5a /grc/gui/Dialogs.py | |
parent | 39143b6179c888c9cec58908c959c65c9f6c257c (diff) |
grc: fix context menu in props dialog text displays
Diffstat (limited to 'grc/gui/Dialogs.py')
-rw-r--r-- | grc/gui/Dialogs.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py index e1fc680bde..61d677af85 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. |