comparison ui/mainwindow.cpp @ 1107:51d3b361f17a

Revert commit 1102
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 15 Sep 2014 17:46:22 +0200
parents 6f7b7d88f048
children 6594e8e63a25
comparison
equal deleted inserted replaced
1106:6f7b7d88f048 1107:51d3b361f17a
1006 1006
1007 void MainWindow::listChanged(int selected) 1007 void MainWindow::listChanged(int selected)
1008 { 1008 {
1009 Q_UNUSED (selected); 1009 Q_UNUSED (selected);
1010 setChangeCount(mUpdatesRemove->selectedCertCount() + 1010 setChangeCount(mUpdatesRemove->selectedCertCount() +
1011 mUpdatesNew->selectedCertCount() + mUpdatesManual->activeCertificates()); 1011 mUpdatesNew->selectedCertCount() + mUpdatesManual->certificates().size());
1012 1012
1013 /* Show a different tip in case of manual changes, updates aviailable, updates and manual 1013 /* Show a different tip in case of manual changes, updates aviailable, updates and manual
1014 * changes available */ 1014 * changes available */
1015 if (changeCount() && !mUpdatesManual->activeCertificates()) { 1015 if (changeCount() && !mUpdatesManual->certificates().size()) {
1016 mUpdatesTip->setText( 1016 mUpdatesTip->setText(
1017 tr("You should apply the following, recommended changes to your certificate stores:")); 1017 tr("You should apply the following, recommended changes to your certificate stores:"));
1018 } else if (changeCount()) { 1018 } else if (changeCount()) {
1019 mUpdatesTip->setText( 1019 mUpdatesTip->setText(
1020 tr("You can apply the following, changes to your certificate stores:")); 1020 tr("You can apply the following, changes to your certificate stores:"));
1391 } 1391 }
1392 actionBtn->setIcon(btnIcon); 1392 actionBtn->setIcon(btnIcon);
1393 mUpdatesManual->addCertificate(cert, state, actionBtn); 1393 mUpdatesManual->addCertificate(cert, state, actionBtn);
1394 } 1394 }
1395 else { 1395 else {
1396 if (cert.isActive()) { 1396 mUpdatesManual->removeCertificate(cert);
1397 mUpdatesManual->deactivateCertificate(cert);
1398 } else {
1399 mUpdatesManual->activateCertificate(cert);
1400 }
1401 } 1397 }
1402 } 1398 }
1403 1399
1404 void MainWindow::removeFromManual(bool state, const Certificate &cert) 1400 void MainWindow::removeFromManual(bool state, const Certificate &cert)
1405 { 1401 {
1406 if (cert.isActive()) { 1402 mUpdatesManual->removeCertificate(cert);
1407 mUpdatesManual->deactivateCertificate(cert);
1408 } else {
1409 mUpdatesManual->activateCertificate(cert);
1410 }
1411 1403
1412 if (cert.isInstallCert()) { 1404 if (cert.isInstallCert()) {
1413 mInstallList->setCertState(state, cert); 1405 mInstallList->setCertState(state, cert);
1414 } 1406 }
1415 else { 1407 else {

http://wald.intevation.org/projects/trustbridge/