Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2007-01-28 22:04:14 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2007-01-28 22:04:14 (GMT)
commitb8f97c954e2e3c9b40f46dc55f3727cb7b35137c (patch)
tree120915c452b1d58cb50dbbc28503665c6b69a72c /shell/ev-window.c
parent8c53a52d2cf88d095bccbff7ea927100e082c537 (diff)
Correctly handle named destination links
2007-01-29 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * shell/ev-view.c: (ev_view_page_label_from_dest), (tip_from_link): * shell/ev-view.h: * shell/ev-window.c: (ev_window_add_history): Correctly handle named destination links svn path=/trunk/; revision=2269
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index af927db..dc03409 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -680,7 +680,7 @@ ev_window_find_chapter (GtkTreeModel *tree_model,
static void
ev_window_add_history (EvWindow *window, gint page, EvLink *link)
{
- const gchar *page_label;
+ const gchar *page_label = NULL;
gchar *link_title;
FindTask find_task;
@@ -692,20 +692,16 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
action = g_object_ref (ev_link_get_action (link));
dest = ev_link_action_get_dest (action);
page = ev_link_dest_get_page (dest);
+ page_label = ev_view_page_label_from_dest (window->priv->view, dest);
} else {
dest = ev_link_dest_new_page (page);
action = ev_link_action_new_dest (dest);
+ page_label = ev_page_cache_get_page_label (window->priv->page_cache, page);
}
- if (page < 0)
+ if (!page_label)
return;
-
- 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;
@@ -735,6 +731,7 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
ev_history_add_link (window->priv->history, real_link);
g_free (link_title);
+ g_free (page_label);
g_object_unref (real_link);
}