aboutsummaryrefslogtreecommitdiffstats
path: root/smime
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-04-20 13:22:04 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-04-20 13:22:04 +0800
commit6b03aee3149121938a9a741798cfa345950ab49f (patch)
tree2970f4b6464abda38b139fc5700fb12ed411e0c8 /smime
parentc22b1bc581cb903be1b858ab04fd3237d991af94 (diff)
downloadgsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar
gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar.gz
gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar.bz2
gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar.lz
gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar.xz
gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar.zst
gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.zip
Fix for bug #396645
svn path=/trunk/; revision=33437
Diffstat (limited to 'smime')
-rw-r--r--smime/ChangeLog7
-rw-r--r--smime/gui/certificate-manager.c36
2 files changed, 43 insertions, 0 deletions
diff --git a/smime/ChangeLog b/smime/ChangeLog
index 5c8d1c9945..5ee474f397 100644
--- a/smime/ChangeLog
+++ b/smime/ChangeLog
@@ -1,3 +1,10 @@
+2007-04-20 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #396645 from Gilles Dartiguelongue
+
+ * gui/certificate-manager.c: (import_your), (import_contact),
+ (import_ca): Show only cert files in filechooser.
+
2007-04-19 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #429422
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index b324ad78dd..375dd0f908 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -133,6 +133,8 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm)
const char *filename;
#ifdef USE_GTKFILECHOOSER
+ GtkFileFilter* filter;
+
filesel = gtk_file_chooser_dialog_new (_("Select a certificate to import..."),
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -140,6 +142,16 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm)
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK);
+
+ filter = gtk_file_filter_new();
+ gtk_file_filter_set_name (filter, _("All PKCS12 files"));
+ gtk_file_filter_add_mime_type (filter, "application/x-pkcs12");
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter);
+
+ filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name (filter, _("All files"));
+ gtk_file_filter_add_pattern (filter, "*");
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter);
#else
filesel = gtk_file_selection_new (_("Select a certificate to import..."));
#endif
@@ -372,6 +384,8 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm)
const char *filename;
#ifdef USE_GTKFILECHOOSER
+ GtkFileFilter *filter;
+
filesel = gtk_file_chooser_dialog_new (_("Select a certificate to import..."),
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -379,6 +393,16 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm)
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK);
+
+ 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_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter);
+
+ filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name (filter, _("All files"));
+ gtk_file_filter_add_pattern (filter, "*");
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter);
#else
filesel = gtk_file_selection_new (_("Select a certificate to import..."));
#endif
@@ -592,6 +616,8 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm)
const char *filename;
#ifdef USE_GTKFILECHOOSER
+ GtkFileFilter *filter;
+
filesel = gtk_file_chooser_dialog_new (_("Select a certificate to import..."),
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -599,6 +625,16 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm)
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK);
+
+ filter = gtk_file_filter_new();
+ gtk_file_filter_set_name (filter, _("All CA certificate files"));
+ 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 ();
+ gtk_file_filter_set_name (filter, _("All files"));
+ gtk_file_filter_add_pattern (filter, "*");
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter);
#else
filesel = gtk_file_selection_new (_("Select a certificate to import..."));
#endif