changeset 1109:6594e8e63a25

(issue115) Add tooltips and fix manual changes handling
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 15 Sep 2014 19:02:17 +0200
parents 9bb9932bb819
children b6cb4fd7ee20
files ui/certificateitemwidget.cpp ui/certificateitemwidget.h ui/l10n/trustbridge_de_DE.ts ui/mainwindow.cpp ui/mainwindow.h
diffstat 5 files changed, 144 insertions(+), 142 deletions(-) [+]
line wrap: on
line diff
--- a/ui/certificateitemwidget.cpp	Mon Sep 15 17:47:12 2014 +0200
+++ b/ui/certificateitemwidget.cpp	Mon Sep 15 19:02:17 2014 +0200
@@ -20,11 +20,15 @@
     mButton(btn)
 {
     mCertificate = cert;
-    mState = state;
-    /* We carry the state explicitly to be better prepared for future
-     * changes */
+    mOriginalState = state;
     btn->setCheckable(true);
-    btn->setChecked(!state);
+    btn->setStyleSheet("QToolButton:Checked{"
+         "border: 1px solid #8f8f91;"
+         "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
+                                           "stop: 0 #f6f7fa, stop: 1 #dadbde);"
+    "}"
+    );
+    setState(state);
     setupGUI();
 }
 
@@ -56,41 +60,6 @@
     layout->addWidget(mButton);
     mButton->setFixedSize(64, 64);
     mButton->setIconSize(QSize(48, 48));
-    /*
-    if (mCertificate.isInstallCert()) {
-        mComboBox->addItem(QIcon(":/img/security-high.png"), QString(), mInstallLabel);
-        mComboBox->addItem(QIcon(":/img/security-low.png"), QString(), mRemoveLabel);
-        if (mState) {
-            mComboBox->setCurrentIndex(0);
-            mComboBox->setToolTip(tr("This certificate is currently installed."));
-        }
-        else {
-            mComboBox->setCurrentIndex(1);
-            mComboBox->setToolTip(tr("This certificate is currently not installed."));
-        }
-        layout->addWidget(mComboBox);
-    }
-    else if (!mCertificate.isInstallCert() && !mEditable){
-        QImage *img = new QImage(":/img/trash-empty.png");
-        QLabel *imgLabel = new QLabel;
-        imgLabel->setPixmap(QPixmap::fromImage(*img));
-        imgLabel->setFixedSize(64, 64);
-        imgLabel->setMargin(8);
-        imgLabel->setToolTip(tr("This certificate was uninstalled."));
-        layout->addWidget(imgLabel);
-    }
-    else {
-        mComboBox->addItem(QIcon(":/img/trash-empty.png"), QString(), tr("uninstall"));
-        mComboBox->addItem(QIcon(":/img/security-medium.png"), QString(), tr("keep"));
-        mComboBox->setToolTip(tr("This certificate is currently installed."));
-        if (mState)
-            mComboBox->setCurrentIndex(0);
-        else {
-            mComboBox->setCurrentIndex(1);
-        }
-        layout->addWidget(mComboBox);
-    }
-    */
     layout->addWidget(mLabel);
     this->setLayout(layout);
 }
@@ -101,22 +70,22 @@
         return true;
     }
 
-    /*
-    const QString currentString = mComboBox->currentData().toString();
-
-    if (!mCertificate.isInstallCert()) {
-        return currentString == tr("uninstall");
-    }
-
-    return currentString == mInstallLabel;
-    */
-    return mState;
+    return !mButton->isChecked();
 }
 
 void CertificateItemWidget::setState(bool state)
 {
-    mState = state;
+    /* The internal state we get here is inverted for Ui reasons the logic
+     * is if a certificate is selected for installation the button
+     * is disabled (as this is the default) Only those that are
+     * unselected have the enabled button. */
+    mButton->blockSignals(true); // code did this and not the user
     mButton->setChecked(!state);
+    mButton->blockSignals(false);
+    if (mButton->isEnabled()) {
+        mButton->setToolTip(mButton->property(!state ? "ToolTip_On" :
+                    "ToolTip_Off").toString());
+    }
 }
 
 Certificate CertificateItemWidget::certificate()
@@ -126,6 +95,7 @@
 
 void CertificateItemWidget::currentStateChanged(bool state)
 {
-    mState = !state;
-    emit stateChanged(mState, mCertificate);
+    mButton->setToolTip(mButton->property(state ? "ToolTip_On" :
+                "ToolTip_Off").toString());
+    emit stateChanged(state, mCertificate);
 }
