summaryrefslogtreecommitdiff
path: root/src/urlbar/sslwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-09 17:54:28 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-18 11:32:51 +0200
commitacad08fb9884541431030a851d587c25d7e9acf0 (patch)
treec6744e7733ee0c7a10eafda37c08383d688f30dd /src/urlbar/sslwidget.cpp
parentNew SSL Widget implementation (diff)
downloadrekonq-acad08fb9884541431030a851d587c25d7e9acf0.tar.xz
Improving SSL Widget and Dialog
While the widget "copies" and "rethink" Google Chrome actual one, the dialog has been implemented starting from the comparison between the ones we have in KDE, Google Chrome's and Firefox's. I have to start from somewhere...
Diffstat (limited to 'src/urlbar/sslwidget.cpp')
-rw-r--r--src/urlbar/sslwidget.cpp40
1 files changed, 37 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;
+ }
+
+}