]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/bb/ui/crumbs/hobwidget: replace new API
authorJoshua Lock <josh@linux.intel.com>
Thu, 5 Apr 2012 17:17:57 +0000 (10:17 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 10 Apr 2012 23:02:20 +0000 (00:02 +0100)
The gtk.Widget.get_sensitive() convenience method is only available
in Gtk+ 2.22 or later, instead use the sensitive property of the
gobject to determine whether the widget is sensitive or not.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
lib/bb/ui/crumbs/hobwidget.py

index edb85db683f705e022c53b142ddb939edcee5c56..a7e5538b18932ad39062acb53275de3fa56273e4 100644 (file)
@@ -241,7 +241,7 @@ class HobAltButton(gtk.Button):
     """
     @staticmethod
     def desensitise_on_state_change_cb(button, state):
-        if button.get_state() == gtk.STATE_INSENSITIVE:
+        if not button.get_property("sensitive"):
             HobAltButton.set_text(button, False)
         else:
             HobAltButton.set_text(button, True)