talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 952429350434024b69f925a82a7daeeefe2175bd
parent a11dbee6e75c6e65de3e91c320d5e4b5ad5e0ad7
Author: Paul <paul@claws-mail.org>
Date:   Wed,  9 Sep 2015 16:54:57 +0100

add prefs for default folder sort and direction, no ui yet

Diffstat:
Msrc/folder.c | 4++--
Msrc/prefs_common.c | 4++++
Msrc/prefs_common.h | 2++
3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/folder.c b/src/folder.c @@ -389,8 +389,8 @@ FolderItem *folder_item_new(Folder *folder, const gchar *name, const gchar *path item->data = NULL; item->parent_stype = -1; - item->sort_key = SORT_BY_DATE; - item->sort_type = SORT_ASCENDING; + item->sort_key = prefs_common.default_sort_key; + item->sort_type = prefs_common.default_sort_type; item->prefs = folder_item_prefs_new(); diff --git a/src/prefs_common.c b/src/prefs_common.c @@ -437,6 +437,10 @@ static PrefParam param[] = { NULL, NULL, NULL}, /* Display: Summary View */ + {"default_sort_key", "3", &prefs_common.default_sort_key, P_ENUM, + NULL, NULL, NULL}, + {"default_sort_type", "1", &prefs_common.default_sort_type, P_ENUM, + NULL, NULL, NULL}, {"use_address_book", "FALSE", &prefs_common.use_addr_book, P_BOOL, NULL, NULL, NULL}, {"thread_by_subject", "TRUE", &prefs_common.thread_by_subject, P_BOOL, diff --git a/src/prefs_common.h b/src/prefs_common.h @@ -235,6 +235,8 @@ struct _PrefsCommon gboolean thread_by_subject; gint thread_by_subject_max_age; /*!< Max. age of a thread which was threaded * by subject (days) */ + FolderSortKey default_sort_key; + FolderSortType default_sort_type; gchar *last_opened_folder; gboolean goto_last_folder_on_startup;