From patchwork Thu Apr 5 18:29:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel,2/3] lib/bb/ui/crumbs/hobwidget: replace new API Date: Thu, 05 Apr 2012 18:29:37 -0000 From: Joshua Lock X-Patchwork-Id: 25227 Message-Id: <09a0f7d44d08daf341277ce9dd94061622104594.1333650445.git.josh@linux.intel.com> To: bitbake-devel@lists.openembedded.org 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 --- lib/bb/ui/crumbs/hobwidget.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py index edb85db..a7e5538 100644 --- a/lib/bb/ui/crumbs/hobwidget.py +++ b/lib/bb/ui/crumbs/hobwidget.py @@ -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)