aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2010-12-15 21:57:02 +0800
committerJonny Lamb <jonnylamb@gnome.org>2010-12-15 21:57:02 +0800
commit86aa1501e7a76b92ba402dddc4ce85d403c609bf (patch)
treed0245ccb4bf08665eb94b1bace812034ab159f94
parent275aa2505465bd2f1c5cf02427219a6ae54dfe93 (diff)
downloadgsoc2013-empathy-86aa1501e7a76b92ba402dddc4ce85d403c609bf.tar
gsoc2013-empathy-86aa1501e7a76b92ba402dddc4ce85d403c609bf.tar.gz
gsoc2013-empathy-86aa1501e7a76b92ba402dddc4ce85d403c609bf.tar.bz2
gsoc2013-empathy-86aa1501e7a76b92ba402dddc4ce85d403c609bf.tar.lz
gsoc2013-empathy-86aa1501e7a76b92ba402dddc4ce85d403c609bf.tar.xz
gsoc2013-empathy-86aa1501e7a76b92ba402dddc4ce85d403c609bf.tar.zst
gsoc2013-empathy-86aa1501e7a76b92ba402dddc4ce85d403c609bf.zip
password-dialog: destroy the dialog if the handler is invalidated
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
-rw-r--r--libempathy-gtk/empathy-password-dialog.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-password-dialog.c b/libempathy-gtk/empathy-password-dialog.c
index 5608bb035..442396de0 100644
--- a/libempathy-gtk/empathy-password-dialog.c
+++ b/libempathy-gtk/empathy-password-dialog.c
@@ -203,6 +203,13 @@ password_dialog_window_state_changed (GtkWidget *widget,
}
static void
+password_dialog_handler_invalidated_cb (EmpathyServerSASLHandler *handler,
+ EmpathyPasswordDialog *dialog)
+{
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+static void
empathy_password_dialog_constructed (GObject *object)
{
EmpathyPasswordDialog *dialog;
@@ -221,6 +228,10 @@ empathy_password_dialog_constructed (GObject *object)
account = empathy_server_sasl_handler_get_account (priv->handler);
+ tp_g_signal_connect_object (priv->handler, "invalidated",
+ G_CALLBACK (password_dialog_handler_invalidated_cb),
+ object, 0);
+
/* dialog */
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_OK, GTK_RESPONSE_OK,