aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-06-28 19:13:03 +0800
committerXan Lopez <xan@igalia.com>2012-06-28 19:13:50 +0800
commit26b13c310b1cb6e7239d8c34197da005aa0edcff (patch)
tree3ee88f6469c4253f683c45ebe6b355285346573e /embed
parentd4bef7810d2bf37c0e8c9eea9eaa65c59aece922 (diff)
downloadgsoc2013-epiphany-26b13c310b1cb6e7239d8c34197da005aa0edcff.tar
gsoc2013-epiphany-26b13c310b1cb6e7239d8c34197da005aa0edcff.tar.gz
gsoc2013-epiphany-26b13c310b1cb6e7239d8c34197da005aa0edcff.tar.bz2
gsoc2013-epiphany-26b13c310b1cb6e7239d8c34197da005aa0edcff.tar.lz
gsoc2013-epiphany-26b13c310b1cb6e7239d8c34197da005aa0edcff.tar.xz
gsoc2013-epiphany-26b13c310b1cb6e7239d8c34197da005aa0edcff.tar.zst
gsoc2013-epiphany-26b13c310b1cb6e7239d8c34197da005aa0edcff.zip
ephy-web-view: ephy_web_view_location_changed is private to its class
Do not make it public.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c94
-rw-r--r--embed/ephy-web-view.h2
2 files changed, 43 insertions, 53 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a24454272..9291ba0cb 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1991,6 +1991,49 @@ restore_zoom_level (EphyWebView *view,
(EphyHistoryJobCallback)get_host_for_url_cb, view);
}
+static void
+ephy_web_view_location_changed (EphyWebView *view,
+ const char *location)
+{
+ GObject *object = G_OBJECT (view);
+ EphyWebViewPrivate *priv = view->priv;
+
+ g_object_freeze_notify (object);
+
+ /* Do this up here so we still have the old address around. */
+ ephy_file_monitor_update_location (priv->file_monitor, location);
+
+ /* Do not expose about:blank to the user, an empty address
+ bar will do better */
+ if (location == NULL || location[0] == '\0' ||
+ strcmp (location, "about:blank") == 0) {
+ ephy_web_view_set_address (view, NULL);
+ ephy_web_view_set_title (view, EMPTY_PAGE);
+ } else if (g_str_has_prefix (location, EPHY_ABOUT_SCHEME)) {
+ char *new_address = g_strdup_printf ("about:%s", location + EPHY_ABOUT_SCHEME_LEN + 1);
+ ephy_web_view_set_address (view, new_address);
+ g_free (new_address);
+ ephy_web_view_set_title (view, EMPTY_PAGE);
+ } else {
+ /* We do this to get rid of an eventual password in the URL. */
+ ephy_web_view_set_address (view, location);
+ ephy_web_view_set_loading_title (view, location, TRUE);
+ }
+
+ ephy_web_view_set_link_message (view, NULL);
+#ifdef HAVE_WEBKIT2
+ /* TODO: Favicons */
+#else
+ _ephy_web_view_set_icon_address (view, NULL);
+#endif
+
+ update_navigation_flags (view);
+
+ g_object_notify (object, "embed-title");
+
+ g_object_thaw_notify (object);
+}
+
#ifdef HAVE_WEBKIT2
static void
load_changed_cb (WebKitWebView *web_view,
@@ -3167,57 +3210,6 @@ ephy_web_view_set_loading_title (EphyWebView *view,
}
/**
- * ephy_web_view_location_changed:
- * @view: an #EphyWebView
- * @location: new location for @view
- *
- * Sets @location as the new address for @view while preventing notify events
- * in @view.
- **/
-void
-ephy_web_view_location_changed (EphyWebView *view,
- const char *location)
-{
- GObject *object = G_OBJECT (view);
- EphyWebViewPrivate *priv = view->priv;
-
- g_object_freeze_notify (object);
-
- /* Do this up here so we still have the old address around. */
- ephy_file_monitor_update_location (priv->file_monitor, location);
-
- /* Do not expose about:blank to the user, an empty address
- bar will do better */
- if (location == NULL || location[0] == '\0' ||
- strcmp (location, "about:blank") == 0) {
- ephy_web_view_set_address (view, NULL);
- ephy_web_view_set_title (view, EMPTY_PAGE);
- } else if (g_str_has_prefix (location, EPHY_ABOUT_SCHEME)) {
- char *new_address = g_strdup_printf ("about:%s", location + EPHY_ABOUT_SCHEME_LEN + 1);
- ephy_web_view_set_address (view, new_address);
- g_free (new_address);
- ephy_web_view_set_title (view, EMPTY_PAGE);
- } else {
- /* We do this to get rid of an eventual password in the URL. */
- ephy_web_view_set_address (view, location);
- ephy_web_view_set_loading_title (view, location, TRUE);
- }
-
- ephy_web_view_set_link_message (view, NULL);
-#ifdef HAVE_WEBKIT2
- /* TODO: Favicons */
-#else
- _ephy_web_view_set_icon_address (view, NULL);
-#endif
-
- update_navigation_flags (view);
-
- g_object_notify (object, "embed-title");
-
- g_object_thaw_notify (object);
-}
-
-/**
* ephy_web_view_is_loading:
* @view: an #EphyWebView
*
diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h
index 1a64cff91..c742d182e 100644
--- a/embed/ephy-web-view.h
+++ b/embed/ephy-web-view.h
@@ -173,8 +173,6 @@ void ephy_web_view_load_error_page (EphyWebView
/* These should be private */
void ephy_web_view_set_address (EphyWebView *view,
const char *address);
-void ephy_web_view_location_changed (EphyWebView *view,
- const char *location);
void ephy_web_view_set_loading_title (EphyWebView *view,
const char *title,
gboolean is_address);