diff options
author | Xan Lopez <xan@src.gnome.org> | 2007-12-30 08:24:40 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2007-12-30 08:24:40 +0800 |
commit | e63a085bb01b783057e0cba91725f3af884d3292 (patch) | |
tree | 233f547200605c4001be2972b40ba516f976ce46 /src/ephy-window.c | |
parent | 2a776b7f4ea30e814b2703a50633143b5b0ebc95 (diff) | |
download | gsoc2013-epiphany-e63a085bb01b783057e0cba91725f3af884d3292.tar gsoc2013-epiphany-e63a085bb01b783057e0cba91725f3af884d3292.tar.gz gsoc2013-epiphany-e63a085bb01b783057e0cba91725f3af884d3292.tar.bz2 gsoc2013-epiphany-e63a085bb01b783057e0cba91725f3af884d3292.tar.lz gsoc2013-epiphany-e63a085bb01b783057e0cba91725f3af884d3292.tar.xz gsoc2013-epiphany-e63a085bb01b783057e0cba91725f3af884d3292.tar.zst gsoc2013-epiphany-e63a085bb01b783057e0cba91725f3af884d3292.zip |
Port ephy-window.c to the new API, remove old API.
Closes bug #506005
svn path=/trunk/; revision=7836
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index b7d4d4be7..ef8935bea 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1590,10 +1590,9 @@ sync_tab_navigation (EphyEmbed *embed, EphyWindow *window) { EphyEmbedNavigationFlags flags; + EphyHistoryItem *item; gboolean up = FALSE, back = FALSE, forward = FALSE; - char *back_url = NULL, *forward_url = NULL; char *back_title = NULL, *forward_title = NULL; - gint position; if (window->priv->closing) return; @@ -1615,18 +1614,21 @@ sync_tab_navigation (EphyEmbed *embed, ephy_toolbar_set_navigation_actions (window->priv->toolbar, back, forward, up); - position = ephy_embed_shistory_get_pos (embed); + item = ephy_embed_get_previous_history_item (embed); - if (position > 0) + if (item) { - ephy_embed_shistory_get_nth (embed, -1, TRUE, - &back_url, &back_title); + back_title = ephy_history_item_get_title (item); + g_object_unref (item); } - if (position < ephy_embed_shistory_n_items (embed) - 1) + + item = ephy_embed_get_next_history_item (embed); + + if (item) { - ephy_embed_shistory_get_nth (embed, 1, TRUE, - &forward_url, &forward_title); + forward_title = ephy_history_item_get_title (item); + g_object_unref (item); } ephy_toolbar_set_navigation_tooltips (window->priv->toolbar, @@ -1634,9 +1636,7 @@ sync_tab_navigation (EphyEmbed *embed, forward_title); g_free (back_title); - g_free (back_url); g_free (forward_title); - g_free (forward_url); } static void |