summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
authorFurkan Uzumcu <furkanuzumcu@gmail.com>2011-08-21 18:25:14 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-08-21 18:25:14 +0200
commit5f099967b0c7b25684fa2f0704ee1a81d712bbaa (patch)
treee49f779bbacc7bf202be61b7c7d185ccf27725ec /src/newtabpage.cpp
parentFix vi-like navigation shortcuts (diff)
downloadrekonq-5f099967b0c7b25684fa2f0704ee1a81d712bbaa.tar.xz
Fix icon update
When "use the favicon of the current web site as the window icon" option is enabled, the window icon used to have problems changing on new tab page. Wrong icons or no icon. This patch fixes this problem. REVIEW: 102310 REVIEWED-BY: adjam
Diffstat (limited to 'src/newtabpage.cpp')
-rw-r--r--src/newtabpage.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index 761bccd8..f1cddc5e 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -135,26 +135,31 @@ void NewTabPage::generate(const KUrl &url)
if (encodedUrl == QByteArray("about:favorites"))
{
favoritesPage();
+ updateWindowIcon();
title = i18n("Favorites");
}
else if (encodedUrl == QByteArray("about:closedTabs"))
{
closedTabsPage();
+ updateWindowIcon();
title = i18n("Closed Tabs");
}
else if (encodedUrl == QByteArray("about:history"))
{
historyPage();
+ updateWindowIcon();
title = i18n("History");
}
else if (encodedUrl == QByteArray("about:bookmarks"))
{
bookmarksPage();
+ updateWindowIcon();
title = i18n("Bookmarks");
}
else if (encodedUrl == QByteArray("about:downloads"))
{
downloadsPage();
+ updateWindowIcon();
title = i18n("Downloads");
}
@@ -619,3 +624,9 @@ QWebElement NewTabPage::createLinkItem(const QString &title, const QString &urlS
nav.findFirst(QL1S("span")).appendInside(title);
return nav;
}
+
+void NewTabPage::updateWindowIcon()
+{
+ int currentIndex = rApp->mainWindow()->mainView()->currentIndex();
+ rApp->mainWindow()->changeWindowIcon(currentIndex);
+} \ No newline at end of file