diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-03-11 23:50:46 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-03-11 23:55:39 +0800 |
commit | de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed (patch) | |
tree | 6b159f7d03d042e6a9d3a9b91397c97d03d59556 | |
parent | 34fc9df7c2d660ff29250e25ca3441f571863146 (diff) | |
download | gsoc2013-empathy-de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed.tar gsoc2013-empathy-de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed.tar.gz gsoc2013-empathy-de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed.tar.bz2 gsoc2013-empathy-de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed.tar.lz gsoc2013-empathy-de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed.tar.xz gsoc2013-empathy-de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed.tar.zst gsoc2013-empathy-de9e3bab4f3cf6fc2eaacd78c1bb91b62ceefeed.zip |
irc-network-chooser-dialog: disconnect live search signals in dispose
The 'destroyed' signal is called to late, we have to disconnect those signals
before destroying the live search object.
https://bugzilla.gnome.org/show_bug.cgi?id=692105
-rw-r--r-- | libempathy-gtk/empathy-irc-network-chooser-dialog.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-irc-network-chooser-dialog.c b/libempathy-gtk/empathy-irc-network-chooser-dialog.c index 5e4cb3583..5843f6825 100644 --- a/libempathy-gtk/empathy-irc-network-chooser-dialog.c +++ b/libempathy-gtk/empathy-irc-network-chooser-dialog.c @@ -499,16 +499,6 @@ search_text_notify_cb (EmpathyLiveSearch *search, } static void -dialog_destroy_cb (GtkWidget *widget, - EmpathyIrcNetworkChooserDialog *self) -{ - EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self); - - g_signal_handler_disconnect (priv->search, priv->search_sig); - g_signal_handler_disconnect (priv->search, priv->activate_sig); -} - -static void add_clicked_cb (GtkToolButton *button, EmpathyIrcNetworkChooserDialog *self) { @@ -642,8 +632,6 @@ empathy_irc_network_chooser_dialog_constructed (GObject *object) g_signal_connect (self, "response", G_CALLBACK (dialog_response_cb), self); - g_signal_connect (self, "destroy", - G_CALLBACK (dialog_destroy_cb), self); /* Request a side ensuring to display at least some networks */ gtk_widget_set_size_request (GTK_WIDGET (self), -1, 300); @@ -657,6 +645,18 @@ empathy_irc_network_chooser_dialog_dispose (GObject *object) EmpathyIrcNetworkManager *self = (EmpathyIrcNetworkManager *) object; EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self); + if (priv->search_sig != 0) + { + g_signal_handler_disconnect (priv->search, priv->search_sig); + priv->search_sig = 0; + } + + if (priv->activate_sig != 0) + { + g_signal_handler_disconnect (priv->search, priv->activate_sig); + priv->activate_sig = 0; + } + tp_clear_object (&priv->settings); tp_clear_object (&priv->network); tp_clear_object (&priv->network_manager); |