diff options
author | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-02-01 08:36:34 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@src.gnome.org> | 2008-02-01 08:36:34 +0800 |
commit | 28f21a63da9ecf36ec2b32e9070071b9e1678ec7 (patch) | |
tree | e06f185ea1005b7938f59546c322d6ec7c2eab68 | |
parent | 75a235884d12d5aac27f2a51fe0a6e0820f880b2 (diff) | |
download | gsoc2013-epiphany-28f21a63da9ecf36ec2b32e9070071b9e1678ec7.tar gsoc2013-epiphany-28f21a63da9ecf36ec2b32e9070071b9e1678ec7.tar.gz gsoc2013-epiphany-28f21a63da9ecf36ec2b32e9070071b9e1678ec7.tar.bz2 gsoc2013-epiphany-28f21a63da9ecf36ec2b32e9070071b9e1678ec7.tar.lz gsoc2013-epiphany-28f21a63da9ecf36ec2b32e9070071b9e1678ec7.tar.xz gsoc2013-epiphany-28f21a63da9ecf36ec2b32e9070071b9e1678ec7.tar.zst gsoc2013-epiphany-28f21a63da9ecf36ec2b32e9070071b9e1678ec7.zip |
Make middle clicking on Back/Forward toolbar buttons open again in
a new tab, as it was in 2.20. Bug #513029.
svn path=/trunk/; revision=7903
-rw-r--r-- | src/ephy-navigation-action.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c index 21a7c053e..a8876b699 100644 --- a/src/ephy-navigation-action.c +++ b/src/ephy-navigation-action.c @@ -394,18 +394,44 @@ ephy_navigation_action_activate (GtkAction *gtk_action) if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_BACK) { - ephy_embed_go_back (embed); + 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); } else if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_FORWARD) { - ephy_embed_go_forward (embed); + 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); } else if (action->priv->direction == EPHY_NAVIGATION_DIRECTION_UP) { + GSList *up_list; + + up_list = ephy_embed_get_go_up_list (embed); ephy_link_open (EPHY_LINK (action), - ephy_embed_get_go_up_list (embed)->data, + up_list->data, NULL, ephy_gui_is_middle_click () ? EPHY_LINK_NEW_TAB : 0); + g_slist_free (up_list); } } |