[epiphany/gnome-3-12] ephy-title-box: Fix a warning when closing window
- From: Yosef Or Boczko <yoseforb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-12] ephy-title-box: Fix a warning when closing window
- Date: Sun, 6 Jul 2014 14:03:47 +0000 (UTC)
commit 5540e8feec3f2d1a12e18952cd0c5ba59f2cdfed
Author: Yosef Or Boczko <yoseforb src gnome org>
Date: Sun Jul 6 10:10:35 2014 +0300
ephy-title-box: Fix a warning when closing window
From some reason it look like the disconnect by sig_id
plot a warning here, since we can to disconnect by func
it better here.
https://bugzilla.gnome.org/show_bug.cgi?id=732784
src/ephy-title-box.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/ephy-title-box.c b/src/ephy-title-box.c
index ba00c6d..1a97350 100644
--- a/src/ephy-title-box.c
+++ b/src/ephy-title-box.c
@@ -62,8 +62,6 @@ 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)
@@ -576,8 +574,9 @@ 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);
- if (priv->title_sig_id > 0)
- g_signal_handler_disconnect (priv->web_view, priv->title_sig_id);
+ g_signal_handlers_disconnect_by_func (priv->web_view,
+ G_CALLBACK (ephy_title_box_title_changed_cb),
+ title_box);
if (priv->title_binding != NULL)
g_clear_object (&priv->title_binding);
@@ -611,9 +610,8 @@ 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);
- 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->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]