Merge lp:~emanuele-aina/gtimelog/fix-status-icon-position-menu-pygi into lp:~gtimelog-dev/gtimelog/trunk

Proposed by Emanuele Aina
Status: Merged
Merged at revision: 232
Proposed branch: lp:~emanuele-aina/gtimelog/fix-status-icon-position-menu-pygi
Merge into: lp:~gtimelog-dev/gtimelog/trunk
Diff against target: 21 lines (+8/-3)
1 file modified
src/gtimelog/main.py (+8/-3)
To merge this branch: bzr merge lp:~emanuele-aina/gtimelog/fix-status-icon-position-menu-pygi
Reviewer Review Type Date Requested Status
Marius Gedminas Approve
Review via email: mp+120752@code.launchpad.net

Description of the change

This branch fixes LP#1039977 by replacing the usage of status_icon_position_menu with gtk.StatusIcon.position_menu when using PyGI (and swapping some of the tray_icon_popup_menu.popup() arguments).

To post a comment you must log in.
Revision history for this message
Marius Gedminas (mgedmin) wrote :

Thank you!

http://fpaste.org/osUI/ is more what I had in mind (keep the 'if toolkit' checks in one place, at the top), but didn't commit because it didn't work. Now I realize that the differing argument ordering makes my kind of fix impossible. I either have to litter the code with if statements, or bite the bullet and rip out the obsolete pygtk support code.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I committed your patch as is, because life is short. Thanks a lot!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/gtimelog/main.py'
--- src/gtimelog/main.py 2012-08-22 12:01:41 +0000
+++ src/gtimelog/main.py 2012-08-22 12:04:29 +0000
@@ -1181,9 +1181,14 @@
1181 def on_popup_menu(self, widget, button, activate_time):1181 def on_popup_menu(self, widget, button, activate_time):
1182 """The user clicked on the icon."""1182 """The user clicked on the icon."""
1183 tray_icon_popup_menu = self.gtimelog_window.tray_icon_popup_menu1183 tray_icon_popup_menu = self.gtimelog_window.tray_icon_popup_menu
1184 tray_icon_popup_menu.popup(1184 if toolkit == "gi":
1185 None, None, gtk.status_icon_position_menu,1185 tray_icon_popup_menu.popup(
1186 button, activate_time, self.icon)1186 None, None, gtk.StatusIcon.position_menu,
1187 self.icon, button, activate_time)
1188 else:
1189 tray_icon_popup_menu.popup(
1190 None, None, gtk.status_icon_position_menu,
1191 button, activate_time, self.icon)
11871192
1188 def entry_added(self, entry):1193 def entry_added(self, entry):
1189 """An entry has been added."""1194 """An entry has been added."""

Subscribers

People subscribed via source and target branches