diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-01-18 05:11:34 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-18 05:11:34 +0800 |
commit | 8cb58581578215fc6ee71a3c7e947a558a9ba19c (patch) | |
tree | bf00cddc4715a5a64c1b55f8285f7c984cbf05ea /mail/mail-config.c | |
parent | 99a779567bde67b8994af25d13bfd6f6e48fea04 (diff) | |
download | gsoc2013-evolution-8cb58581578215fc6ee71a3c7e947a558a9ba19c.tar gsoc2013-evolution-8cb58581578215fc6ee71a3c7e947a558a9ba19c.tar.gz gsoc2013-evolution-8cb58581578215fc6ee71a3c7e947a558a9ba19c.tar.bz2 gsoc2013-evolution-8cb58581578215fc6ee71a3c7e947a558a9ba19c.tar.lz gsoc2013-evolution-8cb58581578215fc6ee71a3c7e947a558a9ba19c.tar.xz gsoc2013-evolution-8cb58581578215fc6ee71a3c7e947a558a9ba19c.tar.zst gsoc2013-evolution-8cb58581578215fc6ee71a3c7e947a558a9ba19c.zip |
New config function to set the path to the pgp binary.
2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
* mail-config.c (mail_config_set_pgp_path): New config function to
set the path to the pgp binary.
(mail_config_get_pgp_path): Gee I wonder...
(mail_config_set_pgp_type): This one sets the type (ie PGP5, PGP2,
or GnuPG - see openpgp-utils.h for values)
(mail_config_get_pgp_type): Der.
svn path=/trunk/; revision=7596
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index 78107cce95..269088962f 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -44,6 +44,9 @@ typedef struct { GSList *accounts; GSList *news; + + char *pgp_path; + int pgp_type; } MailConfig; static const char GCONFPATH[] = "/apps/Evolution/Mail"; @@ -338,6 +341,16 @@ config_read (void) config->prompt_empty_subject = gnome_config_get_bool (str); g_free (str); + /* PGP/GPG */ + str = g_strdup_printf ("=%s/config/Mail=/PGP/path", + evolution_dir); + config->pgp_path = gnome_config_get_string (str); + g_free (str); + str = g_strdup_printf ("=%s/config/Mail=/PGP/type=0", + evolution_dir); + config->pgp_type = gnome_config_get_int (str); + g_free (str); + gnome_config_sync (); } @@ -437,6 +450,16 @@ mail_config_write (void) gnome_config_set_bool (str, config->prompt_empty_subject); g_free (str); + /* PGP/GPG */ + str = g_strdup_printf ("=%s/config/Mail=/PGP/path", + evolution_dir); + gnome_config_set_string (str, config->pgp_path); + g_free (str); + str = g_strdup_printf ("=%s/config/Mail=/PGP/type", + evolution_dir); + gnome_config_set_int (str, config->pgp_type); + g_free (str); + gnome_config_sync (); } @@ -551,6 +574,32 @@ mail_config_set_prompt_empty_subject (gboolean value) config->prompt_empty_subject = value; } +gint +mail_config_get_pgp_type (void) +{ + return config->pgp_type; +} + +void +mail_config_set_pgp_type (gint pgp_type) +{ + config->pgp_type = pgp_type; +} + +const char * +mail_config_get_pgp_path (void) +{ + return config->pgp_path; +} + +void +mail_config_set_pgp_path (const char *pgp_path) +{ + g_free (config->pgp_path); + + config->pgp_path = g_strdup (pgp_path); +} + const MailConfigAccount * mail_config_get_default_account (void) { |