diff options
-rw-r--r-- | src/newtabpage.cpp | 11 | ||||
-rw-r--r-- | src/newtabpage.h | 2 |
2 files changed, 13 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 diff --git a/src/newtabpage.h b/src/newtabpage.h index 482eb9ae..7a608deb 100644 --- a/src/newtabpage.h +++ b/src/newtabpage.h @@ -112,6 +112,8 @@ private: QString checkTitle(const QString &title); + void updateWindowIcon(); + private: QWebElement createLinkItem(const QString &title, const QString &urlString, const QString &iconPath, int groupOrSize) const; |