From afd0dbf40e2d30692a91251413971d9716bb0b6e Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 8 Jan 2010 11:31:52 +0000 Subject: [PATCH] 3436: [crash] 'gtk.HBox' object has no attribute 'set_alignment' svn: r13993 --- src/widgets/statusbar.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/widgets/statusbar.py b/src/widgets/statusbar.py index 95e823eb0..c3822ed10 100644 --- a/src/widgets/statusbar.py +++ b/src/widgets/statusbar.py @@ -163,9 +163,14 @@ class Statusbar(gtk.HBox): self._set_packing() if ralign: - label = new_bar.get_children()[0].get_children()[0] - label.set_alignment(xalign=1.0, yalign=0.5) - + frame = new_bar.get_children()[0] + obj = frame.get_children()[0] + # obj was a gtk.Label (GTK 2.16.6), + # now it is is gtk.HBox (GTK 2.19.1) + while not isinstance(obj, gtk.Label): + obj = obj.get_children()[0] + obj.set_alignment(xalign=1.0, yalign=0.5) + new_bar_id = self._get_next_id() self._bars[new_bar_id] = new_bar