aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-account-gui.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-11-13 11:57:54 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-11-13 11:57:54 +0800
commit8e302d84a481b9788ca071f824af598176e78df8 (patch)
treea527579a23ea5bec3179d82757472962010c2e52 /mail/mail-account-gui.c
parent61b1ec94bae6c13d7d1f6dade48a51bfc40f04ef (diff)
downloadgsoc2013-evolution-8e302d84a481b9788ca071f824af598176e78df8.tar.gz
gsoc2013-evolution-8e302d84a481b9788ca071f824af598176e78df8.tar.zst
gsoc2013-evolution-8e302d84a481b9788ca071f824af598176e78df8.zip
implement the key selector popup using e-cert-selector.
2003-11-12 Not Zed <NotZed@Ximian.com> * mail-account-gui.c (smime_sign_key_select) (smime_encrypt_key_select, smime_encrypt_key_selected) (smime_sign_key_selected): implement the key selector popup using e-cert-selector. 2003-11-11 Not Zed <NotZed@Ximian.com> * em-format-html.c (efh_application_xpkcs7mime): output icons of the status. (em_format_html_add_pobject): Changed to take a size specificier, return the pobject, and re-ordered args to be more consistent with puri stuff. (em_format_html_remove_pobject): handle the free callback if set. * em-format.c (emf_application_xpkcs7mime): moved this to em-format-html since it needs to do icon stuff. svn path=/trunk/; revision=23312
Diffstat (limited to 'mail/mail-account-gui.c')
-rw-r--r--mail/mail-account-gui.c45
1 files changed, 41 insertions, 4 deletions
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 0aec7dcd32..10d8c8f1ff 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -50,6 +50,9 @@
#include "e-storage.h"
+#if defined (HAVE_NSS)
+#include "smime/gui/e-cert-selector.h"
+#endif
#define d(x)
@@ -1432,9 +1435,26 @@ smime_changed(MailAccountGui *gui)
}
static void
-smime_sign_key_select(GtkWidget *w, MailAccountGui *gui)
+smime_sign_key_selected(GtkWidget *dialog, const char *key, MailAccountGui *gui)
{
- smime_changed(gui);
+ if (key != NULL) {
+ gtk_entry_set_text(gui->smime_sign_key, key);
+ smime_changed(gui);
+ }
+
+ gtk_widget_destroy(dialog);
+}
+
+static void
+smime_sign_key_select(GtkWidget *button, MailAccountGui *gui)
+{
+ GtkWidget *w;
+
+ w = e_cert_selector_new(E_CERT_SELECTOR_SIGNER, gtk_entry_get_text(gui->smime_sign_key));
+ gtk_window_set_modal((GtkWindow *)w, TRUE);
+ gtk_window_set_transient_for((GtkWindow *)w, (GtkWindow *)gui->dialog);
+ g_signal_connect(w, "selected", G_CALLBACK(smime_sign_key_selected), gui);
+ gtk_widget_show(w);
}
static void
@@ -1445,9 +1465,26 @@ smime_sign_key_clear(GtkWidget *w, MailAccountGui *gui)
}
static void
-smime_encrypt_key_select(GtkWidget *w, MailAccountGui *gui)
+smime_encrypt_key_selected(GtkWidget *dialog, const char *key, MailAccountGui *gui)
{
- smime_changed(gui);
+ if (key != NULL) {
+ gtk_entry_set_text(gui->smime_encrypt_key, key);
+ smime_changed(gui);
+ }
+
+ gtk_widget_destroy(dialog);
+}
+
+static void
+smime_encrypt_key_select(GtkWidget *button, MailAccountGui *gui)
+{
+ GtkWidget *w;
+
+ w = e_cert_selector_new(E_CERT_SELECTOR_SIGNER, gtk_entry_get_text(gui->smime_encrypt_key));
+ gtk_window_set_modal((GtkWindow *)w, TRUE);
+ gtk_window_set_transient_for((GtkWindow *)w, (GtkWindow *)gui->dialog);
+ g_signal_connect(w, "selected", G_CALLBACK(smime_encrypt_key_selected), gui);
+ gtk_widget_show(w);
}
static void