From 3060de2a0ceeb976c1da6b79f3b3a4c7ed7848d2 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Thu, 15 Mar 2012 09:37:17 +0100 Subject: ephy-web-view: remove can_go_up/go_up code We do not support this anymore in our UI. --- embed/ephy-web-view.c | 45 --------------------------------------------- embed/ephy-web-view.h | 7 ++----- 2 files changed, 2 insertions(+), 50 deletions(-) diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index d7aeb61dc..3b29e9f01 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1051,9 +1051,6 @@ update_navigation_flags (EphyWebView *view) guint flags = 0; WebKitWebView *web_view = WEBKIT_WEB_VIEW (view); - if (ephy_web_view_can_go_up (view)) - flags |= EPHY_WEB_VIEW_NAV_UP; - if (webkit_web_view_can_go_back (web_view)) flags |= EPHY_WEB_VIEW_NAV_BACK; @@ -3022,37 +3019,6 @@ ephy_web_view_location_changed (EphyWebView *view, g_object_thaw_notify (object); } -/** - * ephy_web_view_can_go_up: - * @view: an #EphyWebView - * - * Returns whether @view can travel to a higher-level directory on the server. - * For example, for http://www.example.com/subdir/foo.html, returns %TRUE; for - * http://www.example.com/, returns %FALSE. - * - * Return value: %TRUE if @view can browse to a higher-level directory - **/ -gboolean -ephy_web_view_can_go_up (EphyWebView *view) -{ - SoupURI *uri; - gboolean result; - - uri = soup_uri_new (ephy_web_view_get_address (view)); - if (uri == NULL) - return FALSE; - - if (strcmp (uri->scheme, "about") == 0 || strcmp (uri->scheme, "data") == 0) { - soup_uri_free (uri); - return FALSE; - } - - result = uri->fragment || uri->query || (uri->path && (strlen (uri->path) > 1)); - soup_uri_free (uri); - - return result; -} - /** * ephy_web_view_is_loading: * @view: an #EphyWebView @@ -3405,17 +3371,6 @@ ephy_web_view_get_location (EphyWebView *view, return g_strdup (webkit_web_frame_get_uri (web_frame)); } -/** - * ephy_web_view_go_up: - * @view: an #EphyWebView - * - * Moves @view one level up in its web page's directory hierarchy. - **/ -void -ephy_web_view_go_up (EphyWebView *view) -{ -} - /** * ephy_web_view_get_security_level: * @view: an #EphyWebView diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h index d3e42293f..33d912f14 100644 --- a/embed/ephy-web-view.h +++ b/embed/ephy-web-view.h @@ -45,9 +45,8 @@ typedef struct _EphyWebViewPrivate EphyWebViewPrivate; typedef enum { - EPHY_WEB_VIEW_NAV_UP = 1 << 0, - EPHY_WEB_VIEW_NAV_BACK = 1 << 1, - EPHY_WEB_VIEW_NAV_FORWARD = 1 << 2 + EPHY_WEB_VIEW_NAV_BACK = 1 << 0, + EPHY_WEB_VIEW_NAV_FORWARD = 1 << 1 } EphyWebViewNavigationFlags; typedef enum @@ -155,7 +154,6 @@ gboolean ephy_web_view_get_is_blank (EphyWebView gboolean ephy_web_view_has_modified_forms (EphyWebView *view); char * ephy_web_view_get_location (EphyWebView *view, gboolean toplevel); -void ephy_web_view_go_up (EphyWebView *view); void ephy_web_view_get_security_level (EphyWebView *view, EphyWebViewSecurityLevel *level, char **description); @@ -164,7 +162,6 @@ void ephy_web_view_print (EphyWebView void ephy_web_view_set_title (EphyWebView *view, const char *view_title); const char * ephy_web_view_get_title (EphyWebView *view); -gboolean ephy_web_view_can_go_up (EphyWebView *view); const char * ephy_web_view_get_address (EphyWebView *view); const char * ephy_web_view_get_title_composite (EphyWebView *view); -- cgit v1.2.3