aboutsummaryrefslogtreecommitdiffstats
path: root/smime
diff options
context:
space:
mode:
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