Ref T78, setting and dialog "do not show again"

Applies to automatic update info check
This commit is contained in:
Klaus Basan
2017-05-08 19:40:39 +02:00
parent 0af6a372e3
commit 9b8afdf499
6 changed files with 105 additions and 16 deletions

View File

@@ -26,8 +26,10 @@ namespace BlackGui
{
ui->setupUi(this);
ui->bb_DownloadInstallDialog->button(QDialogButtonBox::Ok)->setText(" Download and install ");
ui->cb_DontShowAgain->setChecked(!m_setting.get());
this->selectionChanged();
connect(ui->comp_DistributionInfo, &CDistributionInfoComponent::selectionChanged, this, &CDownloadAndInstallDialog::selectionChanged);
connect(ui->cb_DontShowAgain, &QCheckBox::toggled, this, &CDownloadAndInstallDialog::onDontShowAgain);
}
CDownloadAndInstallDialog::~CDownloadAndInstallDialog()
@@ -53,6 +55,11 @@ namespace BlackGui
return QDialog::Rejected;
}
void CDownloadAndInstallDialog::onDontShowAgain(bool dontShowAgain)
{
m_setting.setAndSave(!dontShowAgain);
}
void CDownloadAndInstallDialog::selectionChanged()
{
const bool nv = ui->comp_DistributionInfo->isNewVersionAvailable();