X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-sidebar-thumbnails.c;h=ec831491b742fd709e605a9f943b77d4b62bdd81;hb=refs%2Ftags%2FEVINCE_0_5_5;hp=ac449d8399607416f7f59b2e46aaf9c375c91e65;hpb=f0d4f37e3b6a3433c15e1e35236c1ccffeca4bee;p=evince.git diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index ac449d83..ec831491 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -307,14 +307,10 @@ adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails) 1, wy2 -1, &path2, NULL, NULL, NULL); } else if (priv->icon_view) { -#ifdef HAVE_GTK_ICON_VIEW_GET_VISIBLE_RANGE if (! GTK_WIDGET_REALIZED (priv->icon_view)) return; if (! gtk_icon_view_get_visible_range (GTK_ICON_VIEW (priv->icon_view), &path, &path2)) return; -#else - g_assert_not_reached (); -#endif } else { return; } @@ -383,7 +379,6 @@ ev_sidebar_thumbnails_set_loading_icon (EvSidebarThumbnails *sidebar_thumbnails) } void ev_sidebar_thumbnails_refresh (EvSidebarThumbnails *sidebar_thumbnails, - int rotation) { sidebar_thumbnails->priv->rotation = rotation; @@ -495,14 +490,10 @@ ev_sidebar_init_icon_view (EvSidebarThumbnails *ev_sidebar_thumbnails) static gboolean ev_sidebar_thumbnails_use_icon_view (EvSidebarThumbnails *sidebar_thumbnails) { -#ifdef HAVE_GTK_ICON_VIEW_GET_VISIBLE_RANGE EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv; if (ev_page_cache_get_n_pages (priv->page_cache) > MAX_ICON_VIEW_PAGE_COUNT) return FALSE; return TRUE; -#else - return FALSE; -#endif } static void @@ -552,11 +543,8 @@ page_changed_cb (EvPageCache *page_cache, gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE); gtk_tree_view_scroll_to_cell (tree_view, path, NULL, FALSE, 0.0, 0.0); } else if (sidebar->priv->icon_view) { - /* Guard against gtk-2.6 */ -#ifdef HAVE_GTK_ICON_VIEW_GET_VISIBLE_RANGE gtk_icon_view_select_path (GTK_ICON_VIEW (sidebar->priv->icon_view), path); gtk_icon_view_set_cursor (GTK_ICON_VIEW (sidebar->priv->icon_view), path, NULL, FALSE); -#endif } gtk_tree_path_free (path); @@ -607,6 +595,8 @@ ev_sidebar_thumbnails_set_document (EvSidebarPage *sidebar_page, if (! priv->icon_view) { ev_sidebar_init_icon_view (sidebar_thumbnails); g_object_notify (G_OBJECT (sidebar_thumbnails), "main_widget"); + } else { + gtk_widget_queue_resize (priv->icon_view); } } else { if (priv->icon_view) {