Some improvements to GuiOrphanedDataCleanup

This commit is contained in:
Leon Styhre 2023-07-29 20:58:51 +02:00
parent 40f258f0f4
commit b3d76c31aa

View file

@ -99,7 +99,7 @@ GuiOrphanedDataCleanup::GuiOrphanedDataCleanup(std::function<void()> reloadCallb
mGrid.setEntry(mEntryCount, glm::ivec2 {2, 6}, false, true, glm::ivec2 {1, 1}); mGrid.setEntry(mEntryCount, glm::ivec2 {2, 6}, false, true, glm::ivec2 {1, 1});
mSystemProcessingHeader = std::make_shared<TextComponent>( mSystemProcessingHeader = std::make_shared<TextComponent>(
"PROCESSING SYSTEM:", Font::get(FONT_SIZE_SMALL), mMenuColorPrimary, ALIGN_LEFT); "LAST PROCESSED SYSTEM:", Font::get(FONT_SIZE_SMALL), mMenuColorPrimary, ALIGN_LEFT);
mGrid.setEntry(mSystemProcessingHeader, glm::ivec2 {1, 7}, false, true, glm::ivec2 {1, 1}); mGrid.setEntry(mSystemProcessingHeader, glm::ivec2 {1, 7}, false, true, glm::ivec2 {1, 1});
mSystemProcessing = std::make_shared<TextComponent>("", Font::get(FONT_SIZE_SMALL), mSystemProcessing = std::make_shared<TextComponent>("", Font::get(FONT_SIZE_SMALL),
@ -189,7 +189,10 @@ GuiOrphanedDataCleanup::GuiOrphanedDataCleanup(std::function<void()> reloadCallb
return; return;
} }
if (!mHasCustomCollections) { if (!mHasCustomCollections) {
mStatus->setValue("COLLECTIONS CLEANUP FAILED");
mError->setValue("THERE ARE NO ENABLED CUSTOM COLLECTIONS"); mError->setValue("THERE ARE NO ENABLED CUSTOM COLLECTIONS");
mEntryCount->setValue("0");
mSystemProcessing->setValue("");
return; return;
} }
if (mThread) { if (mThread) {
@ -291,7 +294,7 @@ void GuiOrphanedDataCleanup::cleanupMediaFiles()
++systemCounter; ++systemCounter;
const std::string currentSystem {system->getName() + " (" + system->getFullName() + ")"}; const std::string currentSystem {system->getFullName() + " (" + system->getName() + ")"};
LOG(LogInfo) << "Processing system \"" << currentSystem << "\""; LOG(LogInfo) << "Processing system \"" << currentSystem << "\"";
{ {
@ -425,7 +428,7 @@ void GuiOrphanedDataCleanup::cleanupGamelists()
++systemCounter; ++systemCounter;
const std::string currentSystem {system->getName() + " (" + system->getFullName() + ")"}; const std::string currentSystem {system->getFullName() + " (" + system->getName() + ")"};
LOG(LogInfo) << "Processing system \"" << currentSystem << "\""; LOG(LogInfo) << "Processing system \"" << currentSystem << "\"";
{ {
@ -924,7 +927,6 @@ void GuiOrphanedDataCleanup::update(int deltaTime)
} }
message.append("CLEANUP"); message.append("CLEANUP");
mStatus->setValue(message); mStatus->setValue(message);
mSystemProcessing->setValue("");
mCompleted = false; mCompleted = false;
} }
else if (mFailed) { else if (mFailed) {