changeset 1107:51d3b361f17a

Revert commit 1102
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 15 Sep 2014 17:46:22 +0200
parents 6f7b7d88f048
children 9bb9932bb819
files ui/mainwindow.cpp
diffstat 1 files changed, 4 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Mon Sep 15 17:43:56 2014 +0200
+++ b/ui/mainwindow.cpp	Mon Sep 15 17:46:22 2014 +0200
@@ -1008,11 +1008,11 @@
 {
     Q_UNUSED (selected);
     setChangeCount(mUpdatesRemove->selectedCertCount() +
-        mUpdatesNew->selectedCertCount() + mUpdatesManual->activeCertificates());
+        mUpdatesNew->selectedCertCount() + mUpdatesManual->certificates().size());
 
     /* Show a different tip in case of manual changes, updates aviailable, updates and manual
      * changes available */
-    if (changeCount() && !mUpdatesManual->activeCertificates()) {
+    if (changeCount() && !mUpdatesManual->certificates().size()) {
         mUpdatesTip->setText(
                 tr("You should apply the following, recommended changes to your certificate stores:"));
     } else if (changeCount()) {
@@ -1393,21 +1393,13 @@
         mUpdatesManual->addCertificate(cert, state, actionBtn);
     }
     else {
-        if (cert.isActive()) {
-            mUpdatesManual->deactivateCertificate(cert);
-        } else {
-            mUpdatesManual->activateCertificate(cert);
-        }
+        mUpdatesManual->removeCertificate(cert);
     }
 }
 
 void MainWindow::removeFromManual(bool state, const Certificate &cert)
 {
-    if (cert.isActive()) {
-        mUpdatesManual->deactivateCertificate(cert);
-    } else {
-        mUpdatesManual->activateCertificate(cert);
-    }
+    mUpdatesManual->removeCertificate(cert);
 
     if (cert.isInstallCert()) {
         mInstallList->setCertState(state, cert);

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