}
}
- QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName();
- if (fileName.isEmpty()) {
- fileName = '/';
+ if (GeneralSettings::showFullPathInTitlebar()) {
+ const QString path = url.adjusted(QUrl::StripTrailingSlash).path();
+ caption.append(path);
+ } else {
+ QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName();
+ if (fileName.isEmpty()) {
+ fileName = '/';
+ }
+ caption.append(fileName);
}
- caption.append(fileName);
-
setWindowTitle(caption);
}
const bool splitView = GeneralSettings::splitView();
m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView);
updateSplitAction();
+ setUrlAsCaption(activeViewContainer()->url());
}
emit settingsChanged();
<label>Should the full path be shown inside the location bar</label>
<default>false</default>
</entry>
+ <entry name="ShowFullPathInTitlebar" type="Bool">
+ <label>Should the full path be shown in the title bar</label>
+ <default>false</default>
+ </entry>
<entry name="Version" type="Int">
<label>Internal version of Dolphin, containing 3 digits for major, minor, bugfix</label>
<default>0</default>
m_splitView(0),
m_editableUrl(0),
m_showFullPath(0),
- m_filterBar(0)
+ m_filterBar(0),
+ m_showFullPathInTitlebar(0)
{
QVBoxLayout* topLayout = new QVBoxLayout(this);
QWidget* vBox = new QWidget(this);
vBoxLayout->addWidget(m_showFullPath);
m_filterBar = new QCheckBox(i18nc("@option:check Startup Settings", "Show filter bar"), vBox);
vBoxLayout->addWidget(m_filterBar);
+ m_showFullPathInTitlebar = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path in title bar"), vBox);
+ vBoxLayout->addWidget(m_showFullPathInTitlebar);
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
connect(m_editableUrl, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
connect(m_showFullPath, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
connect(m_filterBar, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
+ connect(m_showFullPathInTitlebar, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
}
StartupSettingsPage::~StartupSettingsPage()
settings->setEditableUrl(m_editableUrl->isChecked());
settings->setShowFullPath(m_showFullPath->isChecked());
settings->setFilterBar(m_filterBar->isChecked());
+ settings->setShowFullPathInTitlebar(m_showFullPathInTitlebar->isChecked());
settings->save();
}
m_editableUrl->setChecked(GeneralSettings::editableUrl());
m_showFullPath->setChecked(GeneralSettings::showFullPath());
m_filterBar->setChecked(GeneralSettings::filterBar());
+ m_showFullPathInTitlebar->setChecked(GeneralSettings::showFullPathInTitlebar());
}