]> www.fi.muni.cz Git - evince.git/commitdiff
Make sure not to use the history with documents not supporting links.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 3 Sep 2007 16:35:01 +0000 (16:35 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 3 Sep 2007 16:35:01 +0000 (16:35 +0000)
2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-window.c: (ev_window_add_history):
Make sure not to use the history with documents not supporting
links. Fixes bug #468954.

svn path=/trunk/; revision=2660

ChangeLog
shell/ev-window.c

index 5c51c9f7f5c223a9093968ceb94f9923d87133f1..0c596c938d332d45a7b3faa7be37a672a9cdd94e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window.c: (ev_window_add_history):
+
+       Make sure not to use the history with documents not supporting
+       links. Fixes bug #468954.
+       
 2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (ev_window_load_job_cb):
index 7ef19c55ceb87f37f3d208a681282dd536060cdb..34e94eb0eab391b868ee6bd394604e5f8b01d98c 100644 (file)
@@ -704,6 +704,9 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
        
        if (window->priv->history == NULL)
                return;
+
+       if (!EV_IS_DOCUMENT_LINKS (window->priv->document))
+               return;
        
        if (link) {
                action = g_object_ref (ev_link_get_action (link));
@@ -722,8 +725,7 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
        find_task.page_label = page_label;
        find_task.chapter = NULL;
        
-       if (EV_IS_DOCUMENT_LINKS (window->priv->document) && 
-           ev_document_links_has_document_links (EV_DOCUMENT_LINKS (window->priv->document))) {
+       if (ev_document_links_has_document_links (EV_DOCUMENT_LINKS (window->priv->document))) {
                GtkTreeModel *model;
        
                g_object_get (G_OBJECT (window->priv->sidebar_links), "model", &model, NULL);