diff options
author | Jonny Lamb <jonnylamb@gnome.org> | 2010-12-15 21:57:02 +0800 |
---|---|---|
committer | Jonny Lamb <jonnylamb@gnome.org> | 2011-01-26 21:38:17 +0800 |
commit | 1a475582dc526fe0d494d7e21efd17040d0784b1 (patch) | |
tree | eb46b8002ad0759275ca0d41227e93d5baeee67b /libempathy-gtk | |
parent | 374be3ff3554cf95247edb89d577cb4c809917ca (diff) | |
download | gsoc2013-empathy-1a475582dc526fe0d494d7e21efd17040d0784b1.tar gsoc2013-empathy-1a475582dc526fe0d494d7e21efd17040d0784b1.tar.gz gsoc2013-empathy-1a475582dc526fe0d494d7e21efd17040d0784b1.tar.bz2 gsoc2013-empathy-1a475582dc526fe0d494d7e21efd17040d0784b1.tar.lz gsoc2013-empathy-1a475582dc526fe0d494d7e21efd17040d0784b1.tar.xz gsoc2013-empathy-1a475582dc526fe0d494d7e21efd17040d0784b1.tar.zst gsoc2013-empathy-1a475582dc526fe0d494d7e21efd17040d0784b1.zip |
password-dialog: destroy the dialog if the handler is invalidated
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-password-dialog.c | 11 |
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, |