--- a/ui/certificateitemwidget.h	Mon Sep 15 17:47:12 2014 +0200
+++ b/ui/certificateitemwidget.h	Mon Sep 15 19:02:17 2014 +0200
@@ -37,7 +37,7 @@
     void setupGUI();
 
     Certificate mCertificate;
-    bool mState;
+    bool mOriginalState;
     QLabel *mLabel;
     QToolButton *mButton;
 
--- a/ui/l10n/trustbridge_de_DE.ts	Mon Sep 15 17:47:12 2014 +0200
+++ b/ui/l10n/trustbridge_de_DE.ts	Mon Sep 15 19:02:17 2014 +0200
@@ -67,12 +67,12 @@
         <translation type="vanished">Entfernen</translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="37"/>
+        <location filename="../certificateitemwidget.cpp" line="41"/>
         <source>Validity: %1 until %2</source>
         <translation>Gültigkeit: %1 bis %2</translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="40"/>
+        <location filename="../certificateitemwidget.cpp" line="44"/>
         <source>Fingerprint (SHA1): &lt;code&gt;%1&lt;/code&gt;</source>
         <translation>Fingerabdruck (SHA1): &lt;code&gt;%1&lt;/code&gt;</translation>
     </message>
@@ -203,19 +203,19 @@
         <translation type="vanished">Neue Vorschläge für Wurzelzertifikate sind verfügbar. Klicken Sie hier zum Installieren.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="501"/>
-        <location filename="../mainwindow.cpp" line="664"/>
+        <location filename="../mainwindow.cpp" line="514"/>
+        <location filename="../mainwindow.cpp" line="677"/>
         <source>Check for Updates</source>
         <translation>Neue Empfehlungen suchen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="503"/>
-        <location filename="../mainwindow.cpp" line="1028"/>
+        <location filename="../mainwindow.cpp" line="516"/>
+        <location filename="../mainwindow.cpp" line="1041"/>
         <source>Quit</source>
         <translation>Beenden</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="521"/>
+        <location filename="../mainwindow.cpp" line="534"/>
         <source>TrustBridge</source>
         <translation>TrustBridge</translation>
     </message>
@@ -241,7 +241,7 @@
 Empfehlungen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="937"/>
+        <location filename="../mainwindow.cpp" line="950"/>
         <source>Revoked
 certificates</source>
         <translation>Abgeratene
@@ -256,41 +256,41 @@
         <translation type="vanished">Aktualisierungen (%1/%2)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="613"/>
-        <location filename="../mainwindow.cpp" line="1033"/>
+        <location filename="../mainwindow.cpp" line="626"/>
+        <location filename="../mainwindow.cpp" line="1046"/>
         <source>Quit without saving</source>
         <translation>Beenden ohne Schreiben</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="717"/>
-        <location filename="../mainwindow.cpp" line="1070"/>
+        <location filename="../mainwindow.cpp" line="730"/>
+        <location filename="../mainwindow.cpp" line="1087"/>
         <source>Remove revoked certificates (%1/%2)</source>
         <translation>Abgeratene Wurzelzertifikate entfernen (%1/%2)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="794"/>
+        <location filename="../mainwindow.cpp" line="807"/>
         <source>Trusted certificates</source>
         <translation>Empfohlene Wurzelzertifikate</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="795"/>
+        <location filename="../mainwindow.cpp" line="808"/>
         <source>The following list of trusted root certificates is managed by the BSI. The BSI validates independently the authenticity, security and actuality of these certificates.</source>
         <translation>Die folgenden Wurzelzertifikate wurden bisher vom BSI zur Installation vorgeschlagen. Sie können erkennen, welche Sie bereits geschrieben haben.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="802"/>
+        <location filename="../mainwindow.cpp" line="815"/>
         <source>Please choose the certificates you want to trust or untrust. TrustBridge will install these certificates for your secure communication for email and internet.</source>
         <translation>Legen Sie fest, ob Sie der Empfehlung ganz oder teilweise folgen möchten. TrustBridge wird die Änderungen an den Wurzelzertifikaten vornehmen.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="928"/>
+        <location filename="../mainwindow.cpp" line="941"/>
         <source>Trusted
 certificates</source>
         <translation>Empfohlene
 Wurzelzertifikate</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="946"/>
