Merge lp:~pitti/gtimelog/pygi into lp:~gtimelog-dev/gtimelog/trunk

Proposed by Martin Pitt
Status: Merged
Approved by: Barry Warsaw
Approved revision: 198
Merged at revision: 196
Proposed branch: lp:~pitti/gtimelog/pygi
Merge into: lp:~gtimelog-dev/gtimelog/trunk
Diff against target: 37 lines (+11/-1)
2 files modified
NEWS.txt (+5/-0)
src/gtimelog/main.py (+6/-1)
To merge this branch: bzr merge lp:~pitti/gtimelog/pygi
Reviewer Review Type Date Requested Status
Barry Warsaw Approve
Review via email: mp+76169@code.launchpad.net

Description of the change

Seems 0.6 accidentally dropped the required import of "gi" when using GI. Also, it seems my TabAlign.LEFT -> TabAlign.TAB_LEFT change was wrong, this is due to a broken .gir of Pango in the Ubuntu packages. With upstream Pango it really is TabAlign.LEFT, as it is supposed to be with GIR. However, I added a backwards compat quirk to work with either.

With this, gtimelog again works fine in jhbuild with current GTK3/Pango/etc.

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Thanks Martin, this looks great. I'll commit this to trunk, but I want to hold off on uploading it to Ubuntu until I can fix the quit-button issue (i.e. ctrl-Q works but the quit button only closes the window).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS.txt'
--- NEWS.txt 2011-08-23 22:21:14 +0000
+++ NEWS.txt 2011-09-20 08:38:24 +0000
@@ -1,3 +1,8 @@
1Changes in version 0.6.1 (UNRELEASED)
2==============================================
3
4* Fix two crashes when using GI.
5
1Changes in version 0.6.0 (released 2011-08-23)6Changes in version 0.6.0 (released 2011-08-23)
2==============================================7==============================================
38
49
=== modified file 'src/gtimelog/main.py'
--- src/gtimelog/main.py 2011-08-17 18:18:23 +0000
+++ src/gtimelog/main.py 2011-09-20 08:38:24 +0000
@@ -41,6 +41,7 @@
41 new_app_indicator = None41 new_app_indicator = None
4242
43except ImportError:43except ImportError:
44 import gi
44 from gi.repository import GObject as gobject45 from gi.repository import GObject as gobject
45 from gi.repository import Gdk as gdk46 from gi.repository import Gdk as gdk
46 from gi.repository import Gtk as gtk47 from gi.repository import Gtk as gtk
@@ -48,7 +49,11 @@
48 pygtk = None49 pygtk = None
4950
50 # these are hacks until we fully switch to GI51 # these are hacks until we fully switch to GI
51 PANGO_ALIGN_LEFT = pango.TabAlign.TAB_LEFT52 try:
53 PANGO_ALIGN_LEFT = pango.TabAlign.LEFT
54 except AttributeError:
55 # backwards compat for older Pango versions with broken GIR
56 PANGO_ALIGN_LEFT = pango.TabAlign.TAB_LEFT
52 GTK_RESPONSE_OK = gtk.ResponseType.OK57 GTK_RESPONSE_OK = gtk.ResponseType.OK
53 gtk_status_icon_new = gtk.StatusIcon.new_from_file58 gtk_status_icon_new = gtk.StatusIcon.new_from_file
54 pango_tabarray_new = pango.TabArray.new59 pango_tabarray_new = pango.TabArray.new

Subscribers

People subscribed via source and target branches