mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
The tab icon now obeys the icon of the folder that it is currently browsing. Before it would just use the "folder" icon, but it now finds the icon of that folder, and uses it.
BUG: 182702 svn path=/trunk/KDE/kdebase/apps/; revision=937595
This commit is contained in:
parent
0945eb5bc2
commit
f320652966
|
@ -237,6 +237,8 @@ void DolphinMainWindow::changeUrl(const KUrl& url)
|
||||||
if (m_viewTab.count() > 1) {
|
if (m_viewTab.count() > 1) {
|
||||||
m_tabBar->setTabText(m_tabIndex, tabName(url));
|
m_tabBar->setTabText(m_tabIndex, tabName(url));
|
||||||
}
|
}
|
||||||
|
const QString iconName = KMimeType::iconNameForUrl(url);
|
||||||
|
m_tabBar->setTabIcon(m_tabIndex, KIcon(iconName));
|
||||||
emit urlChanged(url);
|
emit urlChanged(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,14 +333,15 @@ void DolphinMainWindow::openNewTab()
|
||||||
|
|
||||||
void DolphinMainWindow::openNewTab(const KUrl& url)
|
void DolphinMainWindow::openNewTab(const KUrl& url)
|
||||||
{
|
{
|
||||||
|
const KIcon icon = KIcon(KMimeType::iconNameForUrl(m_activeViewContainer->url()));
|
||||||
if (m_viewTab.count() == 1) {
|
if (m_viewTab.count() == 1) {
|
||||||
// Only one view is open currently and hence no tab is shown at
|
// 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.
|
// all. Before creating a tab for 'url', provide a tab for the current URL.
|
||||||
m_tabBar->addTab(KIcon("folder"), tabName(m_activeViewContainer->url()));
|
m_tabBar->addTab(icon, tabName(m_activeViewContainer->url()));
|
||||||
m_tabBar->blockSignals(false);
|
m_tabBar->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_tabBar->addTab(KIcon("folder"), tabName(url));
|
m_tabBar->addTab(icon, tabName(url));
|
||||||
|
|
||||||
ViewTab viewTab;
|
ViewTab viewTab;
|
||||||
viewTab.splitter = new QSplitter(this);
|
viewTab.splitter = new QSplitter(this);
|
||||||
|
|
Loading…
Reference in a new issue