[epiphany] Revert "ephy-title-box: Fix a warning when closing window"



commit 0995fe71257746e512159a463c7b95d64ea77925
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Jul 21 10:23:09 2014 -0500

    Revert "ephy-title-box: Fix a warning when closing window"
    
    This reverts commit 7eabfe44e9804717bfb6f0fa10e53f9c4d170e38.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732784

 src/ephy-title-box.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/ephy-title-box.c b/src/ephy-title-box.c
index 6d8adaa..b70e45d 100644
--- a/src/ephy-title-box.c
+++ b/src/ephy-title-box.c
@@ -62,6 +62,8 @@ typedef struct
   guint location_disabled;
   guint button_down : 1;
   guint switch_to_entry_timeout_id;
+
+  gulong title_sig_id;
 } EphyTitleBoxPrivate;
 
 G_DEFINE_TYPE_WITH_PRIVATE (EphyTitleBox, ephy_title_box, GTK_TYPE_STACK)
@@ -573,9 +575,8 @@ ephy_title_box_set_web_view (EphyTitleBox  *title_box,
     g_signal_handlers_disconnect_by_func (priv->web_view,
                                           G_CALLBACK (ephy_title_box_view_focus_in_cb),
                                           title_box);
-    g_signal_handlers_disconnect_by_func (priv->web_view,
-                                          G_CALLBACK (ephy_title_box_title_changed_cb),
-                                          title_box);
+    if (priv->title_sig_id > 0)
+      g_signal_handler_disconnect (priv->web_view, priv->title_sig_id);
 
     if (priv->title_binding != NULL)
       g_clear_object (&priv->title_binding);
@@ -609,8 +610,9 @@ ephy_title_box_set_web_view (EphyTitleBox  *title_box,
                                                    ephy_title_box_transform_uri_to_label, NULL,
                                                    title_box, ephy_title_box_uri_binding_destroyed_cb);
 
-  g_signal_connect (priv->web_view, "notify::title",
-                    G_CALLBACK (ephy_title_box_title_changed_cb), title_box);
+  priv->title_sig_id = g_signal_connect (priv->web_view, "notify::title",
+                                         G_CALLBACK (ephy_title_box_title_changed_cb),
+                                         title_box);
   g_signal_connect (priv->entry, "key-press-event",
                     G_CALLBACK (ephy_title_box_entry_key_press_cb), title_box);
   g_signal_connect (priv->web_view, "focus-in-event",


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