From 1bad915150e2d5e97cbbf1a77f7a85e338c07f28 Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Wed, 27 Aug 2008 10:33:22 +0000 Subject: License Changes svn path=/trunk/; revision=36116 --- smime/gui/certificate-manager.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'smime/gui/certificate-manager.c') diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index dfd2bf48e9..546745199f 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Chris Toshok * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Authors: + * Chris Toshok + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ - #ifdef HAVE_CONFIG_H #include #endif -- cgit v1.2.3 From 6c721ffaebd623d08ab1d11f7778779ad3c14486 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 25 Feb 2009 11:28:08 +0000 Subject: ** Fix for bug #572975 2009-02-25 Milan Crha ** Fix for bug #572975 * gui/smime-ui.glade: Center dialogs. * gui/certificate-manager.c: (import_your), (import_contact), (import_ca): Destroy file chooser dialog early enough to not have hidden any other windows below it. svn path=/trunk/; revision=37333 --- smime/gui/certificate-manager.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'smime/gui/certificate-manager.c') diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 546745199f..2bfeec3ed3 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -130,7 +130,6 @@ static void import_your (GtkWidget *widget, CertificateManagerData *cfm) { GtkWidget *filesel; - const char *filename; GtkFileFilter* filter; @@ -153,7 +152,10 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + + /* destroy dialog to get rid of it in the GUI */ + gtk_widget_destroy (filesel); if (e_cert_db_import_pkcs12_file (e_cert_db_peek (), filename, NULL /* XXX */)) { @@ -163,9 +165,10 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm) load_certs (cfm, E_CERT_USER, add_user_cert); gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->yourcerts_treeview)); } - } - gtk_widget_destroy (filesel); + g_free (filename); + } else + gtk_widget_destroy (filesel); } static void @@ -373,7 +376,6 @@ static void import_contact (GtkWidget *widget, CertificateManagerData *cfm) { GtkWidget *filesel; - const char *filename; GtkFileFilter *filter; @@ -396,7 +398,10 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + + /* destroy dialog to get rid of it in the GUI */ + gtk_widget_destroy (filesel); if (e_cert_db_import_certs_from_file (e_cert_db_peek (), filename, @@ -409,9 +414,10 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm) load_certs (cfm, E_CERT_CONTACT, add_contact_cert); gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->contactcerts_treeview)); } - } - gtk_widget_destroy (filesel); + g_free (filename); + } else + gtk_widget_destroy (filesel); } static void @@ -597,7 +603,6 @@ static void import_ca (GtkWidget *widget, CertificateManagerData *cfm) { GtkWidget *filesel; - const char *filename; GtkFileFilter *filter; @@ -620,7 +625,10 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + + /* destroy dialog to get rid of it in the GUI */ + gtk_widget_destroy (filesel); if (e_cert_db_import_certs_from_file (e_cert_db_peek (), filename, @@ -632,9 +640,10 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm) unload_certs (cfm, E_CERT_CA); load_certs (cfm, E_CERT_CA, add_ca_cert); } - } - gtk_widget_destroy (filesel); + g_free (filename); + } else + gtk_widget_destroy (filesel); } static void -- cgit v1.2.3 From f8d913a688c5cdff082b18cccfb847650a900ff0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 7 Apr 2009 12:08:30 +0000 Subject: ** Fix for bug #529745 2009-04-07 Milan Crha ** Fix for bug #529745 * gui/certificate-manager.c: (import_your), (import_contact): Add more file types in a file filter. svn path=/trunk/; revision=37499 --- smime/gui/certificate-manager.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'smime/gui/certificate-manager.c') diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 2bfeec3ed3..330fef7187 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -143,6 +143,7 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm) filter = gtk_file_filter_new(); gtk_file_filter_set_name (filter, _("All PKCS12 files")); + gtk_file_filter_add_mime_type (filter, "application/x-x509-user-cert"); gtk_file_filter_add_mime_type (filter, "application/x-pkcs12"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); @@ -390,6 +391,7 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm) filter = gtk_file_filter_new(); gtk_file_filter_set_name (filter, _("All email certificate files")); gtk_file_filter_add_mime_type (filter, "application/x-x509-email-cert"); + gtk_file_filter_add_mime_type (filter, "application/x-x509-ca-cert"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); filter = gtk_file_filter_new (); -- cgit v1.2.3 From 7b76c88e4d1a4a510ac88c2e1f177fd8c9c3f830 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 7 Apr 2009 12:11:12 +0000 Subject: ** Fix for bug #539002 2009-04-07 Milan Crha ** Fix for bug #539002 * gui/certificate-manager.c: (load_certs): Show all other certificates in a contact tab. svn path=/trunk/; revision=37500 --- smime/gui/certificate-manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'smime/gui/certificate-manager.c') diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 330fef7187..2d1c8c17c4 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -963,7 +963,10 @@ load_certs (CertificateManagerData *cfm, !CERT_LIST_END(node, certList); node = CERT_LIST_NEXT(node)) { ECert *cert = e_cert_new ((CERTCertificate*)node->cert); - if (e_cert_get_cert_type(cert) == type) { + ECertType ct = e_cert_get_cert_type (cert); + + /* show everything else in a contact tab */ + if (ct == type || (type == E_CERT_CONTACT && ct != E_CERT_CA && ct != E_CERT_USER)) { add_cert (cfm, cert); } } -- cgit v1.2.3