diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-07-03 09:45:41 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-07-03 09:45:41 +0800 |
commit | dafc74eeaf244b39d1fd0f8498d50d2535ca8bd9 (patch) | |
tree | 57a6212921112982b7a505d7489c1b23985561d7 /mail/mail-config.c | |
parent | 36765e48f24ad968a2bda97e7ee2056d9b91a4da (diff) | |
download | gsoc2013-evolution-dafc74eeaf244b39d1fd0f8498d50d2535ca8bd9.tar.gz gsoc2013-evolution-dafc74eeaf244b39d1fd0f8498d50d2535ca8bd9.tar.zst gsoc2013-evolution-dafc74eeaf244b39d1fd0f8498d50d2535ca8bd9.zip |
Setup the Empty Trash On Exit widgets.
2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
* mail-accounts.c (construct): Setup the Empty Trash On Exit
widgets.
* mail-config.c (config_read): Option to emtpy trash on exit.
(mail_config_write_on_exit): Same.
(mail_config_set_empty_trash_on_exit): Set the option.
(mail_config_get_empty_trash_on_exit): Get the option.
* component-factory.c (owner_unset_cb): Empty the trash folders if
the user set the "empty trash on exit" option.
svn path=/trunk/; revision=10711
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index c1b6f884f4..0a7fb4fbb5 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -61,6 +61,7 @@ typedef struct { gboolean prompt_empty_subject; gboolean prompt_only_bcc; gint seen_timeout; + gboolean empty_trash_on_exit; GSList *accounts; GSList *news; @@ -563,6 +564,14 @@ config_read (void) config->default_charset = g_strdup (config->default_charset); } + /* Trash folders */ + str = g_strdup_printf ("=%s/config/Mail=/Trash/empty_on_exit", + evolution_dir); + config->empty_trash_on_exit = gnome_config_get_bool_with_default (str, &def); + if (def) + config->empty_trash_on_exit = FALSE; + g_free (str); + gnome_config_sync (); } @@ -807,6 +816,11 @@ mail_config_write_on_exit (void) gnome_config_set_string (str, config->default_charset); g_free (str); + /* Trash folders */ + str = g_strdup_printf ("=%s/config/Mail=/Trash/empty_on_exit", evolution_dir); + gnome_config_set_bool (str, config->empty_trash_on_exit); + g_free (str); + /* Passwords */ gnome_config_private_clean_section ("/Evolution/Passwords"); sources = mail_config_get_sources (); @@ -847,6 +861,18 @@ mail_config_is_configured (void) } gboolean +mail_config_get_empty_trash_on_exit (void) +{ + return config->empty_trash_on_exit; +} + +void +mail_config_set_empty_trash_on_exit (gboolean value) +{ + config->empty_trash_on_exit = value; +} + +gboolean mail_config_get_show_preview (const char *uri) { if (uri) { |