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:04:41 +0000 (00:04 +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.

(Bitbake rev: 82ea0619e9ecf9107b75692385bcf1434ea8a307)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/ui/crumbs/hobwidget.py

index edb85db..a7e5538 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)