diff options
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index fae3a8a0d0..40d0fc8cbc 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -85,6 +85,9 @@ typedef struct { GHashTable *threaded_hash; GHashTable *preview_hash; + + gboolean filter_log; + char *filter_log_path; } MailConfig; static MailConfig *config = NULL; @@ -551,6 +554,13 @@ config_read (void) /* Trash folders */ config->empty_trash_on_exit = bonobo_config_get_boolean_with_default ( config->db, "/Mail/Trash/empty_on_exit", FALSE, NULL); + + /* Filter logging */ + config->filter_log = bonobo_config_get_boolean_with_default ( + config->db, "/Mail/Filters/log", FALSE, NULL); + + config->filter_log_path = bonobo_config_get_string ( + config->db, "/Mail/Filters/log_path", NULL); } #define bonobo_config_set_string_wrapper(db, path, val, ev) bonobo_config_set_string (db, path, val ? val : "", ev) @@ -811,6 +821,13 @@ mail_config_write_on_exit (void) bonobo_config_set_boolean (config->db, "/Mail/Trash/empty_on_exit", config->empty_trash_on_exit, NULL); + /* Filter logging */ + bonobo_config_set_boolean (config->db, "/Mail/Filters/log", + config->filter_log, NULL); + + bonobo_config_set_string_wrapper (config->db, "/Mail/Filters/log_path", + config->filter_log_path, NULL); + g_hash_table_foreach_remove (config->threaded_hash, hash_save_state, "Threads"); @@ -988,6 +1005,31 @@ mail_config_set_thread_list (const char *uri, gboolean value) } gboolean +mail_config_get_filter_log (void) +{ + return config->filter_log; +} + +void +mail_config_set_filter_log (gboolean value) +{ + config->filter_log = value; +} + +const char * +mail_config_get_filter_log_path (void) +{ + return config->filter_log_path; +} + +void +mail_config_set_filter_log_path (const char *path) +{ + g_free (config->filter_log_path); + config->filter_log_path = g_strdup (path); +} + +gboolean mail_config_get_hide_deleted (void) { return config->hide_deleted; |