+        <location filename="../mainwindow.cpp" line="959"/>
         <source>Information
 and help</source>
         <translation>Informationen
@@ -317,28 +317,27 @@
         <translation type="vanished">Aktualisierungen einspielen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="695"/>
-        <location filename="../mainwindow.cpp" line="1054"/>
+        <location filename="../mainwindow.cpp" line="708"/>
+        <location filename="../mainwindow.cpp" line="1071"/>
         <source>Install new trusted certificates (%1/%2)</source>
         <translation>Neue, empfohlene Wurzelzertifikate installieren (%1/%2)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="699"/>
-        <location filename="../mainwindow.cpp" line="721"/>
-        <location filename="../mainwindow.cpp" line="740"/>
-        <location filename="../mainwindow.cpp" line="1043"/>
-        <location filename="../mainwindow.cpp" line="1060"/>
-        <location filename="../mainwindow.cpp" line="1076"/>
+        <location filename="../mainwindow.cpp" line="712"/>
+        <location filename="../mainwindow.cpp" line="734"/>
+        <location filename="../mainwindow.cpp" line="753"/>
+        <location filename="../mainwindow.cpp" line="1077"/>
+        <location filename="../mainwindow.cpp" line="1093"/>
         <source>Show details</source>
         <translation>Details einblenden</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="835"/>
+        <location filename="../mainwindow.cpp" line="848"/>
         <source>Revoked certificates</source>
         <translation>Abgeratene Wurzelzertifikate</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="836"/>
+        <location filename="../mainwindow.cpp" line="849"/>
         <source>Certificates can be corrupted or stolen and misused in many ways. Therefore the BSI recommends to remove all revoked certificates from your system.</source>
         <translation>Wurzelzertifikate können veraltet sein, korrumpiert, gestohlen oder missbraucht werden. Die Wurzelzertifikate , von denen das BSI abrät, sollten umgehend entfernt werden.</translation>
     </message>
@@ -351,7 +350,7 @@
         <translation type="vanished">Abweichend zu behandelnde Wurzelzertifikate (%1)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="886"/>
+        <location filename="../mainwindow.cpp" line="899"/>
         <source>Trust in your digital communication</source>
         <translation>Vertrauen in Ihre digitale Kommunikation</translation>
     </message>
@@ -360,8 +359,8 @@
         <translation type="vanished">Änderungen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="609"/>
-        <location filename="../mainwindow.cpp" line="1029"/>
+        <location filename="../mainwindow.cpp" line="622"/>
+        <location filename="../mainwindow.cpp" line="1042"/>
         <source>Certificates unchanged</source>
         <translation>Wurzelzertifikate unverändert</translation>
     </message>
@@ -378,60 +377,60 @@
         <translation type="vanished">Es wird empfohlen, die nachfolgenden Änderungen an Ihren Wurzelzertifikaten zu übernehmen.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1037"/>
+        <location filename="../mainwindow.cpp" line="1050"/>
         <source>Apply changes</source>
         <translation>Änderungen schreiben</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="534"/>
+        <location filename="../mainwindow.cpp" line="547"/>
         <source>Version: </source>
         <translation>Version:</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="263"/>
-        <location filename="../mainwindow.cpp" line="265"/>
+        <location filename="../mainwindow.cpp" line="276"/>
+        <location filename="../mainwindow.cpp" line="278"/>
         <source>An updated certificate list is available.</source>
         <translation>Neue Vorschläge für Wurzelzertifikate sind verfügbar.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="265"/>
+        <location filename="../mainwindow.cpp" line="278"/>
         <source>Click here to install.</source>
         <translation>Klicken Sie hier zum Installieren.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="275"/>
-        <location filename="../mainwindow.cpp" line="278"/>
+        <location filename="../mainwindow.cpp" line="288"/>
+        <location filename="../mainwindow.cpp" line="291"/>
         <source>An update for %1 is available.</source>
         <translation>Eine Aktualisierung für %1 ist verfügbar.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="279"/>
+        <location filename="../mainwindow.cpp" line="292"/>
         <source>Click here to download and install the update.</source>
         <translation>Hier klicken, um Download und Installation zu starten.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="494"/>
+        <location filename="../mainwindow.cpp" line="507"/>
         <source>Failed to check for updates:</source>
         <translation>Fehler bei Updateprüfung:</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1017"/>
