Commit 1051341e authored by Guillaume Desmottes's avatar Guillaume Desmottes

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
parent f5940b4b
......@@ -504,16 +504,6 @@ search_text_notify_cb (EmpathyLiveSearch *search,
gtk_widget_set_sensitive (priv->select_button, sensitive);
}
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
empathy_irc_network_chooser_dialog_constructed (GObject *object)
{
......@@ -598,8 +588,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);
......@@ -613,6 +601,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment