aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-06-28 19:30:35 +0800
committerXan Lopez <xan@igalia.com>2012-06-28 19:30:35 +0800
commite28f57bde15eebfc46e238de768298134653fde3 (patch)
treefd7bd6d310cdfd753f1941822b471128bebad733 /embed/ephy-web-view.c
parentb4d5a8daa7fede8dc03d6765c2ac55ea71d0a385 (diff)
downloadgsoc2013-epiphany-e28f57bde15eebfc46e238de768298134653fde3.tar.gz
gsoc2013-epiphany-e28f57bde15eebfc46e238de768298134653fde3.tar.zst
gsoc2013-epiphany-e28f57bde15eebfc46e238de768298134653fde3.zip
ephy-web-view: make set_address completely private
It's not used outside its own class either, so we can make it private to the file.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c78
1 files changed, 37 insertions, 41 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 9291ba0cb..8c61e40dc 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1148,6 +1148,43 @@ title_changed_cb (WebKitWebView *web_view,
}
static void
+_ephy_web_view_set_is_blank (EphyWebView *view,
+ gboolean is_blank)
+{
+ EphyWebViewPrivate *priv = view->priv;
+
+ if (priv->is_blank != is_blank) {
+ priv->is_blank = is_blank;
+ g_object_notify (G_OBJECT (view), "is-blank");
+ }
+}
+
+/**
+ * Sets the view location to be address. Note that this function might
+ * also set the typed-address property to %NULL.
+ */
+static void
+ephy_web_view_set_address (EphyWebView *view,
+ const char *address)
+{
+ EphyWebViewPrivate *priv = view->priv;
+ GObject *object = G_OBJECT (view);
+ gboolean is_blank;
+
+ g_free (priv->address);
+ priv->address = g_strdup (address);
+
+ is_blank = address == NULL ||
+ strcmp (address, "about:blank") == 0;
+ _ephy_web_view_set_is_blank (view, is_blank);
+
+ if (ephy_web_view_is_loading (view) && priv->typed_address != NULL)
+ ephy_web_view_set_typed_address (view, NULL);
+
+ g_object_notify (object, "address");
+}
+
+static void
uri_changed_cb (WebKitWebView *web_view,
GParamSpec *spec,
gpointer data)
@@ -3058,47 +3095,6 @@ ephy_web_view_copy_back_history (EphyWebView *source,
#endif
}
-static void
-_ephy_web_view_set_is_blank (EphyWebView *view,
- gboolean is_blank)
-{
- EphyWebViewPrivate *priv = view->priv;
-
- if (priv->is_blank != is_blank) {
- priv->is_blank = is_blank;
- g_object_notify (G_OBJECT (view), "is-blank");
- }
-}
-
-/**
- * ephy_web_view_set_address:
- * @view: an #EphyWebView
- * @address: address to set @view to
- *
- * Sets @view location to be @address. Note that this function might also set
- * the typed-address property to %NULL.
- */
-void
-ephy_web_view_set_address (EphyWebView *view,
- const char *address)
-{
- EphyWebViewPrivate *priv = view->priv;
- GObject *object = G_OBJECT (view);
- gboolean is_blank;
-
- g_free (priv->address);
- priv->address = g_strdup (address);
-
- is_blank = address == NULL ||
- strcmp (address, "about:blank") == 0;
- _ephy_web_view_set_is_blank (view, is_blank);
-
- if (ephy_web_view_is_loading (view) && priv->typed_address != NULL)
- ephy_web_view_set_typed_address (view, NULL);
-
- g_object_notify (object, "address");
-}
-
/**
* ephy_web_view_set_title:
* @view: an #EphyWebView