diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-15 01:06:24 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-15 01:06:24 +0200 |
commit | e6c2fe7c54225f14bda5f7f0305f20bfc96516ea (patch) | |
tree | f6ee94cceb85a25e58214b9b7f2ad0a2adc941d6 /src/mainview.cpp | |
parent | cleaning code... (diff) | |
parent | little fix again.. (diff) | |
download | rekonq-e6c2fe7c54225f14bda5f7f0305f20bfc96516ea.tar.xz |
Merge branch 'Button02'
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index ba7b720e..a0b0c6e7 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -131,7 +131,7 @@ int MainView::webViewIndex(WebView *webView) const } -void MainView::showTabBar() +void MainView::updateTabBar() { if (ReKonfig::alwaysShowTabBar()) { @@ -139,6 +139,7 @@ void MainView::showTabBar() { m_tabBar->show(); } + m_tabBar->updateNewTabButton(); } else { @@ -152,6 +153,7 @@ void MainView::showTabBar() { m_tabBar->show(); } + m_tabBar->updateNewTabButton(); } } } @@ -283,15 +285,15 @@ WebView *MainView::newWebView(bool focused, bool nearParent) insertTab(currentIndex() + 1, webView, i18n("(Untitled)")); else addTab(webView, i18n("(Untitled)")); - + + updateTabBar(); + if (focused) { setCurrentWidget(webView); } emit tabsChanged(); - - showTabBar(); return webView; } @@ -369,7 +371,7 @@ void MainView::slotCloseOtherTabs(int index) slotCloseTab(i); } - showTabBar(); + updateTabBar(); } @@ -383,7 +385,7 @@ void MainView::slotCloneTab(int index) WebView *tab = newWebView(); tab->setUrl(webView(index)->url()); - showTabBar(); + updateTabBar(); } @@ -418,6 +420,7 @@ void MainView::slotCloseTab(int index) QWidget *webView = widget(index); removeTab(index); + updateTabBar(); // UI operation: do it ASAP!! webView->deleteLater(); // webView is scheduled for deletion. emit tabsChanged(); @@ -426,8 +429,6 @@ void MainView::slotCloseTab(int index) { currentWebView()->setFocus(); } - - showTabBar(); } @@ -578,3 +579,10 @@ KUrl::List MainView::recentlyClosedTabs() { return m_recentlyClosedTabs; } + + +void MainView::resizeEvent(QResizeEvent *event) +{ + updateTabBar(); + KTabWidget::resizeEvent(event); +}
\ No newline at end of file |