diff options
author | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-02-05 03:05:27 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-02-05 03:05:27 +0800 |
commit | ca956826690a02f63da4befc2ff17c1700f1c570 (patch) | |
tree | d3f1cc6b8009ebee4a8b4fa70f0f112fe9a2d8fa /src | |
parent | 3fc4676d136b6c40f4c3ce3a91e4d0dde149d6b7 (diff) | |
download | gsoc2013-epiphany-ca956826690a02f63da4befc2ff17c1700f1c570.tar gsoc2013-epiphany-ca956826690a02f63da4befc2ff17c1700f1c570.tar.gz gsoc2013-epiphany-ca956826690a02f63da4befc2ff17c1700f1c570.tar.bz2 gsoc2013-epiphany-ca956826690a02f63da4befc2ff17c1700f1c570.tar.lz gsoc2013-epiphany-ca956826690a02f63da4befc2ff17c1700f1c570.tar.xz gsoc2013-epiphany-ca956826690a02f63da4befc2ff17c1700f1c570.tar.zst gsoc2013-epiphany-ca956826690a02f63da4befc2ff17c1700f1c570.zip |
Fix back button looping through history.
Bug #513803.
svn path=/trunk/; revision=7917
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-navigation-action.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c index a8876b699..863e97aef 100644 --- a/src/ephy-navigation-action.c +++ b/src/ephy-navigation-action.c @@ -395,32 +395,36 @@ ephy_navigation_action_activate (GtkAction *gtk_action) if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_BACK) { EphyHistoryItem *back_item; - char *url; - + back_item = ephy_embed_get_previous_history_item (embed); if (back_item == NULL) return; - url = ephy_history_item_get_url (back_item); - ephy_link_open (EPHY_LINK (action), - url, - NULL, - ephy_gui_is_middle_click () ? EPHY_LINK_NEW_TAB : 0); - g_free (url); + if (ephy_gui_is_middle_click ()) + { + embed = ephy_link_open (EPHY_LINK (action), + "about:blank", + NULL, + EPHY_LINK_NEW_TAB); + } + ephy_embed_go_to_history_item (embed, back_item); + g_object_unref (back_item); } else if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_FORWARD) { EphyHistoryItem *forward_item; - char *url; forward_item = ephy_embed_get_next_history_item (embed); if (forward_item == NULL) return; - url = ephy_history_item_get_url (forward_item); - ephy_link_open (EPHY_LINK (action), - url, - NULL, - ephy_gui_is_middle_click () ? EPHY_LINK_NEW_TAB : 0); - g_free (url); + if (ephy_gui_is_middle_click ()) + { + embed = ephy_link_open (EPHY_LINK (action), + "about:blank", + NULL, + EPHY_LINK_NEW_TAB); + } + ephy_embed_go_to_history_item (embed, forward_item); + g_object_unref (forward_item); } else if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_UP) { |