]> www.fi.muni.cz Git - evince.git/commitdiff
Store link before jump, not the destination. For me it seems like more
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Sun, 28 Jan 2007 14:12:08 +0000 (14:12 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 28 Jan 2007 14:12:08 +0000 (14:12 +0000)
2007-01-28  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

* shell/ev-navigation-action.c: (new_history_menu_item):
* shell/ev-page-cache.c: (ev_page_cache_set_current_page_history):
* shell/ev-view.c: (ev_view_handle_link):
* shell/ev-window.c:

Store link before jump, not the destination. For me it
seems like more natural history behavior.

svn path=/trunk/; revision=2261

ChangeLog
shell/ev-navigation-action.c
shell/ev-page-cache.c
shell/ev-view.c
shell/ev-window.c

index 867c2fd0723ab1247dd33d3a1ac467e5e87c6c30..151262c98e878421ceb11740fb19cfd827996f4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-01-28  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * shell/ev-navigation-action.c: (new_history_menu_item):
+       * shell/ev-page-cache.c: (ev_page_cache_set_current_page_history):
+       * shell/ev-view.c: (ev_view_handle_link):
+       * shell/ev-window.c:
+       
+       Store link before jump, not the destination. For me it 
+       seems like more natural history behavior.
+
 2007-01-28  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * shell/ev-navigation-action.c: (activate_menu_item_cb),
index dc98ce759cdb009e259fab1a0e16b952321657e4..88fe67b6de01bbadca11021d4876aa0568fa9fe5 100644 (file)
@@ -93,10 +93,6 @@ new_history_menu_item (EvNavigationAction *action,
        const char *title;
 
        title = ev_link_get_title (link);
-       
-       if (!title)
-               title = _("External link");
-
        item = gtk_image_menu_item_new_with_label (title);
        g_object_set_data (G_OBJECT (item), "index",
                           GINT_TO_POINTER (index));
index a6d7bd9e99fc713fe8ed2f1c1ff1270bd9da6678..7ea0c0f9d04d7020d80b18075d95d0008b90428b 100644 (file)
@@ -340,8 +340,8 @@ void
 ev_page_cache_set_current_page_history (EvPageCache *page_cache,
                                        int          page)
 {
-       if (page != page_cache->current_page)
-               g_signal_emit (page_cache, signals [HISTORY_CHANGED], 0, page);
+       if (abs (page - page_cache->current_page) > 1)
+               g_signal_emit (page_cache, signals [HISTORY_CHANGED], 0, page_cache->current_page);
                
        ev_page_cache_set_current_page (page_cache, page);
 }
index 37ab5366d2ef35ca2ebd655c1e3431a2d73ba39c..7275fb643b37bdf323ebaf26065b00cd8312aba9 100644 (file)
@@ -1347,6 +1347,8 @@ ev_view_handle_link (EvView *view, EvLink *link)
        action = ev_link_get_action (link);
        if (!action)
                return;
+
+       g_signal_emit (view, signals[SIGNAL_HANDLE_LINK], 0, link);
        
        type = ev_link_action_get_action_type (action);
 
@@ -1365,7 +1367,6 @@ ev_view_handle_link (EvView *view, EvLink *link)
                        g_signal_emit (view, signals[SIGNAL_EXTERNAL_LINK], 0, action);
                        break;
        }
-       g_signal_emit (view, signals[SIGNAL_HANDLE_LINK], 0, link);
 }
 
 static gchar *
index 51b8abde930083f31f7db39b5ac0b5158f3d28c6..1d36a12b911158e6de38a8dacf8d77a10c58ae00 100644 (file)
@@ -4340,7 +4340,10 @@ do_action_named (EvWindow *window, EvLinkAction *action)
 static void
 view_handle_link_cb (EvView *view, EvLink *link, EvWindow *window)
 {
-       ev_history_add_link (window->priv->history, link);
+       int current_page = ev_page_cache_get_current_page (window->priv->page_cache);
+       ev_history_add_page (window->priv->history, 
+                            current_page,
+                            ev_page_cache_get_page_label (window->priv->page_cache, current_page));
 }
 
 static void