Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 703:2c63bb63de76
(Issue26) Only show manually changed certificates if there are manually changed certificates
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 02 Jul 2014 11:49:39 +0200 |
parents | 9dea3d895f53 |
children | bd48fae793b6 |
comparison
equal
deleted
inserted
replaced
702:9dea3d895f53 | 703:2c63bb63de76 |
---|---|
623 mUpdatesDetailsManual = new QPushButton(tr("Show details")); | 623 mUpdatesDetailsManual = new QPushButton(tr("Show details")); |
624 connect(mUpdatesDetailsManual, | 624 connect(mUpdatesDetailsManual, |
625 SIGNAL(clicked()), | 625 SIGNAL(clicked()), |
626 this, | 626 this, |
627 SLOT(toggleUpdatesManual())); | 627 SLOT(toggleUpdatesManual())); |
628 mUpdatesDetailsManual->hide(); | |
629 mUpdatesManualCertificates->hide(); | |
628 updatesManualLayout->addWidget(mUpdatesManualCertificates); | 630 updatesManualLayout->addWidget(mUpdatesManualCertificates); |
629 updatesManualLayout->addWidget(mUpdatesDetailsManual); | 631 updatesManualLayout->addWidget(mUpdatesDetailsManual); |
630 updatesManualLayout->insertStretch(2, 10); | 632 updatesManualLayout->insertStretch(2, 10); |
631 mUpdatesManual = new CertificateListWidget(this); | 633 mUpdatesManual = new CertificateListWidget(this); |
632 mUpdatesManual->hide(); | 634 mUpdatesManual->hide(); |
812 | 814 |
813 void MainWindow::listChanged(int selected) | 815 void MainWindow::listChanged(int selected) |
814 { | 816 { |
815 int totalCount = mUpdatesRemove->selectedCertCount() + | 817 int totalCount = mUpdatesRemove->selectedCertCount() + |
816 mUpdatesNew->selectedCertCount() + mUpdatesManual->certificates().size(); | 818 mUpdatesNew->selectedCertCount() + mUpdatesManual->certificates().size(); |
819 | |
820 if (mUpdatesManual->certificates().size()) { | |
821 mUpdatesDetailsManual->show(); | |
822 mUpdatesManualCertificates->show(); | |
823 } else { | |
824 mUpdatesDetailsManual->hide(); | |
825 mUpdatesManualCertificates->hide(); | |
826 } | |
817 | 827 |
818 if (!totalCount) { | 828 if (!totalCount) { |
819 /* No changes */ | 829 /* No changes */ |
820 mQuitButton->setText(" " + tr("Quit")); | 830 mQuitButton->setText(" " + tr("Quit")); |
821 mUpdatesHeader->setText("<h2>" + tr("Certificates unchanged") + | 831 mUpdatesHeader->setText("<h2>" + tr("Certificates unchanged") + |