+        <location filename="../mainwindow.cpp" line="1030"/>
         <source>You should apply the following, recommended changes to your certificate stores:</source>
         <translation>Es wird empfohlen, die nachfolgenden Änderungen an Ihren Zertifikatsspeichern vorzunehmen:</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1020"/>
+        <location filename="../mainwindow.cpp" line="1033"/>
         <source>You can apply the following, changes to your certificate stores:</source>
         <translation>Sie können die nachfolgenden Änderungen an Ihren Zertifikatsspeichern vornehmen:</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1023"/>
+        <location filename="../mainwindow.cpp" line="1036"/>
         <source>There are currently no changes for your certificate stores.</source>
         <translation>Es liegem keine neuen Empfehlungen vor.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="617"/>
-        <location filename="../mainwindow.cpp" line="1031"/>
+        <location filename="../mainwindow.cpp" line="630"/>
+        <location filename="../mainwindow.cpp" line="1044"/>
         <source>Install certificates again</source>
         <translation>Wurzelzertifikate erneut schreiben</translation>
     </message>
@@ -484,7 +483,7 @@
         <translation type="vanished">Letzte erfolgreiche Prüfung nach Aktualisierungen: %1</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1529"/>
+        <location filename="../mainwindow.cpp" line="1553"/>
         <source>Sucessfully checked for updates.</source>
         <translation>Suche nach neuen Empfehlungen erfolgreich.</translation>
     </message>
@@ -495,91 +494,91 @@
 Hier klicken, um Download und Installation zu starten.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="549"/>
+        <location filename="../mainwindow.cpp" line="562"/>
         <source>TrustBridge is a root certificate installer for Windows and GNU/Linux.&lt;br/&gt;</source>
         <translation>TrustBridge ist ein Wurzelzertifikatsinstaller für Windows und GNU/Linux.&lt;br/&gt;</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="551"/>
+        <location filename="../mainwindow.cpp" line="564"/>
         <source>The root certificate lists are managed by the German &lt;a href=&quot;https://www.bsi.bund.de&quot;&gt;Federal Office for Information Security (BSI)&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;</source>
         <translation>Die Wurzelzertifikate werden vom &lt;a href=&quot;https://www.bsi.bund.de&quot;&gt;Bundesamt für Sicherheit in der Informationstechnik (BSI)&lt;/a&gt; vorgeschlagen.&lt;br/&gt;&lt;br/&gt;</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="554"/>
+        <location filename="../mainwindow.cpp" line="567"/>
         <source>The software was developed by the companies &lt;a href=&quot;http://www.intevation.de&quot;&gt;Intevation GmbH&lt;/a&gt; and  &lt;a href=&quot;http://www.dn-systems.de&quot;&gt;DN-Systems GmbH&lt;/a&gt;, &lt;br&gt; contracted by the German Federal Office for Information Security (BSI).&lt;br/&gt;&lt;br/&gt;</source>
         <translation>Die Software wurde von den Unternehmen &lt;a href=&quot;http://www.intevation.de&quot;&gt;Intevation GmbH&lt;/a&gt; und  &lt;a href=&quot;http://www.dn-systems.de&quot;&gt;DN-Systems GmbH&lt;/a&gt; entwickelt, &lt;br&gt; beauftragt vom Bundesamt für Sicherheit in der Informationstechnik (BSI).&lt;br/&gt;&lt;br/&gt;</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="558"/>
+        <location filename="../mainwindow.cpp" line="571"/>
         <source>TrustBridge is Free Software licensed under GNU GPL v2+.&lt;br/&gt;&lt;br/&gt;Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik</source>
         <translation>TrustBridge ist Freie Software, lizensiert unter der GNU GPL v2+.&lt;br/&gt;&lt;br/&gt;(C) 2014. Die Rechte liegen beim Bundesamt für Sicherheit in der Informationstechnik.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="575"/>
+        <location filename="../mainwindow.cpp" line="588"/>
         <source>Show Help</source>
         <translation>Hilfe anzeigen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="580"/>
+        <location filename="../mainwindow.cpp" line="593"/>
         <source>Proxy settings</source>
         <translation>Proxy-Einstellungen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="655"/>
+        <location filename="../mainwindow.cpp" line="668"/>
         <source>Last update check:</source>
         <translation>Letzte Suche:</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="660"/>
+        <location filename="../mainwindow.cpp" line="673"/>
         <source>No connection with the updateserver.</source>
         <translation>Keine Verbindung zum Updateserver.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="662"/>
