summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorFurkan Uzumcu <furkanuzumcu@gmail.com>2011-02-05 19:02:24 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-02-05 19:02:24 +0100
commita77d9a208119224a9793e676a6263eed49356ac9 (patch)
tree83a590c74be39bf0b0ced4ac1a88cc5d102212ff /src/mainwindow.cpp
parentfixuifiles (diff)
downloadrekonq-a77d9a208119224a9793e676a6263eed49356ac9.tar.xz
Added an option to show current website favicon as rekonq window icon
Reviewed by adjam
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())