+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),
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));
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);
}
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);
g_signal_emit (view, signals[SIGNAL_EXTERNAL_LINK], 0, action);
break;
}
- g_signal_emit (view, signals[SIGNAL_HANDLE_LINK], 0, link);
}
static gchar *
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