lib/bb/ui/crumbs/hobwidget: replace new API

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>
This commit is contained in:
Joshua Lock 2012-04-05 10:17:57 -07:00 committed by Richard Purdie
parent b2fb7ddedd
commit 0d001e8c04
1 changed files with 1 additions and 1 deletions

View 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)