Changes to ensure Hob can be run on CentOS 6
cover Changes to ensure Hob can be run on CentOS 6
The following series contains changes to ensure Hob can be used on CentOS 6, that is Gtk+ 2.18.9 and PyGtk 2.16.0.
To achieve this I've replaced calls to convenience API which was only introduced with Gtk+ 2.22 and lowered the versions of Gtk+ and PyGtk we test for in the Hob GUI.
Tested on CentOS 6.2
Cheers,
Joshua
The following changes since commit d49db15badb77855cef855ee73430fcbc16b6916:
Hob: a minor fix on pmake (2012-04-05 18:47:37 +0100)
are available in the git repository at:
git://github.com/incandescant/bitbake josh/hob-centos6
https://github.com/incandescant/bitbake/tree/josh/hob-centos6
Joshua Lock (3):
lib/bb/ui/crumbs/persistenttooltip: replace 2.22 API lib/bb/ui/crumbs/hobwidget: replace new API
hob: update required versions of (py)gtk et al
lib/bb/ui/crumbs/hobwidget.py | 2 +- lib/bb/ui/crumbs/persistenttooltip.py | 2 +- lib/bb/ui/hob.py | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.7.6
PATCH 1/3 lib/bb/ui/crumbs/persistenttooltip: replace 2.22 API
CentOS 6.x doesn't ship with new enough pygtk for this API.
--- lib/bb/ui/crumbs/persistenttooltip.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/persistenttooltip.py +1 -1
@@ -87,7 +87,7 @@ class PersistentTooltip(gtk.Window): self.button = gtk.Button() self.button.set_image(img) self.button.connect("clicked", self._dismiss_cb) - self.button.set_can_default(True) + self.button.set_flags(gtk.CAN_DEFAULT) self.button.grab_focus() self.button.show() vbox = gtk.VBox(False, 0)
Signature · 1 line
1.7.7.6
PATCH 2/3 lib/bb/ui/crumbs/hobwidget: replace new API
In reply to Joshua LockThe 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.
--- lib/bb/ui/crumbs/hobwidget.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/hobwidget.py +1 -1
@@ -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)
Signature · 1 line
1.7.7.6
PATCH 3/3 hob: update required versions of (py)gtk et al
In reply to Joshua LockWith the previous two changes we now work on Gtk+ 2.18 and PyGtk 2.16
--- lib/bb/ui/hob.py | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
lib/bb/ui/hob.py +7 -4
@@ -22,15 +22,18 @@ import sys import os -requirements = "FATAL: pygtk (version 2.22.0 or later) and pygobject are required to use Hob" +requirements = "FATAL: Gtk+, PyGtk and PyGobject are required to use Hob" try: import gobject import gtk import pygtk pygtk.require('2.0') # to be certain we don't have gtk+ 1.x !?! - ver = gtk.pygtk_version - if ver < (2, 22, 0): - sys.exit("%s (you have pygtk %s.%s.%s)." % (requirements, ver[0], ver[1], ver[2])) + gtkver = gtk.gtk_version + pygtkver = gtk.pygtk_version + if gtkver < (2, 18, 0) or pygtkver < (2, 16, 0): + sys.exit("%s,\nYou have Gtk+ %s and PyGtk %s." % (requirements, + ".".join(map(str, gtkver)), + ".".join(map(str, pygtkver)))) except ImportError as exc: sys.exit("%s (%s)." % (requirements, str(exc))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
Signature · 1 line
1.7.7.6
Richard Purdie
AppliedQuoted 16 lines · Joshua Lock
The following series contains changes to ensure Hob can be used on CentOS 6, that is Gtk+ 2.18.9 and PyGtk 2.16.0.
To achieve this I've replaced calls to convenience API which was only introduced with Gtk+ 2.22 and lowered the versions of Gtk+ and PyGtk we test for in the Hob GUI.
Tested on CentOS 6.2
Cheers,
JoshuaThe following changes since commit
d49db15badb77855cef855ee73430fcbc16b6916:Hob: a minor fix on pmake (2012-04-05 18:47:37 +0100)
Quoted 8 lines
are available in the git repository at:
git://github.com/incandescant/bitbakejosh/hob-centos6
https://github.com/incandescant/bitbake/tree/josh/hob-centos6Joshua Lock (3):
lib/bb/ui/crumbs/persistenttooltip: replace 2.22 APIlib/bb/ui/crumbs/hobwidget: replace new API
hob: update required versions of (py)gtk et al
Merged to master, thanks.
Richard