diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-13 09:32:10 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-13 09:32:10 +0000 |
commit | 53d03c4970876ad8387fb3a743a25f4b9cec85e3 (patch) | |
tree | 4366be8cd9473d70b41a04f8e1d2ed30ed74c4ef /libsylph | |
parent | 9e5d1627ea3320624f3266528130371a0a3aff5a (diff) |
enabled custom queue folder.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@826 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/account.c | 17 | ||||
-rw-r--r-- | libsylph/prefs_account.c | 2 | ||||
-rw-r--r-- | libsylph/prefs_account.h | 2 |
3 files changed, 17 insertions, 4 deletions
diff --git a/libsylph/account.c b/libsylph/account.c index 9c062ded..794a3003 100644 --- a/libsylph/account.c +++ b/libsylph/account.c @@ -371,10 +371,19 @@ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs, } break; case F_QUEUE: - if (ac_prefs->folder) - item = FOLDER(ac_prefs->folder)->queue; - if (!item) - item = folder_get_default_queue(); + if (ac_prefs->set_queue_folder && ac_prefs->queue_folder) { + item = folder_find_item_from_identifier + (ac_prefs->queue_folder); + /* only allow queue-type folder */ + if (item && item->stype != F_QUEUE) + item = NULL; + } + if (!item) { + if (ac_prefs->folder) + item = FOLDER(ac_prefs->folder)->queue; + if (!item) + item = folder_get_default_queue(); + } break; case F_TRASH: if (ac_prefs->set_trash_folder && ac_prefs->trash_folder) { diff --git a/libsylph/prefs_account.c b/libsylph/prefs_account.c index 21886604..dd281904 100644 --- a/libsylph/prefs_account.c +++ b/libsylph/prefs_account.c @@ -118,6 +118,8 @@ static PrefParam param[] = { {"sent_folder", NULL, &tmp_ac_prefs.sent_folder, P_STRING}, {"set_draft_folder", "FALSE", &tmp_ac_prefs.set_draft_folder, P_BOOL}, {"draft_folder", NULL, &tmp_ac_prefs.draft_folder, P_STRING}, + {"set_queue_folder", "FALSE", &tmp_ac_prefs.set_queue_folder, P_BOOL}, + {"queue_folder", NULL, &tmp_ac_prefs.queue_folder, P_STRING}, {"set_trash_folder", "FALSE", &tmp_ac_prefs.set_trash_folder, P_BOOL}, {"trash_folder", NULL, &tmp_ac_prefs.trash_folder, P_STRING}, diff --git a/libsylph/prefs_account.h b/libsylph/prefs_account.h index 05529fe6..ee3db7c8 100644 --- a/libsylph/prefs_account.h +++ b/libsylph/prefs_account.h @@ -149,6 +149,8 @@ struct _PrefsAccount gchar *sent_folder; gboolean set_draft_folder; gchar *draft_folder; + gboolean set_queue_folder; + gchar *queue_folder; gboolean set_trash_folder; gchar *trash_folder; |