┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-01-06 15:33:27 +0000
committerPeter Penz <[email protected]>2010-01-06 15:33:27 +0000
commit2c3fc5c93f2824d8cdebe3499dde6e9d748fb626 (patch)
tree392c593c608ada08539797ec05fcb15c70376253 /src/dolphinmainwindow.cpp
parent749fac334dcf56eecb8cc6dbfb1cc005804e3c7d (diff)
use correct icon when opening new tabs with the middle click
BUG: 212942 svn path=/trunk/KDE/kdebase/apps/; revision=1070717
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index e1cc13095..d9b534e3f 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -397,15 +397,17 @@ void DolphinMainWindow::openNewTab()
void DolphinMainWindow::openNewTab(const KUrl& url)
{
- const KIcon icon = KIcon(KMimeType::iconNameForUrl(m_activeViewContainer->url()));
if (m_viewTab.count() == 1) {
// Only one view is open currently and hence no tab is shown at
// all. Before creating a tab for 'url', provide a tab for the current URL.
- m_tabBar->addTab(icon, squeezedText(tabName(m_activeViewContainer->url())));
+ const KUrl currentUrl = m_activeViewContainer->url();
+ m_tabBar->addTab(KIcon(KMimeType::iconNameForUrl(currentUrl)),
+ squeezedText(tabName(currentUrl)));
m_tabBar->blockSignals(false);
}
- m_tabBar->addTab(icon, squeezedText(tabName(url)));
+ m_tabBar->addTab(KIcon(KMimeType::iconNameForUrl(url)),
+ squeezedText(tabName(url)));
ViewTab viewTab;
viewTab.splitter = new QSplitter(this);