aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-24 21:29:22 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-24 21:32:13 +0800
commit2112a44c81e80882d4569f8115071d742c483efc (patch)
treec49cc673129354cafc87eb10faabc33a4cc89b26
parent38ec957d24df497e86ae94ee81e79fec5a7757b4 (diff)
downloadgsoc2013-empathy-2112a44c81e80882d4569f8115071d742c483efc.tar
gsoc2013-empathy-2112a44c81e80882d4569f8115071d742c483efc.tar.gz
gsoc2013-empathy-2112a44c81e80882d4569f8115071d742c483efc.tar.bz2
gsoc2013-empathy-2112a44c81e80882d4569f8115071d742c483efc.tar.lz
gsoc2013-empathy-2112a44c81e80882d4569f8115071d742c483efc.tar.xz
gsoc2013-empathy-2112a44c81e80882d4569f8115071d742c483efc.tar.zst
gsoc2013-empathy-2112a44c81e80882d4569f8115071d742c483efc.zip
tls-dialog: destroy the dialog if the certificate is invalidated (#643186)
There is no point to keep it around.
-rw-r--r--libempathy-gtk/empathy-tls-dialog.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-tls-dialog.c b/libempathy-gtk/empathy-tls-dialog.c
index 39d02ff65..4fa950f31 100644
--- a/libempathy-gtk/empathy-tls-dialog.c
+++ b/libempathy-gtk/empathy-tls-dialog.c
@@ -249,6 +249,16 @@ checkbox_toggled_cb (GtkToggleButton *checkbox,
}
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)
{
GtkWidget *content_area, *expander, *details, *checkbox;
@@ -302,6 +312,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