diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-08 02:53:38 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-08 02:53:38 +0200 |
commit | 43dc2695d62fd2e4fc01aff608bb2af3e8335040 (patch) | |
tree | e854bca16452965d5e4d38bc1d36459bf723355f /src/webtab.cpp | |
parent | rekonq 0.4.59 (diff) | |
download | rekonq-43dc2695d62fd2e4fc01aff608bb2af3e8335040.tar.xz |
This is a really big commit, implementing the new urlbar
- removed previous SSL animation, we have now a nice yellow lock :)
- faster and cleaner animations
- reenabled the old stacked widget, to avoid stupid refreshes and fix some regressions
- implemented some "right icons": KGet, SSL, RSS. For now, just SSL is full featured
- clean up the box :) Some old & unuseful files removed, some icons added
- Pano's request: grey text shown everytime in the empty bar
Again and again:
this is not the first, but the second implementation of the new urlbar UI.
About me this is clearly better than the first or the previous.
But it needs love :D
BUG: 230125
BUG: 231015
CCBUG: 228040
BUG: 227272
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r-- | src/webtab.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp index b4e59d84..fd44cc10 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -49,6 +49,7 @@ #include <KActionMenu> #include <KWebView> #include <kwebwallet.h> +#include <KDE/KMessageBox> // Qt Includes #include <QContextMenuEvent> @@ -59,6 +60,9 @@ #include <QAction> #include <QVBoxLayout> +// Defines +#define QL1S(x) QLatin1String(x) + WebTab::WebTab(QWidget *parent) : QWidget(parent) @@ -171,3 +175,33 @@ void WebTab::createPreviewSelectorBar(int index) connect(page(), SIGNAL(loadFinished(bool)), bar, SLOT(loadFinished())); connect(page()->mainFrame(), SIGNAL(urlChanged(QUrl)), bar, SLOT(verifyUrl())); } + + +bool WebTab::hasRSSInfo() +{ + _rssList.clear(); + QWebElementCollection col = page()->mainFrame()->findAllElements("link"); + foreach(QWebElement el, col) + { + if( el.attribute("type") == QL1S("application/rss+xml") || el.attribute("type") == QL1S("application/rss+xml") ) + _rssList << KUrl( el.attribute("href") ); + } + + return !_rssList.isEmpty(); +} + + +void WebTab::showRSSInfo() +{ + QString urlList = QString("Here are the rss link found: <br /><br />"); + foreach(const KUrl &url, _rssList) + { + urlList += QString("<a href=\"") + url.url() + QString("\">") + url.url() + QString("</a><br />"); + } + urlList += QString("<br />Enough for now.. waiting for some cool akonadi based feeds management :)"); + + KMessageBox::information( view(), + urlList, + "RSS Management" + ); +} |