summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp15
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()
{