diff options
author | Manuel Quiñones <manuq@laptop.org> | 2013-05-17 13:59:58 (GMT) |
---|---|---|
committer | Manuel Quiñones <manuq@laptop.org> | 2013-05-17 13:59:58 (GMT) |
commit | 7606b2deaea7e35f1ece0208d35b7e7f655094db (patch) | |
tree | cfd3e30590c6bdf06d07ee0743574ae112835d96 | |
parent | edfcd045c547c6f2d72419ecdd61e0ac4d2a4dfa (diff) |
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@laptop.org>
-rw-r--r-- | downloadmanager.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |