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

Add a sort (alphabetical) option when listing batch queues

parent 79051b66
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3009 passed
......@@ -92,9 +92,13 @@ void sbbs_t::batchmenu()
start_batch_download();
break;
case 'L':
{
bool sort = !noyes(text[SortAlphaQ]);
ini = batch_list_read(&cfg, useron.number, XFER_BATCH_UPLOAD);
filenames = iniGetSectionList(ini, NULL);
if(strListCount(filenames)) {
if(sort)
strListSortAlphaCase(filenames);
bputs(text[UploadQueueLstHdr]);
for(size_t i = 0; filenames[i]; ++i) {
const char* filename = filenames[i];
......@@ -114,6 +118,8 @@ void sbbs_t::batchmenu()
ini = batch_list_read(&cfg, useron.number, XFER_BATCH_DOWNLOAD);
filenames = iniGetSectionList(ini, NULL);
if(strListCount(filenames)) {
if(sort)
strListSortAlphaCase(filenames);
bputs(text[DownloadQueueLstHdr]);
for(size_t i = 0; filenames[i]; ++i) {
const char* filename = filenames[i];
......@@ -144,6 +150,7 @@ void sbbs_t::batchmenu()
iniFreeStringList(filenames);
iniFreeStringList(ini);
break;
}
case 'R':
if((n = batup_total()) > 0) {
bprintf(text[RemoveWhichFromUlQueue], n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment