changeset 457:c17c1da7108d

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 23 Apr 2014 14:00:38 +0200
parents 37a97621b466 (diff) efd1bd85112f (current diff)
children 6fac87cadbd8
files
diffstat 3 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ui/certificatelist.h	Wed Apr 23 10:36:22 2014 +0000
+++ b/ui/certificatelist.h	Wed Apr 23 14:00:38 2014 +0200
@@ -60,6 +60,9 @@
     /* @brief get the absolute filename of the certificate */
     const QString& fileName() const {return mFileName;}
 
+    /* @brief get the list date. */
+    const QDateTime& date() const {return mDate;}
+
 private:
     QList<Certificate> mCertificates;
     QString mData;
--- a/ui/mainwindow.cpp	Wed Apr 23 10:36:22 2014 +0000
+++ b/ui/mainwindow.cpp	Wed Apr 23 14:00:38 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.
--- a/ui/mainwindow.h	Wed Apr 23 10:36:22 2014 +0000
+++ b/ui/mainwindow.h	Wed Apr 23 14:00:38 2014 +0200
@@ -178,6 +178,9 @@
     QLabel *mValidTo;
     QLabel *mFingerprint;
 
+    QLabel *mCurrentListDate;
+    QLabel *mNewListDate;
+
     QCheckBox *mAutoUpdateOption;
     QCheckBox *mAutoStartOption;
 

http://wald.intevation.org/projects/trustbridge/