[PATCH] (issue154) Do not force the details button to be active if a certificate changes
Wald Commits
scm-commit at wald.intevation.org
Mon Oct 13 14:21:30 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1413202887 -7200
# Node ID 135891f1c8f44ad11d70ffd41baa95b23021c185
# Parent 60e481aa75cafa9698337919d006ba4e1a8e2f82
(issue154) Do not force the details button to be active if a certificate changes
This reuses the activate function to reduce redundancy.
diff -r 60e481aa75ca -r 135891f1c8f4 ui/mainwindow.cpp
--- a/ui/mainwindow.cpp Mon Oct 13 14:13:05 2014 +0200
+++ b/ui/mainwindow.cpp Mon Oct 13 14:21:27 2014 +0200
@@ -1223,9 +1223,9 @@
.arg(mUpdatesNew->selectedCertCount())
.arg(mUpdatesNew->certificates().size()) +
"</h3>");
- mUpdatesDetailsNew->show();
- mUpdatesDetailsNew->setIcon(QIcon(":/img/dialog-information_16px.png"));
- mUpdatesDetailsNew->setToolTip(tr("Show details"));
+ if (!mUpdatesNew->isVisible()) {
+ activateDetailsButton(mUpdatesDetailsNew);
+ }
mUpdatesNewCertificates->show();
} else {
mUpdatesDetailsNew->hide();
@@ -1240,9 +1240,9 @@
.arg(mUpdatesRemove->certificates().size()) +
"</h3>");
mUpdatesRemoveCertificates->show();
- mUpdatesDetailsRemove->setIcon(QIcon(":/img/dialog-information_16px.png"));
- mUpdatesDetailsRemove->setToolTip(tr("Show details"));
- mUpdatesDetailsRemove->show();
+ if (!mUpdatesRemove->isVisible()) {
+ activateDetailsButton(mUpdatesDetailsRemove);
+ }
} else {
mUpdatesRemoveCertificates->hide();
mUpdatesDetailsRemove->hide();
@@ -1676,6 +1676,7 @@
btn->setToolTip(QObject::tr("Show details"));
btn->setText(" " + QObject::tr("Details"));
btn->setIcon(QIcon(":/img/dialog-information_16px.png"));
+ btn->show();
}
void MainWindow::toggleUpdatesNew() {
More information about the Trustbridge-commits
mailing list