diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-23 10:08:45 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-23 10:08:45 +0000 |
commit | 105eb9bfb18a3324ebbda41cf2bd8b0695748f91 (patch) | |
tree | dacebe6c35330a911378ab5b34fc7f4c8335187a /src/main.c | |
parent | 77288037d78abd6b3a9be9cdb1e831a1d16de49b (diff) |
implemented clearing of IMAP4 message caches on exit.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@919 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -561,6 +561,7 @@ void app_will_exit(gboolean force) MainWindow *mainwin; gchar *filename; static gboolean on_exit = FALSE; + GList *cur; if (on_exit) return; @@ -597,6 +598,13 @@ void app_will_exit(gboolean force) main_window_empty_trash(mainwin, !force && prefs_common.ask_on_clean); + for (cur = account_get_list(); cur != NULL; cur = cur->next) { + PrefsAccount *ac = (PrefsAccount *)cur->data; + if (ac->protocol == A_IMAP4 && ac->imap_clear_cache_on_exit && + ac->folder) + procmsg_remove_all_cached_messages(FOLDER(ac->folder)); + } + /* save all state before exiting */ folder_write_list(); summary_write_cache(mainwin->summaryview); |