aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-08 19:50:03 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-09 15:34:18 +0800
commit085365f20953fae1fb95d0272677273e3840e98f (patch)
treead39fe15bff03b4c048c5eea4994c02a2ef63b58 /libempathy-gtk
parent852af596dcc11e104a5565e953240af2f83b4cc2 (diff)
downloadgsoc2013-empathy-085365f20953fae1fb95d0272677273e3840e98f.tar
gsoc2013-empathy-085365f20953fae1fb95d0272677273e3840e98f.tar.gz
gsoc2013-empathy-085365f20953fae1fb95d0272677273e3840e98f.tar.bz2
gsoc2013-empathy-085365f20953fae1fb95d0272677273e3840e98f.tar.lz
gsoc2013-empathy-085365f20953fae1fb95d0272677273e3840e98f.tar.xz
gsoc2013-empathy-085365f20953fae1fb95d0272677273e3840e98f.tar.zst
gsoc2013-empathy-085365f20953fae1fb95d0272677273e3840e98f.zip
new-account-dialog: rely on the EmpathyAccountWidget::close signal
User of the dialog should wait for the widget to be completely done before destroying it. Change the 'success' dialog response to GTK_RESPONSE_APPLY to stay coherent with the response type received from EmpathyAccountWidget. https://bugzilla.gnome.org/show_bug.cgi?id=675667
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-new-account-dialog.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/libempathy-gtk/empathy-new-account-dialog.c b/libempathy-gtk/empathy-new-account-dialog.c
index 180cc4198..ed09be829 100644
--- a/libempathy-gtk/empathy-new-account-dialog.c
+++ b/libempathy-gtk/empathy-new-account-dialog.c
@@ -42,18 +42,11 @@ struct _EmpathyNewAccountDialogPrivate
};
static void
-account_created_cb (EmpathyAccountWidget *widget,
- TpAccount *account,
+close_cb (EmpathyAccountWidget *widget,
+ GtkResponseType response,
EmpathyNewAccountDialog *self)
{
- gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
-}
-
-static void
-cancelled_cb (EmpathyAccountWidget *widget,
- EmpathyNewAccountDialog *self)
-{
- gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_CANCEL);
+ gtk_dialog_response (GTK_DIALOG (self), response);
}
static void
@@ -87,9 +80,7 @@ protocol_changed_cb (GtkComboBox *chooser,
if (self->priv->current_account_widget != NULL)
{
g_signal_handlers_disconnect_by_func (self->priv->current_account_widget,
- account_created_cb, self);
- g_signal_handlers_disconnect_by_func (self->priv->current_account_widget,
- cancelled_cb, self);
+ close_cb, self);
gtk_widget_destroy (GTK_WIDGET (self->priv->current_account_widget));
}
@@ -98,10 +89,8 @@ protocol_changed_cb (GtkComboBox *chooser,
self->priv->settings = settings;
- g_signal_connect (self->priv->current_account_widget, "account-created",
- G_CALLBACK (account_created_cb), self);
- g_signal_connect (self->priv->current_account_widget, "cancelled",
- G_CALLBACK (cancelled_cb), self);
+ g_signal_connect (self->priv->current_account_widget, "close",
+ G_CALLBACK (close_cb), self);
/* Restore "account" and "password" parameters in the new widget */
if (account != NULL)