diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-08-13 22:20:07 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2010-08-13 22:22:25 +0800 |
commit | 2c95c1dd40e651b5f565e027b1a07cae251f87b2 (patch) | |
tree | 0c3731197f97d2a625bc6f5cc3c6af03a0dc5b86 /libempathy-gtk | |
parent | 1937b83032ff55814c27176c22e4184d0d30e045 (diff) | |
download | gsoc2013-empathy-2c95c1dd40e651b5f565e027b1a07cae251f87b2.tar gsoc2013-empathy-2c95c1dd40e651b5f565e027b1a07cae251f87b2.tar.gz gsoc2013-empathy-2c95c1dd40e651b5f565e027b1a07cae251f87b2.tar.bz2 gsoc2013-empathy-2c95c1dd40e651b5f565e027b1a07cae251f87b2.tar.lz gsoc2013-empathy-2c95c1dd40e651b5f565e027b1a07cae251f87b2.tar.xz gsoc2013-empathy-2c95c1dd40e651b5f565e027b1a07cae251f87b2.tar.zst gsoc2013-empathy-2c95c1dd40e651b5f565e027b1a07cae251f87b2.zip |
Add the checkbox only if the reason is SelfSigned
Also, add a comment to explain why.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-tls-dialog.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-tls-dialog.c b/libempathy-gtk/empathy-tls-dialog.c index 0fe0093b6..b61d5cacc 100644 --- a/libempathy-gtk/empathy-tls-dialog.c +++ b/libempathy-gtk/empathy-tls-dialog.c @@ -232,12 +232,21 @@ empathy_tls_dialog_constructed (GObject *object) content_area = gtk_dialog_get_content_area (dialog); - checkbox = gtk_check_button_new_with_label (_("Remember this choice")); - gtk_box_pack_end (GTK_BOX (content_area), checkbox, FALSE, FALSE, 0); - gtk_widget_show (checkbox); + /* FIXME: right now we do this only if the error is SelfSigned, as we can + * easily store the new CA cert in $XDG_CONFIG_DIR/telepathy/certs in that + * case. For the other errors, we probably need a smarter/more powerful + * certificate storage. + */ + if (priv->reason == EMP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED) + { + checkbox = gtk_check_button_new_with_label ( + _("Remember this choice for future connections")); + gtk_box_pack_end (GTK_BOX (content_area), checkbox, FALSE, FALSE, 0); + gtk_widget_show (checkbox); - g_signal_connect (checkbox, "toggled", - G_CALLBACK (checkbox_toggled_cb), self); + g_signal_connect (checkbox, "toggled", + G_CALLBACK (checkbox_toggled_cb), self); + } text = g_strdup_printf ("<b>%s</b>", _("Certificate Details")); expander = gtk_expander_new (text); |