[epiphany] ephy-web-view: make set_address completely private



commit e28f57bde15eebfc46e238de768298134653fde3
Author: Xan Lopez <xan igalia com>
Date:   Thu Jun 28 13:30:35 2012 +0200

    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.

 embed/ephy-embed-private.h |    2 -
 embed/ephy-web-view.c      |   78 +++++++++++++++++++++-----------------------
 2 files changed, 37 insertions(+), 43 deletions(-)
---
diff --git a/embed/ephy-embed-private.h b/embed/ephy-embed-private.h
index e82368d..f9cac08 100644
--- a/embed/ephy-embed-private.h
+++ b/embed/ephy-embed-private.h
@@ -47,8 +47,6 @@ G_BEGIN_DECLS
 void                       ephy_web_view_set_visit_type           (EphyWebView *view, 
                                                                    EphyHistoryPageVisitType visit_type);
 EphyHistoryPageVisitType   ephy_web_view_get_visit_type           (EphyWebView *view);
-void                       ephy_web_view_set_address              (EphyWebView               *view,
-                                                                   const char                *address);
 void                       ephy_web_view_set_loading_title        (EphyWebView               *view,
                                                                    const char                *title,
                                                                    gboolean                   is_address);
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 9291ba0..8c61e40 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]