]> www.fi.muni.cz Git - evince.git/commitdiff
Correctly handle link dest with page label
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 28 Jan 2007 21:18:18 +0000 (21:18 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 28 Jan 2007 21:18:18 +0000 (21:18 +0000)
svn path=/trunk/; revision=2268

shell/ev-window.c

index 325d91649e43658a30de2f247eb8ceb6e2e5c5e2..af927dbcd83d55c7bbaf7b1fe3e069fe5ddb67c0 100644 (file)
@@ -645,7 +645,7 @@ page_changed_cb (EvPageCache *page_cache,
 }
 
 typedef struct _FindTask {
-    gchar *page_label;
+    const gchar *page_label;
     gchar *chapter;
 } FindTask;
 
@@ -680,7 +680,7 @@ ev_window_find_chapter (GtkTreeModel *tree_model,
 static void
 ev_window_add_history (EvWindow *window, gint page, EvLink *link)
 {
-       gchar *page_label;
+       const gchar *page_label;
        gchar *link_title;
        FindTask find_task;
 
@@ -700,7 +700,11 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
        if (page < 0)
                return;
        
-       page_label = ev_page_cache_get_page_label (window->priv->page_cache, page);
+       
+       if (ev_link_dest_get_page_label (dest))
+               page_label = ev_link_dest_get_page_label (dest);
+       else 
+               page_label = ev_page_cache_get_page_label (window->priv->page_cache, page);
        
        find_task.page_label = page_label;
        find_task.chapter = NULL;