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() ...@@ -92,9 +92,13 @@ void sbbs_t::batchmenu()
start_batch_download(); start_batch_download();
break; break;
case 'L': case 'L':
{
bool sort = !noyes(text[SortAlphaQ]);
ini = batch_list_read(&cfg, useron.number, XFER_BATCH_UPLOAD); ini = batch_list_read(&cfg, useron.number, XFER_BATCH_UPLOAD);
filenames = iniGetSectionList(ini, NULL); filenames = iniGetSectionList(ini, NULL);
if(strListCount(filenames)) { if(strListCount(filenames)) {
if(sort)
strListSortAlphaCase(filenames);
bputs(text[UploadQueueLstHdr]); bputs(text[UploadQueueLstHdr]);
for(size_t i = 0; filenames[i]; ++i) { for(size_t i = 0; filenames[i]; ++i) {
const char* filename = filenames[i]; const char* filename = filenames[i];
...@@ -114,6 +118,8 @@ void sbbs_t::batchmenu() ...@@ -114,6 +118,8 @@ void sbbs_t::batchmenu()
ini = batch_list_read(&cfg, useron.number, XFER_BATCH_DOWNLOAD); ini = batch_list_read(&cfg, useron.number, XFER_BATCH_DOWNLOAD);
filenames = iniGetSectionList(ini, NULL); filenames = iniGetSectionList(ini, NULL);
if(strListCount(filenames)) { if(strListCount(filenames)) {
if(sort)
strListSortAlphaCase(filenames);
bputs(text[DownloadQueueLstHdr]); bputs(text[DownloadQueueLstHdr]);
for(size_t i = 0; filenames[i]; ++i) { for(size_t i = 0; filenames[i]; ++i) {
const char* filename = filenames[i]; const char* filename = filenames[i];
...@@ -144,6 +150,7 @@ void sbbs_t::batchmenu() ...@@ -144,6 +150,7 @@ void sbbs_t::batchmenu()
iniFreeStringList(filenames); iniFreeStringList(filenames);
iniFreeStringList(ini); iniFreeStringList(ini);
break; break;
}
case 'R': case 'R':
if((n = batup_total()) > 0) { if((n = batup_total()) > 0) {
bprintf(text[RemoveWhichFromUlQueue], n); 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