[arch-commits] Commit in sugar-activity-imageviewer/trunk (2 files)

Balló György bgyorgy at archlinux.org
Thu Jan 11 20:53:49 UTC 2018


    Date: Thursday, January 11, 2018 @ 20:53:48
  Author: bgyorgy
Revision: 281483

upgpkg: sugar-activity-imageviewer 63-2

Fix Choose image button

Added:
  sugar-activity-imageviewer/trunk/fix-choose-image-button.patch
Modified:
  sugar-activity-imageviewer/trunk/PKGBUILD

-------------------------------+
 PKGBUILD                      |   12 +++++++-----
 fix-choose-image-button.patch |   31 +++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-11 20:53:32 UTC (rev 281482)
+++ PKGBUILD	2018-01-11 20:53:48 UTC (rev 281483)
@@ -4,7 +4,7 @@
 pkgname=sugar-activity-imageviewer
 _pkgname=ImageViewer
 pkgver=63
-pkgrel=1
+pkgrel=2
 pkgdesc="Image viewer for Sugar"
 arch=('any')
 url="https://wiki.sugarlabs.org/go/Activities/Image_Viewer"
@@ -11,16 +11,18 @@
 license=('GPL')
 groups=('sugar-fructose')
 depends=('sugar-toolkit-gtk3')
-source=(https://download.sugarlabs.org/sources/sucrose/fructose/$_pkgname/$_pkgname-$pkgver.tar.bz2)
-sha256sums=('336fa7c214711d2f65eb4e9bdd0b575004a01d5fc67f35a9a5d5d55ef823dc40')
+source=(https://download.sugarlabs.org/sources/sucrose/fructose/$_pkgname/$_pkgname-$pkgver.tar.bz2
+        fix-choose-image-button.patch)
+sha256sums=('336fa7c214711d2f65eb4e9bdd0b575004a01d5fc67f35a9a5d5d55ef823dc40'
+            '22bee7f1db29a058fc267e19198b458270d22d435696ec491a5b5448bc610253')
 
 prepare() {
   cd $_pkgname-$pkgver
   sed -i 's@^#!.*python$@#!/usr/bin/python2@' setup.py
+  patch -Np1 -i ../fix-choose-image-button.patch
 }
 
 package() {
   cd $_pkgname-$pkgver
-  python2 setup.py install --prefix "$pkgdir/usr"
-  rm -r "$pkgdir"/usr/share/applications
+  python2 setup.py install --prefix "$pkgdir/usr" --skip-install-desktop-file
 }

Added: fix-choose-image-button.patch
===================================================================
--- fix-choose-image-button.patch	                        (rev 0)
+++ fix-choose-image-button.patch	2018-01-11 20:53:48 UTC (rev 281483)
@@ -0,0 +1,31 @@
+From 5ff2b59266e67eba88fb235560c083b0b4f0d6ce Mon Sep 17 00:00:00 2001
+From: James Cameron <quozl at laptop.org>
+Date: Sat, 30 Sep 2017 19:03:24 +1000
+Subject: [PATCH] Fix choose an image button
+
+When a new instance of ImageViewer is started, the "Choose an image"
+does not work.  A traceback is in log;
+
+Traceback (most recent call last):
+  File "/usr/share/sugar/activities/ImageViewer.activity/ImageViewerActivity.py", line 396, in _show_picker_cb
+    if not self._want_document:
+AttributeError: 'ImageViewerActivity' object has no attribute '_want_document'
+
+Regression caused by d496604 which removed the initialisation of the
+attribute from the object.
+---
+ ImageViewerActivity.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ImageViewerActivity.py b/ImageViewerActivity.py
+index c7bf7b3..3e5baf0 100644
+--- a/ImageViewerActivity.py
++++ b/ImageViewerActivity.py
+@@ -95,6 +95,7 @@ def __init__(self, handle):
+         # Status of temp file used for write_file:
+         self._tempfile = None
+         self._close_requested = False
++        self._want_document = True
+ 
+         self._zoom_out_button = None
+         self._zoom_in_button = None



More information about the arch-commits mailing list