[epiphany] ephy-web-view: get rid of redundant calls to set_title



commit e3f51b0a10803b2c555a7416f63e2376302e991c
Author: Xan Lopez <xan igalia com>
Date:   Thu Jun 28 13:38:13 2012 +0200

    ephy-web-view: get rid of redundant calls to set_title
    
    Just trust the title-updated signal for the most part. Seems to work
    just fine in WK1, and fixes missing updates to the title in WK2.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679046

 embed/ephy-web-view.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 8c61e40..91ba2ae 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2050,7 +2050,6 @@ ephy_web_view_location_changed (EphyWebView *view,
     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);
@@ -2093,10 +2092,8 @@ load_changed_cb (WebKitWebView *web_view,
     loading_uri = webkit_web_view_get_uri (web_view);
     g_signal_emit_by_name (view, "new-document-now", loading_uri);
 
-    if (priv->address == NULL || priv->address[0] == '\0') {
+    if (priv->address == NULL || priv->address[0] == '\0')
       ephy_web_view_set_address (view, loading_uri);
-      ephy_web_view_set_title (view, NULL);
-    }
 
     ephy_web_view_set_loading_title (view, loading_uri, TRUE);
 
@@ -2117,8 +2114,6 @@ load_changed_cb (WebKitWebView *web_view,
     uri = webkit_web_view_get_uri (web_view);
     ephy_web_view_location_changed (view, uri);
 
-    ephy_web_view_set_title (view, NULL);
-
     /* Security status. */
     if (uri && g_str_has_prefix (uri, "https")) {
 #if 0
@@ -2259,10 +2254,8 @@ load_status_cb (WebKitWebView *web_view,
 
     g_signal_emit_by_name (view, "new-document-now", loading_uri);
 
-    if (priv->address == NULL || priv->address[0] == '\0') {
+    if (priv->address == NULL || priv->address[0] == '\0')
       ephy_web_view_set_address (view, loading_uri);
-      ephy_web_view_set_title (view, NULL);
-    }
 
     ephy_web_view_set_loading_title (view, loading_uri, TRUE);
     
@@ -2281,8 +2274,6 @@ load_status_cb (WebKitWebView *web_view,
     ephy_web_view_location_changed (view,
                                     uri);
 
-    ephy_web_view_set_title (view, NULL);
-
     /* Security status. */
     if (uri && g_str_has_prefix (uri, "https")) {
       WebKitWebFrame *frame;



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