+        <location filename="../mainwindow.cpp" line="675"/>
         <source>Update</source>
         <translation>Aktualisieren</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="698"/>
-        <location filename="../mainwindow.cpp" line="720"/>
-        <location filename="../mainwindow.cpp" line="739"/>
+        <location filename="../mainwindow.cpp" line="711"/>
+        <location filename="../mainwindow.cpp" line="733"/>
+        <location filename="../mainwindow.cpp" line="752"/>
         <source>Details</source>
         <translation>Details</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="843"/>
+        <location filename="../mainwindow.cpp" line="856"/>
         <source>The following unsecure certificates were revoked by the BSI. Already uninstalled certificates cannot be reinstalled. It is recommended that you select all certificates to uninstall if you still have revoked certificates installed.</source>
         <translation>Von den folgenden, ehemals empfohlenen Wurzelzertifikaten, rät das BSI ab. Über diese Anwendung können sie auch nicht mehr installiert werden. Markieren Sie verbleibende Wurzelzertifikate zur Löschung, sobald Sie können.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="888"/>
+        <location filename="../mainwindow.cpp" line="901"/>
         <source>Version</source>
         <translation>Version</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="915"/>
+        <location filename="../mainwindow.cpp" line="928"/>
         <source>Pending
 changes</source>
         <translation>Ausstehende
 Änderungen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1049"/>
+        <location filename="../mainwindow.cpp" line="1066"/>
         <source>Manual changes (%1)</source>
         <translation>Manuelle Änderungen (%1)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1100"/>
+        <location filename="../mainwindow.cpp" line="1117"/>
         <source>Certificate list from:</source>
         <translation>Zertifikatsliste vom:</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1105"/>
+        <location filename="../mainwindow.cpp" line="1122"/>
         <source>Currently installed certificate list:</source>
         <translation>Aktuell installierte Zertifikatsliste:</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1109"/>
+        <location filename="../mainwindow.cpp" line="1126"/>
         <source>No certificate list installed.</source>
         <translation>Keine Zertifikatsliste installiert.</translation>
     </message>
@@ -593,18 +592,18 @@
         <translation type="vanished">Sie können die nachfolgenden Änderungen an Ihren Zertifikatsspeichern vornehmen.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1034"/>
+        <location filename="../mainwindow.cpp" line="1047"/>
         <source>Pending changes (%1)</source>
         <translation>Ausstehende
 Änderungen (%1)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1088"/>
+        <location filename="../mainwindow.cpp" line="1105"/>
         <source>New, recommended changes (%1/%2)</source>
         <translation>Neue, empfohlene Änderungen (%1/%2)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1096"/>
+        <location filename="../mainwindow.cpp" line="1113"/>
         <source>No new recommendations</source>
         <translation>Keine neuen Empfehlungen</translation>
     </message>
@@ -625,37 +624,37 @@
         <translation type="vanished">Neue empfohlene Änderungen (%1)</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1224"/>
+        <location filename="../mainwindow.cpp" line="1257"/>
         <source>Error executing update</source>
         <translation>Fehler bei der Aktualisierung</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1311"/>
+        <location filename="../mainwindow.cpp" line="1344"/>
         <source>Installation with standard user account</source>
         <translation>Installation mit Standardbenutzerkonto</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1312"/>
+        <location filename="../mainwindow.cpp" line="1345"/>
         <source>Windows will now ask you to confirm each root certificate modification because TrustBridge does not have the necessary privileges to install root certificates into the Windows certificate store silently.</source>
         <translation>Windows wird Sie nun bitten, jede Wurzelzertifikatsänderung zu bestätigen. Grund dafür: TrustBridge besitzt nicht die nötigen Privilegien, um Wurzelzertifikate ohne Nachfrage in den Windows-Zertifikatsspeicher zu installieren.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1320"/>
+        <location filename="../mainwindow.cpp" line="1353"/>
         <source>Installing certificates...</source>
         <translation>Wurzelzertifikate werden geändert...</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1571"/>
+        <location filename="../mainwindow.cpp" line="1595"/>
         <source>Error!</source>
         <translation>Fehler!</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1571"/>
+        <location filename="../mainwindow.cpp" line="1595"/>
         <source>Failed to find the manual</source>
         <translation>Fehler beim Finden des Handbuchs</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1585"/>
+        <location filename="../mainwindow.cpp" line="1609"/>
         <source>TrustBridge error</source>
         <translation>TrustBridge Fehler</translation>
     </message>
