diff options
Diffstat (limited to 'src/tabwindow')
-rw-r--r-- | src/tabwindow/tabwindow.cpp | 33 | ||||
-rw-r--r-- | src/tabwindow/tabwindow.h | 1 |
2 files changed, 19 insertions, 15 deletions
diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp index a211f63e..9e2a17ce 100644 --- a/src/tabwindow/tabwindow.cpp +++ b/src/tabwindow/tabwindow.cpp @@ -139,7 +139,6 @@ WebWindow *TabWindow::prepareNewTab(WebPage *page) connect(tab, SIGNAL(titleChanged(QString)), this, SLOT(tabTitleChanged(QString))); connect(tab, SIGNAL(loadStarted()), this, SLOT(tabLoadStarted())); - connect(tab, SIGNAL(loadProgress(int)), this, SLOT(tabLoadProgress(int))); connect(tab, SIGNAL(loadFinished(bool)), this, SLOT(tabLoadFinished(bool))); connect(tab, SIGNAL(pageCreated(WebPage *)), this, SLOT(pageCreated(WebPage *))); @@ -192,6 +191,14 @@ void TabWindow::currentChanged(int newIndex) _openedTabsCounter = 0; tabBar()->setTabHighlighted(newIndex, false); + + // update window title & icon + WebWindow* tab = webWindow(newIndex); + if (!tab) + return; + + setWindowTitle(tab->title() + QLatin1String(" - rekonq")); + setWindowIcon(tab->icon()); } @@ -251,8 +258,12 @@ void TabWindow::tabTitleChanged(const QString &title) if (tabTitle != i18n("(Untitled)")) tabBar()->setTabHighlighted(index, true); } + else + { + setWindowTitle(title + QLatin1String(" - rekonq")); + } - // TODO: What about window title? + // TODO: What about window title? Is this enough? } @@ -286,18 +297,6 @@ void TabWindow::tabLoadStarted() } -void TabWindow::tabLoadProgress(int p) -{ - // FIXME: is this needed? - WebWindow *tab = qobject_cast<WebWindow *>(sender()); - if (!tab) - return; - - int index = indexOf(tab); - kDebug() << "LOADING TAB: " << index << ", PROGRESS: " << p; -} - - void TabWindow::tabLoadFinished(bool ok) { Q_UNUSED(ok); @@ -319,6 +318,12 @@ void TabWindow::tabLoadFinished(bool ok) label->setMovie(0); label->setPixmap(tab->icon().pixmap(16, 16)); } + + if (currentIndex() == index) + { + setWindowIcon(tab->icon()); + } + } diff --git a/src/tabwindow/tabwindow.h b/src/tabwindow/tabwindow.h index 65746fe7..f8cb759f 100644 --- a/src/tabwindow/tabwindow.h +++ b/src/tabwindow/tabwindow.h @@ -70,7 +70,6 @@ private Q_SLOTS: void tabTitleChanged(const QString &); void tabLoadStarted(); - void tabLoadProgress(int); void tabLoadFinished(bool); void pageCreated(WebPage *); |