Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2007-01-28 14:12:08 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2007-01-28 14:12:08 (GMT)
commit1740f9ca0bb04fbc0afc9ddb9d23a6aa2090baa1 (patch)
tree2704413fe412f1f3c1b9636a70a598b73a680761 /shell
parent1fa2f70a8b8cf62e7324572942aa55a6f2bd039c (diff)
Store link before jump, not the destination. For me it seems like more
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
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-navigation-action.c4
-rw-r--r--shell/ev-page-cache.c4
-rw-r--r--shell/ev-view.c3
-rw-r--r--shell/ev-window.c5
4 files changed, 8 insertions, 8 deletions
diff --git a/shell/ev-navigation-action.c b/shell/ev-navigation-action.c
index dc98ce7..88fe67b 100644
--- a/shell/ev-navigation-action.c
+++ b/shell/ev-navigation-action.c
@@ -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));
diff --git a/shell/ev-page-cache.c b/shell/ev-page-cache.c
index a6d7bd9..7ea0c0f 100644
--- a/shell/ev-page-cache.c
+++ b/shell/ev-page-cache.c
@@ -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);
}
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 37ab536..7275fb6 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -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 *
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 51b8abd..1d36a12 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -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