aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-accounts.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-11-09 06:31:53 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-11-09 06:31:53 +0800
commite883caea14a44076e0093024e039d61140c313a6 (patch)
treefeea20822e1bcc45604853ced6fc437bde557aea /mail/mail-accounts.c
parente50647bb5043ce279b4628e879715a545fffe980 (diff)
downloadgsoc2013-evolution-e883caea14a44076e0093024e039d61140c313a6.tar
gsoc2013-evolution-e883caea14a44076e0093024e039d61140c313a6.tar.gz
gsoc2013-evolution-e883caea14a44076e0093024e039d61140c313a6.tar.bz2
gsoc2013-evolution-e883caea14a44076e0093024e039d61140c313a6.tar.lz
gsoc2013-evolution-e883caea14a44076e0093024e039d61140c313a6.tar.xz
gsoc2013-evolution-e883caea14a44076e0093024e039d61140c313a6.tar.zst
gsoc2013-evolution-e883caea14a44076e0093024e039d61140c313a6.zip
Call mail_config_pgp_type_detect_from_path() instead of doing our own lame
2001-11-06 Jeffrey Stedfast <fejj@ximian.com> * mail-accounts.c (pgp_path_changed): Call mail_config_pgp_type_detect_from_path() instead of doing our own lame auto-detection that didn't even work ;-) * mail-config.c (auto_detect_pgp_variables): Execute the pgp binary and look at it's version string if we have a version string to compare to. (mail_config_pgp_type_detect_from_path): New function that takes a pgp path and attempts to figure out what pgp version it is. svn path=/trunk/; revision=14634
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r--mail/mail-accounts.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index 3e2452db0f..5d7945c614 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -637,19 +637,12 @@ timeout_changed (GtkEntry *entry, gpointer data)
static void
pgp_path_changed (GtkEntry *entry, gpointer data)
{
- const char *path, *bin;
- CamelPgpType type = CAMEL_PGP_TYPE_NONE;
+ CamelPgpType type;
+ const char *path;
path = gtk_entry_get_text (entry);
- bin = g_basename (path);
-
- /* FIXME: This detection should be better */
- if (!strcmp (bin, "pgp"))
- type = CAMEL_PGP_TYPE_PGP2;
- else if (!strcmp (bin, "pgpv") || !strcmp (bin, "pgpe") || !strcmp (bin, "pgpk") || !strcmp (bin, "pgps"))
- type = CAMEL_PGP_TYPE_PGP5;
- else if (!strncmp (bin, "gpg", 3))
- type = CAMEL_PGP_TYPE_GPG;
+
+ type = mail_config_pgp_type_detect_from_path (path);
mail_config_set_pgp_path (path && *path ? path : NULL);
mail_config_set_pgp_type (type);