Mercurial > trustbridge
diff ui/mainwindow.cpp @ 692:3791a277f00b
Remove code duplication and calculate headers only in listchanged
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 01 Jul 2014 16:39:28 +0200 |
parents | 315103410002 |
children | 0fc1a20adaff |
line wrap: on
line diff
--- a/ui/mainwindow.cpp Tue Jul 01 15:43:14 2014 +0200 +++ b/ui/mainwindow.cpp Tue Jul 01 16:39:28 2014 +0200 @@ -631,6 +631,8 @@ mUpdatesManual->hide(); connect(mUpdatesManual, SIGNAL(certChanged(bool, const Certificate&)), this, SLOT(removeFromManual(bool, const Certificate&))); + connect(mUpdatesManual, SIGNAL(certListChanged(int)), + this, SLOT(listChanged(int))); updatesNewLayout->setAlignment(Qt::AlignTop); updatesRemoveLayout->setAlignment(Qt::AlignTop); @@ -883,26 +885,13 @@ } } } - mUpdatesHeader->setText("<h2>" + - tr("Updates (%1/%2)") - .arg(mUpdatesNew->selectedCertCount() + mUpdatesRemove->selectedCertCount()) - .arg(newRemoveCerts.size() + newInstallCerts.size()) + "</h2>"); + mLastCertUpdate->setText(tr("Last update of certificates: %1") .arg(mInstalledList.date().toString())); - mUpdatesNewCertificates->setText("<h3>" + - tr("Install new trusted certificates (%1/%2)") - .arg(mUpdatesNew->selectedCertCount()) - .arg(mUpdatesNew->certificates().size()) + - "</h3>"); - - mUpdatesRemoveCertificates->setText("<h3>" + - tr("Remove revoked certificates (%1/%2)") - .arg(mUpdatesRemove->selectedCertCount()) - .arg(mUpdatesRemove->certificates().size()) + - "</h3>"); mUpdatesManualCertificates->setText("<h3>" + tr("Manually changed certificates (%1)").arg(0) + "</h3>"); + listChanged(0); } void MainWindow::installerError(const QString& errMsg) {