diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-01-26 03:32:27 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-01-26 03:32:27 +0800 |
commit | 22e539d53689ac5a9efce0cc360987923d54d6ba (patch) | |
tree | 8c261b1e5d0481e9930c21857edff1a55cd59e1f /mail/mail-config.c | |
parent | 91dd1d75d76c31aaab6088482a6a9e5a19777afe (diff) | |
download | gsoc2013-evolution-22e539d53689ac5a9efce0cc360987923d54d6ba.tar.gz gsoc2013-evolution-22e539d53689ac5a9efce0cc360987923d54d6ba.tar.zst gsoc2013-evolution-22e539d53689ac5a9efce0cc360987923d54d6ba.zip |
Save the pathname. (save_part): Use the new mail_config cruft to get the
2002-01-25 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (save_data_cb): Save the pathname.
(save_part): Use the new mail_config cruft to get the last used
save pathname.
* mail-config.c (config_read): Read in last_filesel_dir string.
(mail_config_write_on_exit): Save the last_filesel_dir setting.
(mail_config_get_last_filesel_dir): New
(mail_config_set_last_filesel_dir): New
svn path=/trunk/; revision=15474
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index d1e322bb0b..d56e42cbae 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -109,6 +109,8 @@ typedef struct { MailConfigNewMailNotify notify; char *notify_filename; + + char *last_filesel_dir; } MailConfig; static MailConfig *config = NULL; @@ -307,6 +309,21 @@ mail_config_clear (void) g_slist_free (config->news); config->news = NULL; } + + g_free (config->pgp_path); + config->pgp_path = NULL; + + g_free (config->default_charset); + config->default_charset = NULL; + + g_free (config->filter_log_path); + config->filter_log_path = NULL; + + g_free (config->notify_filename); + config->notify_filename = NULL; + + g_free (config->last_filesel_dir); + config->last_filesel_dir = NULL; } static void @@ -652,6 +669,10 @@ config_read (void) config->notify_filename = bonobo_config_get_string ( config->db, "/Mail/Notify/new_mail_notification_sound_file", NULL); + + /* last filesel dir */ + config->last_filesel_dir = bonobo_config_get_string ( + config->db, "/Mail/Filesel/last_filesel_dir", NULL); } #define bonobo_config_set_string_wrapper(db, path, val, ev) bonobo_config_set_string (db, path, val ? val : "", ev) @@ -957,6 +978,10 @@ mail_config_write_on_exit (void) bonobo_config_set_string_wrapper (config->db, "/Mail/Notify/new_mail_notification_sound_file", config->notify_filename, NULL); + /* last filesel dir */ + bonobo_config_set_string_wrapper (config->db, "/Mail/Filesel/last_filesel_dir", + config->last_filesel_dir, NULL); + if (config->threaded_hash) g_hash_table_foreach_remove (config->threaded_hash, hash_save_state, "Threads"); @@ -1189,6 +1214,22 @@ mail_config_set_filter_log_path (const char *path) config->filter_log_path = g_strdup (path); } +const char * +mail_config_get_last_filesel_dir (void) +{ + if (config->last_filesel_dir) + return config->last_filesel_dir; + else + return g_get_home_dir (); +} + +void +mail_config_set_last_filesel_dir (const char *path) +{ + g_free (config->last_filesel_dir); + config->last_filesel_dir = g_strdup (path); +} + gboolean mail_config_get_hide_deleted (void) { |