aboutsummaryrefslogtreecommitdiffstats
path: root/smime/gui/component.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-03-25 06:27:01 +0800
committerChris Toshok <toshok@src.gnome.org>2004-03-25 06:27:01 +0800
commit4abed2292a3e45072da19c81b6c53fab926660c7 (patch)
tree5c16f8f099a57565169029004f124bc6d3732af7 /smime/gui/component.c
parent2ac983181ab03ef7f71cba91201c2d88add302b0 (diff)
downloadgsoc2013-evolution-4abed2292a3e45072da19c81b6c53fab926660c7.tar.gz
gsoc2013-evolution-4abed2292a3e45072da19c81b6c53fab926660c7.tar.zst
gsoc2013-evolution-4abed2292a3e45072da19c81b6c53fab926660c7.zip
add BOOL:POINTER,POINTER,POINTER,POINTER for confirm_ca_cert_import.
2004-03-24 Chris Toshok <toshok@ximian.com> * lib/smime-marshal.list: add BOOL:POINTER,POINTER,POINTER,POINTER for confirm_ca_cert_import. * lib/e-cert-db.c (e_cert_db_class_init): initialize the confirm_ca_cert_import signal. (confirm_download_ca_cert): emit confirm_ca_cert_import and use the returned values. (handle_ca_cert_download): fix the ca trust foo. (e_cert_db_import_certs): pass the cerdb to handle_ca_cert_download since we need to emit something on that object. * lib/e-cert-db.h (struct _ECertDBClass): add confirm_ca_cert_import signal. * gui/smime-ui.glade: give names to the check buttons in the ca trust dialog. * gui/component.c (smime_confirm_ca_cert_import): new function, show the trust dialog. (smime_component_init): connect to "confirm_ca_cert_import" signal. * gui/certificate-viewer.c (fill_in_general): fix lots of uninitialized variable accesses. (certificate_viewer_show): don't show the dialog (or connect to the response signal.) that's the caller's job. * gui/certificate-manager.c (view_your): do the showing of the certificate_viewer here. (view_contact): same. (view_ca): same. (edit_ca): new function, pop up the ca trust dialog. we need more here though, to fill in the toggle buttons when bringing up the dialog, and also to save out the settings when the user clicks ok. (initialize_authoritycerts_ui): hook up the edit_ca button. * gui/Makefile.am (libevolution_smime_la_SOURCES): add ca-trust-dialog.[ch]. * gui/ca-trust-dialog.[ch]: new file implementing the ca trust dialog used for importing/editing ca trust levels. svn path=/trunk/; revision=25177
Diffstat (limited to 'smime/gui/component.c')
-rw-r--r--smime/gui/component.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/smime/gui/component.c b/smime/gui/component.c
index 3c86b6e820..e3e5e0f695 100644
--- a/smime/gui/component.c
+++ b/smime/gui/component.c
@@ -25,7 +25,11 @@
#include <config.h>
#endif
+#include <gtk/gtk.h>
+
#include <libgnome/gnome-i18n.h>
+
+#include "ca-trust-dialog.h"
#include "e-cert-db.h"
#include "e-util/e-passwords.h"
#include "pk11func.h"
@@ -77,6 +81,21 @@ smime_pk11_change_passwd (ECertDB *db, char **old_passwd, char **passwd, gpointe
return TRUE;
}
+static gboolean
+smime_confirm_ca_cert_import (ECertDB *db, ECert *cert, gboolean *trust_ssl, gboolean *trust_email, gboolean *trust_objsign, gpointer arg)
+{
+ GtkWidget *dialog = ca_trust_dialog_show (cert, TRUE);
+ int response;
+
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ ca_trust_dialog_get_trust (dialog, trust_ssl, trust_email, trust_objsign);
+
+ gtk_widget_destroy (dialog);
+
+ return response != GTK_RESPONSE_CANCEL;
+}
+
void
smime_component_init (void)
{
@@ -92,4 +111,8 @@ smime_component_init (void)
g_signal_connect (e_cert_db_peek (),
"pk11_change_passwd",
G_CALLBACK (smime_pk11_change_passwd), NULL);
+
+ g_signal_connect (e_cert_db_peek (),
+ "confirm_ca_cert_import",
+ G_CALLBACK (smime_confirm_ca_cert_import), NULL);
}