[arch-commits] Commit in variety/trunk (PKGBUILD fix-popup-menu.patch)

Balló György bgyorgy at archlinux.org
Fri Jan 27 16:43:17 UTC 2017


    Date: Friday, January 27, 2017 @ 16:43:17
  Author: bgyorgy
Revision: 209261

upgpkg: variety 0.6.3-3

Fix popup menu positions

Added:
  variety/trunk/fix-popup-menu.patch
Modified:
  variety/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   14 +++++++++-----
 fix-popup-menu.patch |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-01-27 15:43:01 UTC (rev 209260)
+++ PKGBUILD	2017-01-27 16:43:17 UTC (rev 209261)
@@ -4,23 +4,24 @@
 
 pkgname=variety
 pkgver=0.6.3
-pkgrel=2
+pkgrel=3
 pkgdesc='Changes the wallpaper on a regular interval using user-specified or automatically downloaded images.'
 arch=('any')
 url="http://peterlevi.com/variety/"
 license=('GPL3')
-depends=('desktop-file-utils' 'gtk3' 'imagemagick' 'libnotify' 'python2-beautifulsoup4'
+depends=('gtk3' 'imagemagick' 'libnotify' 'python2-beautifulsoup4'
          'python2-cairo' 'python2-configobj' 'python2-dbus' 'python2-exiv2'
          'python2-gobject' 'python2-httplib2' 'python2-pillow' 'python2-lxml'
          'python2-pycurl' 'python2-requests')
-optdepends=('yelp: for reading help documents')
 makedepends=('python2-distutils-extra')
 source=(https://launchpad.net/variety/trunk/${pkgver}/+download/${pkgname}_${pkgver}-0-581-201611011859-ubuntu16.04.1.tar.gz{,.asc}
-        disable-panoramio.patch)
+        disable-panoramio.patch
+        fix-popup-menu.patch)
 validpgpkeys=('53A44FA64701571F59CD8C9BA7FAEF1B4791406E') # Peter Levi
 sha256sums=('30f82e606a090dfab463f29500ec9dd9ad78fcfcd5a96c5f0f5d0b2bd9ce79eb'
             'SKIP'
-            '011d4f19a17fd59a175f6fa36e282c82c333ce0e849673aeea678f2ee56db743')
+            '011d4f19a17fd59a175f6fa36e282c82c333ce0e849673aeea678f2ee56db743'
+            'bd19cbd82d19cf653e92390e71d749dc9878c73c8ba25f7d64d96a8bd9228559')
 
 prepare() {
   cd "${srcdir}"/$pkgname-$pkgver
@@ -27,6 +28,9 @@
 
   # Disable Panoramio support (removes webkitgtk dependency)
   patch -Np1 -i ../disable-panoramio.patch
+
+  # Fix popup menu positions
+  patch -Np1 -i ../fix-popup-menu.patch
 }
 
 package() {

Added: fix-popup-menu.patch
===================================================================
--- fix-popup-menu.patch	                        (rev 0)
+++ fix-popup-menu.patch	2017-01-27 16:43:17 UTC (rev 209261)
@@ -0,0 +1,47 @@
+diff -Naur variety-0.6.3.orig/variety/indicator.py variety-0.6.3/variety/indicator.py
+--- variety-0.6.3.orig/variety/indicator.py	2016-11-01 19:59:39.000000000 +0100
++++ variety-0.6.3/variety/indicator.py	2017-01-27 17:09:16.537550484 +0100
+@@ -316,8 +316,8 @@
+         self.status_icon = None
+         self.visible = True
+ 
+-        def pos(menu, icon):
+-            return Gtk.StatusIcon.position_menu(self.menu, icon)
++        def pos(menu, x, y, icon):
++            return Gtk.StatusIcon.position_menu(self.menu, x, y, icon)
+ 
+         def right_click_event(icon, button, time):
+             self.menu.popup(None, None, pos, self.status_icon, 0, time)
+diff -Naur variety-0.6.3.orig/variety/PreferencesVarietyDialog.py variety-0.6.3/variety/PreferencesVarietyDialog.py
+--- variety-0.6.3.orig/variety/PreferencesVarietyDialog.py	2016-11-01 19:59:39.000000000 +0100
++++ variety-0.6.3/variety/PreferencesVarietyDialog.py	2017-01-27 17:18:14.865800288 +0100
+@@ -357,7 +357,7 @@
+             timer.start()
+ 
+     def on_add_button_clicked(self, widget=None):
+-        def position(x, y):
++        def position(menu, x, y, icon):
+             button_alloc = self.ui.add_button.get_allocation()
+             window_pos = self.ui.add_button.get_window().get_position()
+             return button_alloc.x + window_pos[0], button_alloc.y + button_alloc.height + window_pos[1], True
+@@ -365,7 +365,7 @@
+         self.add_menu.popup(None, self.ui.add_button, position, None, 0, Gtk.get_current_event_time())
+ 
+     def on_remove_sources_clicked(self, widget=None):
+-        def position(x, y):
++        def position(menu, x, y, icon):
+             button_alloc = self.ui.remove_sources.get_allocation()
+             window_pos = self.ui.remove_sources.get_window().get_position()
+             return button_alloc.x + window_pos[0], button_alloc.y + button_alloc.height + window_pos[1], True
+diff -Naur variety-0.6.3.orig/variety/ThumbsManager.py variety-0.6.3/variety/ThumbsManager.py
+--- variety-0.6.3.orig/variety/ThumbsManager.py	2016-11-01 19:59:39.000000000 +0100
++++ variety-0.6.3/variety/ThumbsManager.py	2017-01-27 17:24:33.175557472 +0100
+@@ -268,7 +268,7 @@
+             _resume_scrolling()
+         else:
+             menu = self.create_menu(file)
+-            def _compute_position(a, b, event=event):
++            def _compute_position(menu, x, y, icon):
+                 x, y = event.get_root_coords()[0], event.get_root_coords()[1]
+                 h = menu.get_preferred_height()[1]
+                 return x, y - h if y - h >= 40 else y, True



More information about the arch-commits mailing list