Skip to content
Snippets Groups Projects
Commit 5940d582 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Separate "natural" (no sort) order from "Date ascending" sort order for dirs

Since it is possible for someone to change the add/import date of a file
after it's been added to the filebase, the natural/unsorted order might not
actually be the same as "date ascending", so let the sysop/script-author
really re-sort by date ascending if that's what they're trying to do.

I think this is addresses the issue that Nightfox and Nelgin were describing
in #synchronet.
parent a842d613
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -1851,7 +1851,7 @@ static const char* filebase_detail_prop_desc[] = {
};
static const char* filebase_sort_prop_desc[] = {
"Natural sort order (same as DATE_A)",
"Natural/index order (no sorting)",
"Filename ascending, case insensitive sort order",
"Filename descending, case insensitive sort order",
"Filename ascending, case sensitive sort order",
......
......@@ -307,7 +307,7 @@ enum file_sort { /* Values for dir[x].sort */
,FILE_SORT_DATE_D = 3 /* Sort by upload date, descending */
,FILE_SORT_SIZE_A = 6 /* Sort by file size, ascending */
,FILE_SORT_SIZE_D = 7 /* Sort by file size, descending */
,FILE_SORT_NATURAL = FILE_SORT_DATE_A
,FILE_SORT_NATURAL = 8 /* No sorting */
};
/* Values for grp[x].sort */
......
......@@ -35,6 +35,7 @@ char* file_sort_desc[] = {
"Name Descending (case-sensitive)",
"Size Ascending",
"Size Descending",
"None (unsorted natural index order)",
NULL
};
......@@ -127,7 +128,8 @@ static char* sort_help =
"\n"
"The dates available for sorting are the file import/upload date/time.\n"
"\n"
"The natural (and thus fastest) sort order is `Date Ascending`."
"The natural (and thus fastest) sort order is `None`, which is normally\n"
"the order in which the files were added/imported into the filebase."
;
static bool new_dir(unsigned new_dirnum, unsigned libnum)
......@@ -2076,7 +2078,7 @@ void dir_cfg(int libnum)
"\n"
"This is the advanced options menu for the selected file directory.\n"
;
n=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,4,65,&adv_dflt,0
n=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,4,66,&adv_dflt,0
,"Advanced Options",opt);
if(n==-1)
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment