diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/mail-config.c | 49 | ||||
-rw-r--r-- | mail/mail-config.h | 6 |
3 files changed, 64 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 77dce568ab..46afc6b92d 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,14 @@ 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. + +2001-01-17 Jeffrey Stedfast <fejj@ximian.com> + * mail-account-editor.c (construct): Handle NULL source and, while we're at it, transport URLs. Apparently camel_url_new() and/or camel-url_free() don't handle NULL input well. 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) { diff --git a/mail/mail-config.h b/mail/mail-config.h index d2c7b63593..a08e8aa137 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -96,6 +96,12 @@ void mail_config_set_mark_as_seen_timeout (gint timeout); gboolean mail_config_get_prompt_empty_subject (void); void mail_config_set_prompt_empty_subject (gboolean value); +gint mail_config_get_pgp_type (void); +void mail_config_set_pgp_type (gint pgp_type); + +const char *mail_config_get_pgp_path (void); +void mail_config_set_pgp_path (const char *pgp_path); + const MailConfigAccount *mail_config_get_default_account (void); const MailConfigAccount *mail_config_get_account_by_name (const char *account_name); const GSList *mail_config_get_accounts (void); |