Mercurial > trustbridge
changeset 696:55f78c4166fb
(Issue32) Change Updates to Changes and track changes.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 01 Jul 2014 17:20:07 +0200 |
parents | 0f4c480c41f4 |
children | a45682b5ff7e |
files | ui/mainwindow.cpp |
diffstat | 1 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/mainwindow.cpp Tue Jul 01 17:19:02 2014 +0200 +++ b/ui/mainwindow.cpp Tue Jul 01 17:20:07 2014 +0200 @@ -462,7 +462,7 @@ updatesButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); updatesButton->setIcon(QIcon(":/img/view-refresh.png")); updatesButton->setIconSize(QSize(40, 40)); - updatesButton->setText(tr("Updates")); + updatesButton->setText(tr("Changes")); updatesButton->setFixedWidth(120); updatesButton->setFixedHeight(80); updatesButton->setCheckable(true); @@ -533,13 +533,14 @@ QHBoxLayout *updatesHeaderSearchLayout = new QHBoxLayout; mUpdatesHeader = - new QLabel("<h2>" + tr("Updates (%1/%2)").arg(0).arg(0)+ "</h2>"); + new QLabel("<h2>" + tr("Certificates unchanged")+ "</h2>"); mLastCertUpdate = new QLabel(tr("Last update of certificates: %1").arg("")); mLastSWupdate = new QLabel(tr("Last update of TrustBridge: %1").arg("")); QLabel *updatesTip = new QLabel(tr("You should apply the following changes to your root certificates:")); + updatesTip->setWordWrap(true); updatesHeaderTextLayout->addWidget(mUpdatesHeader); updatesHeaderTextLayout->addWidget(mLastCertUpdate); @@ -551,7 +552,7 @@ searchUpdates->setIcon(QIcon(":/img/edit-find.png")); mQuitButton = new QPushButton(tr("Quit without saving")); mQuitButton->setIcon(QIcon(":/img/application-exit.png")); - QPushButton *installButton = new QPushButton(tr("Install updates")); + QPushButton *installButton = new QPushButton(tr("Apply changes")); #ifdef Q_OS_WIN if (is_admin()) { QIcon uacShield = QApplication::style()->standardIcon(QStyle::SP_VistaShield); @@ -811,19 +812,21 @@ void MainWindow::listChanged(int selected) { - if (mUpdatesRemove->selectedCertCount() + - mUpdatesNew->selectedCertCount() + - mUpdatesManual->selectedCertCount() == 0) { + int totalCount = mUpdatesRemove->selectedCertCount() + + mUpdatesNew->selectedCertCount() + mUpdatesManual->certificates().size(); + + if (!totalCount) { /* No changes */ mQuitButton->setText(tr("Quit")); + mUpdatesHeader->setText("<h2>" + tr("Certificates unchanged") + + "</h2>"); } else { mQuitButton->setText(tr("Quit without saving")); + mUpdatesHeader->setText("<h2>" + tr("Changes (%1)") + .arg(totalCount) + + "</h2>"); } - mUpdatesHeader->setText("<h2>" + tr("Updates (%1/%2)") - .arg(mUpdatesRemove->selectedCertCount() + mUpdatesNew->selectedCertCount()) - .arg(mUpdatesRemove->certificates().size() + mUpdatesNew->certificates().size()) + - "</h2>"); mUpdatesNewCertificates->setText("<h3>" + tr("Install new trusted certificates (%1/%2)") .arg(mUpdatesNew->selectedCertCount())