summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/sslwidget.cpp40
-rw-r--r--src/urlbar/sslwidget.h5
2 files changed, 42 insertions, 3 deletions
diff --git a/src/urlbar/sslwidget.cpp b/src/urlbar/sslwidget.cpp
index 79194c6f..40532cb3 100644
--- a/src/urlbar/sslwidget.cpp
+++ b/src/urlbar/sslwidget.cpp
@@ -31,6 +31,7 @@
// Local includes
#include "application.h"
#include "historymanager.h"
+#include "sslinfodialog.h"
// KDE Includes
@@ -43,6 +44,8 @@
SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
: QMenu(parent)
+ , m_url(url)
+ , m_info(info)
{
setAttribute(Qt::WA_DeleteOnClose);
setMinimumWidth(400);
@@ -54,8 +57,9 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
QLabel *label;
+ // ------------------------------------------------------------------------------------------------------------------
label = new QLabel(this);
- label->setText( QL1S("<h4>") + url.host() + QL1S("</h4>") );
+ label->setText( i18n("<h4>Identity</h4>") );
layout->addRow(label);
if (firstCA.isNull())
@@ -81,7 +85,13 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
}
label = new QLabel(this);
- label->setText( QL1S("<hr /><h4>") + i18n("Issued to") + QL1S("</h4>") ); // ----------------------------------------------- //
+ label->setText("<a href=\"moresslinfos\">Certificate Information</a>");
+ connect(label, SIGNAL(linkActivated(const QString &)), this, SLOT(showMoreSslInfos(const QString &)));
+ layout->addRow(label);
+
+ // ------------------------------------------------------------------------------------------------------------------
+ label = new QLabel(this);
+ label->setText( QL1S("<hr /><h4>Encryption</h4>") ); // ----------------------------------------------- //
layout->addRow(label);
label = new QLabel(this);
@@ -145,7 +155,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
// ------------------------------------------------------------------------------------------------------------------
label = new QLabel(this);
- label->setText( QL1S("<hr /><h4>") + i18n("Site Information") + QL1S("</h4>") );
+ label->setText( i18n("<hr /><h4>Site Information</h4>") );
layout->addRow(label);
label = new QLabel(this);
@@ -180,3 +190,27 @@ void SSLWidget::accept()
close();
}
+
+
+void SSLWidget::showMoreSslInfos(const QString &)
+{
+ // FIXME: show it every time???
+ if (m_info.isValid())
+ {
+ QPointer<SslInfoDialog> dlg = new SslInfoDialog(m_url.host(), m_info, this);
+// dlg->setSslInfo(m_info.certificateChain(),
+// m_info.peerAddress().toString(),
+// m_host,
+// m_info.protocol(),
+// m_info.ciphers(),
+// m_info.usedChiperBits(),
+// m_info.supportedChiperBits()
+// );
+
+ dlg->exec();
+ delete dlg;
+
+ return;
+ }
+
+}
diff --git a/src/urlbar/sslwidget.h b/src/urlbar/sslwidget.h
index 4e36d364..00478f59 100644
--- a/src/urlbar/sslwidget.h
+++ b/src/urlbar/sslwidget.h
@@ -46,7 +46,12 @@ public:
void showAt(const QPoint &pos);
private Q_SLOTS:
+ void showMoreSslInfos(const QString &);
void accept();
+
+private:
+ QUrl m_url;
+ WebSslInfo m_info;
};
#endif // SSL_WIDGET_H