diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-04-20 13:22:04 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-04-20 13:22:04 +0800 |
commit | 6b03aee3149121938a9a741798cfa345950ab49f (patch) | |
tree | 2970f4b6464abda38b139fc5700fb12ed411e0c8 /smime/gui/certificate-manager.c | |
parent | c22b1bc581cb903be1b858ab04fd3237d991af94 (diff) | |
download | gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar.gz gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.tar.zst gsoc2013-evolution-6b03aee3149121938a9a741798cfa345950ab49f.zip |
Fix for bug #396645
svn path=/trunk/; revision=33437
Diffstat (limited to 'smime/gui/certificate-manager.c')
-rw-r--r-- | smime/gui/certificate-manager.c | 36 |
1 files changed, 36 insertions, 0 deletions
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 |