]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-sidebar-thumbnails.c
Start rendering pages before any other jobs.
[evince.git] / shell / ev-sidebar-thumbnails.c
index 325c1633ee147351ca95b2bf9b8b6286f47a7ebe..d6a8af51e8127248cde6077e3ac752792d02242b 100644 (file)
@@ -354,14 +354,11 @@ adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails)
                return;
        }
 
                return;
        }
 
-       if (path == NULL)
-               path = gtk_tree_path_new_first ();
-       if (path2 == NULL)
-               path2 = gtk_tree_path_new_from_indices (priv->n_pages,
-                                                       -1);
-       update_visible_range (sidebar_thumbnails,
-                             gtk_tree_path_get_indices (path)[0],
-                             gtk_tree_path_get_indices (path2)[0]);
+       if (path && path2) {
+               update_visible_range (sidebar_thumbnails,
+                                     gtk_tree_path_get_indices (path)[0],
+                                     gtk_tree_path_get_indices (path2)[0]);
+       }
 
        gtk_tree_path_free (path);
        gtk_tree_path_free (path2);
 
        gtk_tree_path_free (path);
        gtk_tree_path_free (path2);
@@ -679,6 +676,9 @@ ev_sidebar_thumbnails_set_document (EvSidebarPage   *sidebar_page,
        g_signal_connect (priv->page_cache, "page-changed", G_CALLBACK (page_changed_cb), sidebar_thumbnails);
        sidebar_thumbnails->priv->start_page = 0;
        sidebar_thumbnails->priv->end_page = 0;
        g_signal_connect (priv->page_cache, "page-changed", G_CALLBACK (page_changed_cb), sidebar_thumbnails);
        sidebar_thumbnails->priv->start_page = 0;
        sidebar_thumbnails->priv->end_page = 0;
+       page_changed_cb (priv->page_cache,
+                        ev_page_cache_get_current_page (priv->page_cache),
+                        sidebar_thumbnails);
        adjustment_changed_cb (sidebar_thumbnails);
 }
 
        adjustment_changed_cb (sidebar_thumbnails);
 }