@@ -728,22 +727,22 @@
         <translation>Automatische Aktualisierungsprüfung von TrustBridge.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1466"/>
+        <location filename="../mainwindow.cpp" line="1488"/>
         <source>Hide details</source>
         <translation>Details ausblenden</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1467"/>
+        <location filename="../mainwindow.cpp" line="1489"/>
         <source>Less</source>
         <translation>Weniger</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1472"/>
+        <location filename="../mainwindow.cpp" line="1494"/>
         <source>Show details</source>
         <translation>Details einblenden</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="1473"/>
+        <location filename="../mainwindow.cpp" line="1495"/>
         <source>Details</source>
         <translation>Details</translation>
     </message>
--- a/ui/mainwindow.cpp	Mon Sep 15 17:47:12 2014 +0200
+++ b/ui/mainwindow.cpp	Mon Sep 15 19:02:17 2014 +0200
@@ -93,8 +93,21 @@
 #define HELP_PATH "/../share/doc/trustbridge/index.html"
 #endif
 
+#define NEW_INSTALL_TT "Certificate will be installed."
+#define NOT_INSTALL_TT "Certificate will not be installed."
+#define NEW_REMOVE_TT "Certificate will be removed."
+#define NOT_REMOVE_TT "Certificate will not be removed."
+#define IS_INSTALLED_TT "Certificate is installed."
+#define IS_NOT_INSTALLED_TT "Certifcate is not installed."
+#define IS_REMOVED_TT "Certificate has been removed."
+#define IS_NOT_REMOVED_TT "Certificate has not been removed."
+
+static void activateDetailsButton(QPushButton *);
+static void deactivateDetailsButton(QPushButton *);
+
 MainWindow::MainWindow(bool trayMode):
