From 9a3e4ebc55e11c3b00b0e7464b11ecec121bc6f2 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sun, 10 Feb 2008 14:52:00 +0000 Subject: Do not use history API if we only want to go back or forward, only use it when necessary (ie, when we want to open item in new tab). Bug #515554 svn path=/trunk/; revision=7926 --- src/ephy-navigation-action.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/ephy-navigation-action.c') diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c index 863e97aef..808ea7f7b 100644 --- a/src/ephy-navigation-action.c +++ b/src/ephy-navigation-action.c @@ -394,11 +394,6 @@ ephy_navigation_action_activate (GtkAction *gtk_action) if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_BACK) { - EphyHistoryItem *back_item; - - back_item = ephy_embed_get_previous_history_item (embed); - if (back_item == NULL) return; - if (ephy_gui_is_middle_click ()) { embed = ephy_link_open (EPHY_LINK (action), @@ -406,16 +401,10 @@ ephy_navigation_action_activate (GtkAction *gtk_action) NULL, EPHY_LINK_NEW_TAB); } - ephy_embed_go_to_history_item (embed, back_item); - g_object_unref (back_item); + ephy_embed_go_back (embed); } else if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_FORWARD) { - EphyHistoryItem *forward_item; - - forward_item = ephy_embed_get_next_history_item (embed); - if (forward_item == NULL) return; - if (ephy_gui_is_middle_click ()) { embed = ephy_link_open (EPHY_LINK (action), @@ -423,8 +412,7 @@ ephy_navigation_action_activate (GtkAction *gtk_action) NULL, EPHY_LINK_NEW_TAB); } - ephy_embed_go_to_history_item (embed, forward_item); - g_object_unref (forward_item); + ephy_embed_go_forward (embed); } else if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_UP) { -- cgit