[epiphany] ephy-web-view: ephy_web_view_location_changed is private to its class



commit 26b13c310b1cb6e7239d8c34197da005aa0edcff
Author: Xan Lopez <xan igalia com>
Date:   Thu Jun 28 13:13:03 2012 +0200

    ephy-web-view: ephy_web_view_location_changed is private to its class
    
    Do not make it public.

 doc/reference/epiphany-sections.txt |    1 -
 embed/ephy-web-view.c               |   94 ++++++++++++++++-------------------
 embed/ephy-web-view.h               |    2 -
 3 files changed, 43 insertions(+), 54 deletions(-)
---
diff --git a/doc/reference/epiphany-sections.txt b/doc/reference/epiphany-sections.txt
index b02d636..cbac79f 100644
--- a/doc/reference/epiphany-sections.txt
+++ b/doc/reference/epiphany-sections.txt
@@ -32,7 +32,6 @@ ephy_web_view_is_loading
 ephy_web_view_load_failed
 ephy_web_view_load_request
 ephy_web_view_load_url
-ephy_web_view_location_changed
 ephy_web_view_new
 ephy_web_view_popups_manager_reset
 ephy_web_view_print_preview_n_pages
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a244542..9291ba0 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 1a64cff..c742d18 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);



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