summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 943f877d..3d76d35f 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -321,6 +321,9 @@ void MainWindow::postLaunch()
connect(m_view, SIGNAL(tabsChanged()), this, SLOT(updateActions()));
connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(updateActions()));
+ //Change window icon according to tab icon
+ connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(changeWindowIcon(int)));
+
// launch it manually. Just the first time...
updateActions();
@@ -350,6 +353,15 @@ QSize MainWindow::sizeHint() const
return size;
}
+void MainWindow::changeWindowIcon(int index)
+{
+ if (ReKonfig::useFavicon())
+ {
+ KUrl url = mainView()->webTab(index)->url();
+ QIcon icon = Application::iconManager()->iconForUrl(url).pixmap(QSize(32,32));
+ setWindowIcon(icon);
+ }
+}
void MainWindow::setupActions()
{
@@ -631,7 +643,6 @@ void MainWindow::setupPanels()
m_analyzerPanel->hide();
}
-
void MainWindow::openLocation()
{
if(isFullScreen())