-    mTrayMode(trayMode)
+    mTrayMode(trayMode),
+    mManualDetailsShown(false)
 {
     createActions();
     createTrayIcon();
@@ -1039,14 +1052,18 @@
 
     if (mUpdatesManual->certificates().size()) {
         mUpdatesDetailsManual->show();
-        mUpdatesDetailsManual->setIcon(QIcon(":/img/dialog-information_16px.png"));
-        mUpdatesDetailsManual->setToolTip(tr("Show details"));
+        if (mManualDetailsShown) {
+            mUpdatesManual->show();
+            deactivateDetailsButton(mUpdatesDetailsManual);
+        } else {
+            activateDetailsButton(mUpdatesDetailsManual);
+        }
     } else {
         mUpdatesDetailsManual->hide();
         mUpdatesManual->hide();
     }
     mUpdatesManualCertificates->setText("<h2>" +
-            tr("Manual changes (%1)").arg(mUpdatesManual->activeCertificates()) +
+            tr("Manual changes (%1)").arg(mUpdatesManual->certificates().size()) +
             "</h2>");
 
     if (mUpdatesNew->certificates().size()) {
@@ -1136,7 +1153,11 @@
                 if (!state) {
                     btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
                     btnIcon.addFile(":/img/security-low.png", QSize(48, 48), QIcon::Normal, QIcon::On);
+                    actionBtn->setProperty("ToolTip_Off", tr(NEW_INSTALL_TT));
+                    actionBtn->setProperty("ToolTip_On", tr(IS_NOT_INSTALLED_TT));
                 } else {
+                    actionBtn->setProperty("ToolTip_Off", tr(IS_INSTALLED_TT));
+                    actionBtn->setProperty("ToolTip_On", tr(NEW_REMOVE_TT));
                     btnIcon.addFile(":/img/security-high.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
                     btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
                 }
@@ -1147,12 +1168,15 @@
                 oldRemoveCerts.append(cert);
                 QToolButton* actionBtn = new QToolButton();
                 QIcon btnIcon;
+                actionBtn->setProperty("ToolTip_Off", tr(NEW_REMOVE_TT));
+                actionBtn->setProperty("ToolTip_On", tr(IS_NOT_REMOVED_TT));
                 btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
                 btnIcon.addFile(":/img/security-medium.png", QSize(48, 48), QIcon::Normal, QIcon::On);
                 btnIcon.addFile(":/img/trash-empty.png", QSize(48, 48), QIcon::Disabled, QIcon::Off);
                 actionBtn->setIcon(btnIcon);
                 if (state) {
                     actionBtn->setEnabled(false);
+                    actionBtn->setToolTip(tr(IS_REMOVED_TT));
                 }
                 mRemoveList->addCertificate(cert, state, actionBtn);
             }
@@ -1169,6 +1193,8 @@
                     oldInstallCerts.append(cert);
                     QToolButton* actionBtn = new QToolButton();
                     QIcon btnIcon;
+                    actionBtn->setProperty("ToolTip_Off", tr(IS_INSTALLED_TT));
+                    actionBtn->setProperty("ToolTip_On", tr(IS_NOT_INSTALLED_TT));
                     btnIcon.addFile(":/img/security-high.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
                     btnIcon.addFile(":/img/security-low.png", QSize(48, 48), QIcon::Normal, QIcon::On);
                     actionBtn->setIcon(btnIcon);
@@ -1179,6 +1205,8 @@
                     newInstallCerts.append(cert);
                     QToolButton* actionBtn = new QToolButton();
                     QIcon btnIcon;
+                    actionBtn->setProperty("ToolTip_Off", tr(NEW_INSTALL_TT));
+                    actionBtn->setProperty("ToolTip_On", tr(NOT_INSTALL_TT));
                     btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
                     btnIcon.addFile(":/img/security-low.png", QSize(48, 48), QIcon::Normal, QIcon::On);
                     actionBtn->setIcon(btnIcon);
@@ -1193,12 +1221,15 @@
                     // Is removed, so set editable to false.
                     QToolButton* actionBtn = new QToolButton();
                     QIcon btnIcon;
+                    actionBtn->setProperty("ToolTip_Off", tr(NEW_REMOVE_TT));
+                    actionBtn->setProperty("ToolTip_On", tr(IS_NOT_REMOVED_TT));
                     btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
                     btnIcon.addFile(":/img/security-medium.png", QSize(48, 48), QIcon::Normal, QIcon::On);
                     btnIcon.addFile(":/img/trash-empty.png", QSize(48, 48), QIcon::Disabled, QIcon::Off);
                     actionBtn->setIcon(btnIcon);
                     if (state) {
                         actionBtn->setEnabled(false);
+                        actionBtn->setToolTip(tr(IS_REMOVED_TT));
                     }
                     mRemoveList->addCertificate(cert, state, actionBtn);
                 }
@@ -1208,6 +1239,8 @@
                     newRemoveCerts.append(cert);
                     QToolButton* actionBtn = new QToolButton();
                     QIcon btnIcon;
+                    actionBtn->setProperty("ToolTip_Off", tr(NEW_REMOVE_TT));
+                    actionBtn->setProperty("ToolTip_On", tr(NOT_REMOVE_TT));
                     btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
                     btnIcon.addFile(":/img/security-medium.png", QSize(48, 48), QIcon::Normal, QIcon::On);
                     actionBtn->setIcon(btnIcon);
@@ -1382,13 +1415,10 @@
     if (!mUpdatesManual->contains(cert)) {
         QToolButton* actionBtn = new QToolButton();
         QIcon btnIcon;
-        if (cert.isInstallCert()) {
-            btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
-            btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
-        } else {
-            btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
-            btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
-        }
+        btnIcon.addFile(":/img/write-into-48.png", QSize(48, 48), QIcon::Normal, QIcon::On);
+        btnIcon.addFile(":/img/write-remove-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
+        actionBtn->setProperty("ToolTip_On", tr(NEW_INSTALL_TT));
+        actionBtn->setProperty("ToolTip_Off", tr(NEW_REMOVE_TT));
         actionBtn->setIcon(btnIcon);
         mUpdatesManual->addCertificate(cert, state, actionBtn);
     }
@@ -1491,10 +1521,12 @@
 void MainWindow::toggleUpdatesManual() {
     if (!mUpdatesManual->isVisible()) {
         mUpdatesManual->show();
+        mManualDetailsShown = true;
         deactivateDetailsButton(mUpdatesDetailsManual);
     }
     else {
         mUpdatesManual->hide();
+        mManualDetailsShown = false;
         activateDetailsButton(mUpdatesDetailsManual);
     }
 }
--- a/ui/mainwindow.h	Mon Sep 15 17:47:12 2014 +0200
+++ b/ui/mainwindow.h	Mon Sep 15 19:02:17 2014 +0200
@@ -289,6 +289,7 @@
 
     QPushButton *mInstallButton;
     int mChangeCount;
+    bool mManualDetailsShown;
 };
 
 #endif // MAINWINDOW_H

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