From 892a6d377093ea510aee33ae07de227c2418f193 Mon Sep 17 00:00:00 2001 From: Ankush Dutt Date: Thu, 3 Aug 2023 15:29:55 +0530 Subject: [PATCH] GUI: Improve DLC download request indication --- backends/dlc/scummvmcloud.cpp | 1 + gui/dlcsdialog.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backends/dlc/scummvmcloud.cpp b/backends/dlc/scummvmcloud.cpp index 77da3d7134785..56fbb202d8673 100644 --- a/backends/dlc/scummvmcloud.cpp +++ b/backends/dlc/scummvmcloud.cpp @@ -117,6 +117,7 @@ void ScummVMCloud::downloadFileCallback(Networking::DataResponse r) { addEntryToConfig(destPath); // handle next download DLCMan._queuedDownloadTasks.front()->state = DLCDesc::kDownloaded; + DLCMan.refreshDLCList(); DLCMan._queuedDownloadTasks.pop(); DLCMan._dlcsInProgress.remove_at(0); DLCMan.processDownloadQueue(); diff --git a/gui/dlcsdialog.cpp b/gui/dlcsdialog.cpp index c9394bf1294f5..59e951e968f63 100644 --- a/gui/dlcsdialog.cpp +++ b/gui/dlcsdialog.cpp @@ -65,7 +65,11 @@ void DLCsDialog::refreshDLCList() { // Populate the ListWidget Common::U32StringArray games; for (int i = 0; i < DLCMan._dlcs.size(); ++i) { - games.push_back(DLCMan._dlcs[i]->name); + if (DLCMan._dlcs[i]->state == DLC::DLCDesc::kInProgress) { + games.push_back("[Downloading] " + DLCMan._dlcs[i]->name); + } else { + games.push_back(DLCMan._dlcs[i]->name); + } } // Gray out already downloaded packages @@ -108,9 +112,8 @@ void DLCsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { } break; case kDownloadSelectedCmd: { - MessageDialog dialog("Downloading: " + _gamesList->getSelectedString()); - dialog.runModal(); DLCMan.addDownload(_gamesList->getSelected()); + refreshDLCList(); } break; case kRefreshDLCList: {