Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 717:77c9c2dfc8ac
(Issue26) Hide update lists if no updates are available
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 02 Jul 2014 16:15:52 +0200 |
parents | 929c3db85eb7 |
children | e7a070e64b80 |
comparison
equal
deleted
inserted
replaced
716:929c3db85eb7 | 717:77c9c2dfc8ac |
---|---|
851 mUpdatesHeader->setText("<h2>" + tr("Changes to certificate stores (%1)") | 851 mUpdatesHeader->setText("<h2>" + tr("Changes to certificate stores (%1)") |
852 .arg(changeCount()) + | 852 .arg(changeCount()) + |
853 "</h2>"); | 853 "</h2>"); |
854 } | 854 } |
855 | 855 |
856 mUpdatesNewCertificates->setText("<h3>" + | 856 if (mUpdatesNew->certificates().size()) { |
857 tr("Install new trusted certificates (%1/%2)") | 857 mUpdatesNewCertificates->setText("<h3>" + |
858 .arg(mUpdatesNew->selectedCertCount()) | 858 tr("Install new trusted certificates (%1/%2)") |
859 .arg(mUpdatesNew->certificates().size()) + | 859 .arg(mUpdatesNew->selectedCertCount()) |
860 "</h3>"); | 860 .arg(mUpdatesNew->certificates().size()) + |
861 mUpdatesRemoveCertificates->setText("<h3>" + | 861 "</h3>"); |
862 tr("Remove revoked certificates (%1/%2)") | 862 mUpdatesDetailsNew->show(); |
863 .arg(mUpdatesRemove->selectedCertCount()) | 863 mUpdatesNewCertificates->show(); |
864 .arg(mUpdatesRemove->certificates().size()) + | 864 } else { |
865 "</h3>"); | 865 mUpdatesDetailsNew->hide(); |
866 mUpdatesNewCertificates->hide(); | |
867 } | |
868 | |
869 if (mUpdatesRemove->certificates().size()) { | |
870 mUpdatesRemoveCertificates->setText("<h3>" + | |
871 tr("Remove revoked certificates (%1/%2)") | |
872 .arg(mUpdatesRemove->selectedCertCount()) | |
873 .arg(mUpdatesRemove->certificates().size()) + | |
874 "</h3>"); | |
875 mUpdatesRemoveCertificates->show(); | |
876 mUpdatesDetailsRemove->show(); | |
877 } else { | |
878 mUpdatesRemoveCertificates->hide(); | |
879 mUpdatesDetailsRemove->hide(); | |
880 } | |
866 } | 881 } |
867 | 882 |
868 void MainWindow::loadCertificateList() | 883 void MainWindow::loadCertificateList() |
869 { | 884 { |
870 /* TODO: if nothing is available (neither old nor new) add some progress | 885 /* TODO: if nothing is available (neither old nor new) add some progress |