Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-sidebar-thumbnails.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2007-08-17 20:23:46 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2007-08-17 20:23:46 (GMT)
commit7657f1a15f49ea7aaf6c33c10a9d22095a9187ac (patch)
tree527ae403ef26ed09a27e1bcead45e34dc6e9df57 /shell/ev-sidebar-thumbnails.c
parentf636661bcd189fefca5dad99deca9088d4a4b317 (diff)
Also store in page-cache the dimensions of the thumbnails so that they can
2007-08-17 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-page-cache.c: (ev_page_cache_new), (ev_page_cache_get_thumbnail_size): * shell/ev-sidebar-thumbnails.c: (get_scale_for_page), (ev_sidebar_thumbnails_set_loading_icon): Also store in page-cache the dimensions of the thumbnails so that they can be used to create the correct loading icon in the side pane. Fixes bug #466857. svn path=/trunk/; revision=2630
Diffstat (limited to 'shell/ev-sidebar-thumbnails.c')
-rw-r--r--shell/ev-sidebar-thumbnails.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 192aa6f..6c20706 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -228,7 +228,7 @@ get_scale_for_page (EvSidebarThumbnails *sidebar_thumbnails,
gint width, height;
ev_page_cache_get_size (priv->page_cache,
- page, priv->rotation,
+ page, 0,
1.0, &width, &height);
return (gdouble)THUMBNAIL_WIDTH / (gdouble)width;
@@ -407,18 +407,14 @@ ev_sidebar_thumbnails_set_loading_icon (EvSidebarThumbnails *sidebar_thumbnails)
g_object_unref (sidebar_thumbnails->priv->loading_icon);
if (sidebar_thumbnails->priv->document) {
- gint width = THUMBNAIL_WIDTH;
- gint height;
- gint page_width, page_height;
+ gint width, height;
/* We get the dimensions of the first page so that we can make a blank
* icon. */
- ev_page_cache_get_size (sidebar_thumbnails->priv->page_cache, 0,
- sidebar_thumbnails->priv->rotation,
- 1.0, &page_width, &page_height);
+ ev_page_cache_get_thumbnail_size (sidebar_thumbnails->priv->page_cache, 0,
+ sidebar_thumbnails->priv->rotation,
+ &width, &height);
- height = (gint) (page_height * ((gdouble)width / page_width));
-
sidebar_thumbnails->priv->loading_icon =
ev_document_misc_get_thumbnail_frame (width, height, NULL);
} else {