[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/06: grc: no tooltips for old GTK version
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/06: grc: no tooltips for old GTK versions |
Date: |
Tue, 9 Dec 2014 20:02:12 +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 236acdf758ef5defa4370ea66e2113bed0d91716
Author: Sebastian Koslowski <address@hidden>
Date: Fri Nov 7 11:30:44 2014 +0100
grc: no tooltips for old GTK versions
---
grc/gui/Param.py | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/grc/gui/Param.py b/grc/gui/Param.py
index 499af2e..ef1c154 100644
--- a/grc/gui/Param.py
+++ b/grc/gui/Param.py
@@ -99,7 +99,11 @@ class EntryParam(InputParam):
def set_color(self, color):
self._input.modify_base(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
self._input.modify_text(gtk.STATE_NORMAL,
Colors.PARAM_ENTRY_TEXT_COLOR)
- def set_tooltip_text(self, text): self._input.set_tooltip_text(text)
+ def set_tooltip_text(self, text):
+ try:
+ self._input.set_tooltip_text(text)
+ except AttributeError:
+ pass # no tooltips for old GTK
class EnumParam(InputParam):
"""Provide an entry box for Enum types with a drop down menu."""
@@ -112,7 +116,11 @@ class EnumParam(InputParam):
self._input.connect('changed', self._apply_change)
self.pack_start(self._input, False)
def get_text(self): return
self.param.get_option_keys()[self._input.get_active()]
- def set_tooltip_text(self, text): self._input.set_tooltip_text(text)
+ def set_tooltip_text(self, text):
+ try:
+ self._input.set_tooltip_text(text)
+ except AttributeError:
+ pass # no tooltips for old GTK
class EnumEntryParam(InputParam):
"""Provide an entry box and drop down menu for Raw Enum types."""
@@ -133,9 +141,13 @@ class EnumEntryParam(InputParam):
if self._input.get_active() == -1: return
self._input.get_child().get_text()
return self.param.get_option_keys()[self._input.get_active()]
def set_tooltip_text(self, text):
- if self._input.get_active() == -1: #custom entry
- self._input.get_child().set_tooltip_text(text)
- else: self._input.set_tooltip_text(text)
+ try:
+ if self._input.get_active() == -1: #custom entry
+ self._input.get_child().set_tooltip_text(text)
+ else:
+ self._input.set_tooltip_text(text)
+ except AttributeError:
+ pass # no tooltips for old GTK
def set_color(self, color):
if self._input.get_active() == -1: #custom entry, use color
self._input.get_child().modify_base(gtk.STATE_NORMAL,
gtk.gdk.color_parse(color))
- [Commit-gnuradio] [gnuradio] branch maint updated (ec05c9b -> e6193c2), git, 2014/12/09
- [Commit-gnuradio] [gnuradio] 02/06: Fixed inconsistent spacing in perror output, git, 2014/12/09
- [Commit-gnuradio] [gnuradio] 04/06: Merge remote-tracking branch 'mmueller/runtime_fix_spacing_in_perror' into maint, git, 2014/12/09
- [Commit-gnuradio] [gnuradio] 01/06: grc: no tooltips for old GTK versions,
git <=
- [Commit-gnuradio] [gnuradio] 03/06: fixed UHD manual URLs, git, 2014/12/09
- [Commit-gnuradio] [gnuradio] 05/06: Merge remote-tracking branch 'mmueller/gr_uhd_fix_URLs' into maint, git, 2014/12/09
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'gnuradio-wg-grc/maint_grcwg' into maint, git, 2014/12/09