Improved version of "Allow to delete data directory from application view"

- split functions into dynamic loading and const versions (loading at startup)
- reload other versions from wizard in case they changed
- some renaming/formatting
This commit is contained in:
Klaus Basan
2018-12-02 04:27:59 +01:00
parent d18c763869
commit 7fc6fcb867
13 changed files with 104 additions and 55 deletions

View File

@@ -53,6 +53,11 @@ namespace BlackGui
CCopySettingsAndCachesComponent::~CCopySettingsAndCachesComponent()
{ }
void CCopySettingsAndCachesComponent::reloadOtherVersions()
{
ui->comp_OtherSwiftVersions->reloadOtherVersions();
}
void CCopySettingsAndCachesComponent::onOtherVersionChanged(const CApplicationInfo &info)
{
readOnlyCheckbox(ui->cb_SettingsAudio, !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsAudio.getFilename()));
@@ -396,7 +401,7 @@ namespace BlackGui
if (copied > 0)
{
const CStatusMessage m = CStatusMessage(this).validationInfo("Copied %1 settings") << copied;
this->showOverlayMessage(m);
this->showOverlayHTMLMessage(m);
}
return copied;
@@ -469,6 +474,12 @@ namespace BlackGui
return setting ? s.arg(text) : c.arg(text);
}
void CCopySettingsAndCachesWizardPage::initializePage()
{
// re-init other versions
if (m_copyCachesAndSettings) { m_copyCachesAndSettings->reloadOtherVersions(); }
}
bool CCopySettingsAndCachesWizardPage::validatePage()
{
return true;