[PATCH 2 of 3] Added label for current and updated list date

Wald Commits scm-commit at wald.intevation.org
Wed Apr 23 14:00:57 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1398254410 -7200
# Node ID 37a97621b4667bb05f76533d3be25b0f36c8904e
# Parent  4204ae2753d9fe41b4d4fb9e82e86e7687f1dd32
Added label for current and updated list date.

diff -r 4204ae2753d9 -r 37a97621b466 ui/mainwindow.cpp
--- a/ui/mainwindow.cpp	Wed Apr 23 13:59:33 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Apr 23 14:00:10 2014 +0200
@@ -290,6 +290,7 @@
     QVBoxLayout *headerTextLayout = new QVBoxLayout;
     QHBoxLayout *bottomLayout = new QHBoxLayout;
     QVBoxLayout *settingsLayout = new QVBoxLayout;
+    QVBoxLayout *listInfoLayout = new QVBoxLayout;
 
     // The certificate list
     QGroupBox *certBox = new QGroupBox(tr("Managed Certificates"));
@@ -297,6 +298,13 @@
     connect(mCertListWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
         this, SLOT(showDetails(QListWidgetItem*)));
     certLayout->addWidget(mCertListWidget);
+
+    mCurrentListDate = new QLabel(tr("Current List Date: %1").arg(""));
+    mNewListDate = new QLabel("");
+    listInfoLayout->addWidget(mCurrentListDate);
+    listInfoLayout->addWidget(mNewListDate);
+    certLayout->addLayout(listInfoLayout);
+
     certBox->setLayout(certLayout);
 
     // The header (icon, about text)
@@ -411,6 +419,9 @@
                 oldRemoveCerts.append(cert);
             }
         }
+        // Set the date of the old list.
+        mCurrentListDate->setText(tr("Current List Date: %1")
+            .arg(mInstalledList.date().toString()));
     }
     else {
         // Sort and filter both lists.
@@ -439,6 +450,9 @@
                 }
             }
         }
+        mCurrentListDate->setText(tr("Current List Date: %1")
+            .arg(mInstalledList.date().toString()));
+        mNewListDate->setText(tr("New List Date: %1").arg(mListToInstall.date().toString()));
     }
 
     // Add separators and certificates to list widget.
diff -r 4204ae2753d9 -r 37a97621b466 ui/mainwindow.h
--- a/ui/mainwindow.h	Wed Apr 23 13:59:33 2014 +0200
+++ b/ui/mainwindow.h	Wed Apr 23 14:00:10 2014 +0200
@@ -178,6 +178,9 @@
     QLabel *mValidTo;
     QLabel *mFingerprint;
 
+    QLabel *mCurrentListDate;
+    QLabel *mNewListDate;
+
     QCheckBox *mAutoUpdateOption;
     QCheckBox *mAutoStartOption;
 


More information about the Trustbridge-commits mailing list