diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2017-05-31 09:38:36 +0300 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2017-05-31 09:42:35 +0300 |
commit | 9b50e2a36d6d2cc36c3b74054585128c32d2ba1d (patch) | |
tree | 105c1e850c8d49a49da96aadf3547c1228c9eedc /media-gfx/cropgui | |
parent | media-plugins/kodi-vfs-rar: RAR VFS addon for Kodi (diff) | |
download | gentoo-9b50e2a36d6d2cc36c3b74054585128c32d2ba1d.tar.gz gentoo-9b50e2a36d6d2cc36c3b74054585128c32d2ba1d.tar.bz2 gentoo-9b50e2a36d6d2cc36c3b74054585128c32d2ba1d.zip |
media-gfx/cropgui: revision bump
Backported fix: use tobytes() instead of deprecated tostring()
Drop old revision
Reported-by: Massimo Burcheri <massimo.burcheri@gmx.de>
Gentoo-Bug: 616708
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'media-gfx/cropgui')
-rw-r--r-- | media-gfx/cropgui/cropgui-0.2-r1.ebuild (renamed from media-gfx/cropgui/cropgui-0.2.ebuild) | 4 | ||||
-rw-r--r-- | media-gfx/cropgui/files/cropgui-0.2-tobytes.patch | 40 |
2 files changed, 43 insertions, 1 deletions
diff --git a/media-gfx/cropgui/cropgui-0.2.ebuild b/media-gfx/cropgui/cropgui-0.2-r1.ebuild index 5518df4d23d3..89341edb6d18 100644 --- a/media-gfx/cropgui/cropgui-0.2.ebuild +++ b/media-gfx/cropgui/cropgui-0.2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -31,6 +31,8 @@ src_prepare() { cropgui.desktop || die 'sed on cropgui.desktop failed' # bug 471530 eapply "${FILESDIR}/${P}-PIL.patch" + # bug 616708 + eapply "${FILESDIR}/${P}-tobytes.patch" eapply_user } diff --git a/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch b/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch new file mode 100644 index 000000000000..18405143badf --- /dev/null +++ b/media-gfx/cropgui/files/cropgui-0.2-tobytes.patch @@ -0,0 +1,40 @@ +commit b664d1fefd7140ec4ec37b3b90a9007839029d8a +Author: Tristan Stenner <ttstenner@gmail.com> +Date: Fri Oct 9 08:40:04 2015 +0200 + + Try tostring(), fall back to tobytes() + +diff --git a/cropgtk.py b/cropgtk.py +index c1156b0..135b6a8 100755 +--- a/cropgtk.py ++++ b/cropgtk.py +@@ -170,7 +170,11 @@ class DragManager(DragManagerBase): + rendered = self.rendered() + rendered = rendered.convert('RGB') + i.set_size_request(*rendered.size) +- pixbuf = gtk.gdk.pixbuf_new_from_data(rendered.tostring(), ++ try: ++ image_data = rendered.tostring() ++ except: ++ image_data = rendered.tobytes() ++ pixbuf = gtk.gdk.pixbuf_new_from_data(image_data, + gtk.gdk.COLORSPACE_RGB, 0, 8, + rendered.size[0], rendered.size[1], 3*rendered.size[0]) + +diff --git a/filechooser.py b/filechooser.py +index f2f8122..a039d74 100644 +--- a/filechooser.py ++++ b/filechooser.py +@@ -49,7 +49,11 @@ def update_preview_cb(file_chooser, preview): + i.thumbnail((PREVIEW_SIZE, PREVIEW_SIZE), Image.ANTIALIAS) + i = i.convert('RGB') + i = apply_rotation(r, i) +- pixbuf = gtk.gdk.pixbuf_new_from_data(i.tostring(), ++ try: ++ image_data = i.tostring() ++ except: ++ image_data = i.tobytes() ++ pixbuf = gtk.gdk.pixbuf_new_from_data(image_data, + gtk.gdk.COLORSPACE_RGB, 0, 8, i.size[0], i.size[1], + i.size[0]*3) + preview.set_from_pixbuf(pixbuf) |