Comment 23 for bug 1598298

Revision history for this message
Peter Levi (peterlevi) wrote :

Hi guys, sorry for the long silence from me, long period with zero time for Variety.

I tried György's patch, but it breaks a couple of things for me, on Ubuntu 14.04 with Unity.
1. ThumbsManager's popup menu stops appearing at all making that window unclosable
2. The menus for Add/Remove start appearing at the mouse cursor instead of right below the button, as was the intention

It seems that at some moment the API for https://lazka.github.io/pgi-docs/#Gtk-3.0/callbacks.html#Gtk.MenuPositionFunc has changed. The current documentation is for Gtk 3.22
(as seen here: https://lazka.github.io/pgi-docs/#Gtk-3.0), and I cannot find the older version of the documentation.

I have tried to make a universal fix that should work on any of the two versions by making the position functions accept variable number of parameters. Committed and pushed to master, and also attaching the patch here. Please give it a try and comment.

The things that need testing:
- Add and Remove buttons in Preferences should popup the menu exactly below the pressed button (like a dropdown).
- Thumbs window's right-click menu should popup at mouse position (e.g. History, Wallpaper Selector)
- Indicator should work both when using the indicator API (e.g. under Unity, or under Gnome with AppIndicator support extension installed - https://extensions.gnome.org/extension/615/appindicator-support/), as well as when using the StatusIcon API (e.g. under Gnome with no appindicator support).