From 0238a377973ad82bd73e4e8f12a291b62359e9c1 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 30 Jun 2008 07:23:52 +0000 Subject: embed: remove ephy_embed_get_{next,previous}_history_item. Use WebKit APIs directly. svn path=/trunk/; revision=8312 --- src/ephy-window.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/ephy-window.c b/src/ephy-window.c index ab4edcb14..51b9f6895 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -65,6 +65,7 @@ #include #include #include +#include #ifdef HAVE_X11_XF86KEYSYM_H #include @@ -1615,9 +1616,11 @@ sync_tab_navigation (EphyEmbed *embed, EphyWindow *window) { EphyEmbedNavigationFlags flags; - EphyHistoryItem *item; + WebKitWebHistoryItem *item; + WebKitWebView *web_view; + WebKitWebBackForwardList *web_back_forward_list; gboolean up = FALSE, back = FALSE, forward = FALSE; - char *back_title = NULL, *forward_title = NULL; + const char *back_title = NULL, *forward_title = NULL; if (window->priv->closing) return; @@ -1639,29 +1642,26 @@ sync_tab_navigation (EphyEmbed *embed, ephy_toolbar_set_navigation_actions (window->priv->toolbar, back, forward, up); - item = ephy_embed_get_previous_history_item (embed); + web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed); + web_back_forward_list = webkit_web_view_get_back_forward_list (web_view); + + item = webkit_web_back_forward_list_get_back_item (web_back_forward_list); if (item) { - back_title = ephy_history_item_get_title (item); - g_object_unref (item); + back_title = webkit_web_history_item_get_title (item); } - - item = ephy_embed_get_next_history_item (embed); + item = webkit_web_back_forward_list_get_forward_item (web_back_forward_list); if (item) { - forward_title = ephy_history_item_get_title (item); - g_object_unref (item); + forward_title = webkit_web_history_item_get_title (item); } ephy_toolbar_set_navigation_tooltips (window->priv->toolbar, back_title, forward_title); - - g_free (back_title); - g_free (forward_title); } static void -- cgit v1.2.3