Merge branch 'release/21.08'

This commit is contained in:
Nate Graham 2021-09-28 13:57:14 -06:00
commit 0c44dfe2b1
3 changed files with 14 additions and 5 deletions

View file

@ -214,6 +214,9 @@ DolphinMainWindow::DolphinMainWindow() :
connect(&m_fileItemActions, &KFileItemActions::error, this, [this](const QString &errorMessage) {
showErrorMessage(errorMessage);
});
connect(GeneralSettings::self(), &GeneralSettings::splitViewChanged,
this, &DolphinMainWindow::slotSplitViewChanged);
}
DolphinMainWindow::~DolphinMainWindow()
@ -437,6 +440,12 @@ void DolphinMainWindow::openNewTab(const QUrl& url)
m_tabWidget->openNewTab(url, QUrl());
}
void DolphinMainWindow::slotSplitViewChanged()
{
m_tabWidget->currentTabPage()->setSplitViewEnabled(GeneralSettings::splitView(), WithAnimation);
updateSplitAction();
}
void DolphinMainWindow::openInNewTab()
{
const KFileItemList& list = m_activeViewContainer->view()->selectedItems();
@ -2101,11 +2110,6 @@ void DolphinMainWindow::refreshViews()
m_tabWidget->refreshViews();
if (GeneralSettings::modifiedStartupSettings()) {
// The startup settings have been changed by the user (see bug #254947).
// Synchronize the split-view setting with the active view:
const bool splitView = GeneralSettings::splitView();
m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView, WithAnimation);
updateSplitAction();
updateWindowTitle();
}

View file

@ -171,6 +171,9 @@ public Q_SLOTS:
*/
void openNewTab(const QUrl& url);
/** @see GeneralSettings::splitViewChanged() */
void slotSplitViewChanged();
Q_SIGNALS:
/**
* Is sent if the selection of the currently active view has

View file

@ -9,6 +9,7 @@
<include>KCompletion</include>
<kcfgfile name="dolphinrc"/>
<signal name="sortingChoiceChanged" />
<signal name="splitViewChanged" />
<group name="General">
<entry name="EditableUrl" type="Bool">
<label>Should the URL be editable for the user</label>
@ -49,6 +50,7 @@
<entry name="SplitView" type="Bool">
<label>Split the view into two panes</label>
<default>false</default>
<emit signal="splitViewChanged" />
</entry>
<entry name="FilterBar" type="Bool">
<label>Should the filter bar be shown</label>