diff options
author | Furkan Uzumcu <furkanuzumcu@gmail.com> | 2011-02-05 19:02:24 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-02-05 19:02:24 +0100 |
commit | a77d9a208119224a9793e676a6263eed49356ac9 (patch) | |
tree | 83a590c74be39bf0b0ced4ac1a88cc5d102212ff /src/webview.cpp | |
parent | fixuifiles (diff) | |
download | rekonq-a77d9a208119224a9793e676a6263eed49356ac9.tar.xz |
Added an option to show current website favicon as rekonq window icon
Reviewed by adjam
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index d3eb2f49..b41f1bd3 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -43,6 +43,7 @@ #include "urlbar.h" #include "webpage.h" #include "websnap.h" +#include "webtab.h" // KDE Includes #include <KAction> @@ -111,6 +112,8 @@ WebView::WebView(QWidget* parent) // Smooth scroll timer connect(m_smoothScrollTimer, SIGNAL(timeout()), this, SLOT(scrollTick())); m_smoothScrollTimer->setInterval(16); + + connect(this, SIGNAL(iconChanged()), this, SLOT(changeWindowIcon())); } @@ -127,6 +130,18 @@ WebView::~WebView() preview.save(path); } +void WebView::changeWindowIcon() +{ + if (ReKonfig::useFavicon()) + { + MainWindow *const mainWindow = Application::instance()->mainWindow(); + if (url() == mainWindow->currentTab()->url()) + { + const int index = mainWindow->mainView()->currentIndex(); + mainWindow->changeWindowIcon(index); + } + } +} WebPage *WebView::page() { |