From 352168759ea96b35296eaf33790fbe073b69f69b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 5 Apr 2010 01:31:13 +0200 Subject: This commit is the first implementation of a new new new urlbar Here are its features: - KLineEdit based - ability to easily add "icons" :) - SSL informations shown (a-la firefox) - smoother animation - cleaner code - data QString, not KUrl based (Users type string, not urls!!!) --- src/webpage.cpp | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/webpage.cpp') diff --git a/src/webpage.cpp b/src/webpage.cpp index 71cc8be4..8dc0ef96 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -304,18 +304,9 @@ void WebPage::loadFinished(bool) { wallet()->fillFormData(mainFrame()); } - - // TODO: implement me! - if(_sslInfo.isValid()) - { - // show an icon in the urlbar - kDebug() << "----------------- SSL VALID INFO!!!! ------------------"; - } - else - { - // hide the icon in the urlbar - kDebug() << "----------------- SSL INFO NOT VALID... ------------------"; - } + + if( mainFrame()->url().scheme() == QL1S("https") ) + emit validSSLInfo( _sslInfo.isValid() ); } @@ -538,13 +529,23 @@ void WebPage::showSSLInfo() KSslInfoDialog::errorsFromString( _sslInfo.certificateErrors() ) ); - dlg->open(); + dlg->exec(); delete dlg; - } - else + + return; + } + + if( mainFrame()->url().scheme() == QL1S("https") ) + { + KMessageBox::error( view(), + i18n("The SSL information for this site appears to be corrupt."), + i18nc("Secure Sockets Layer", "SSL") + ); + } + else { - KMessageBox::information( 0, - i18n("The SSL information for this site appears to be corrupt."), + KMessageBox::information( view(), + i18n("This site doesn't contain SSL information."), i18nc("Secure Sockets Layer", "SSL") ); } -- cgit v1.2.1