diff options
| author | Peter Penz <[email protected]> | 2010-01-06 15:33:27 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-01-06 15:33:27 +0000 |
| commit | 2c3fc5c93f2824d8cdebe3499dde6e9d748fb626 (patch) | |
| tree | 392c593c608ada08539797ec05fcb15c70376253 /src | |
| parent | 749fac334dcf56eecb8cc6dbfb1cc005804e3c7d (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')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 8 |
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); |
