Package: gramps
Version: 3.1.3-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lucid ubuntu-patch

Gramps will fail to run with gtk 2.19, although this is not a problem in debian 
sid at the moment it may be in the future. i've tested the attached patch on 
sid and it doesn't appear to cause any problems
This fix should be applied in future upstream versions of gramps see,
http://www.gramps-project.org/bugs/view.php?id=3436

*** /tmp/tmpKEBNLt
In Ubuntu, we've applied the attached patch to achieve the following:

  * src/widgets/statusbar.py: 
    - fix set_alignment for gtk > 2.19, taken from gramps svn rev 13993
    (LP: #512241)

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: squeeze/sid
  APT prefers lucid
  APT policy: (500, 'lucid')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-11-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
only in patch2:
unchanged:
--- gramps-3.1.3.orig/src/widgets/statusbar.py
+++ gramps-3.1.3/src/widgets/statusbar.py
@@ -163,9 +163,14 @@
         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
         

Reply via email to