From 677a6bf7fca3ce8e26cf02d36c2721fa03510a4d Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 24 Feb 2011 14:29:22 +0100 Subject: [PATCH] tls-dialog: destroy the dialog if the certificate is invalidated (#643186) There is no point to keep it around. --- libempathy-gtk/empathy-tls-dialog.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libempathy-gtk/empathy-tls-dialog.c b/libempathy-gtk/empathy-tls-dialog.c index f09d6c51..8f1f49ed 100644 --- a/libempathy-gtk/empathy-tls-dialog.c +++ b/libempathy-gtk/empathy-tls-dialog.c @@ -256,6 +256,16 @@ checkbox_toggled_cb (GtkToggleButton *checkbox, g_object_notify (G_OBJECT (self), "remember"); } +static void +certificate_invalidated_cb (EmpathyTLSCertificate *certificate, + guint domain, + gint code, + gchar *message, + EmpathyTLSDialog *self) +{ + gtk_widget_destroy (GTK_WIDGET (self)); +} + static void empathy_tls_dialog_constructed (GObject *object) { @@ -310,6 +320,9 @@ empathy_tls_dialog_constructed (GObject *object) details = build_gcr_widget (self); gtk_container_add (GTK_CONTAINER (expander), details); gtk_widget_show (details); + + tp_g_signal_connect_object (priv->certificate, "invalidated", + G_CALLBACK (certificate_invalidated_cb), self, 0); } static void -- 2.39.2