[Pkg-sugar-commit] [sugar-browse-activity] 01/03: Download image: fix the creation of the preview image - #4498

Jonas Smedegaard dr at jones.dk
Mon Apr 20 09:47:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v149.3
in repository sugar-browse-activity.

commit 7606b2deaea7e35f1ece0208d35b7e7f655094db
Author: Manuel Quiñones <manuq at laptop.org>
Date:   Fri May 17 10:59:58 2013 -0300

    Download image: fix the creation of the preview image - #4498
    
    This was preventing the download to finish, leaving a broken entry in
    the Journal.
    
    Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
 downloadmanager.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/downloadmanager.py b/downloadmanager.py
index 1766819..b807959 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -33,6 +33,7 @@ from sugar3 import profile
 from sugar3 import mime
 from sugar3.graphics.alert import Alert, TimeoutAlert
 from sugar3.graphics.icon import Icon
+from sugar3.graphics import style
 from sugar3.activity import activity
 
 DS_DBUS_SERVICE = 'org.laptop.sugar.DataStore'
@@ -313,7 +314,7 @@ class Download(object):
         image_width = pixbuf.get_width()
         image_height = pixbuf.get_height()
 
-        preview_width, preview_height = activity.PREVIEW_SIZE
+        preview_width, preview_height = style.zoom(300), style.zoom(225)
         preview_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32,
                                              preview_width, preview_height)
         cr = cairo.Context(preview_surface)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-browse-activity.git



More information about the pkg-sugar-commit mailing list