updateViewActions();
}
+void DolphinMainWindow::toggleSplitStash()
+{
+ DolphinTabPage* tabPage = m_tabWidget->currentTabPage();
+ tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled(), true);
+}
+
void DolphinMainWindow::reloadView()
{
clearStatusBar();
actionCollection()->setDefaultShortcut(split, Qt::Key_F3);
connect(split, &QAction::triggered, this, &DolphinMainWindow::toggleSplitView);
+ QAction* stashSplit = actionCollection()->addAction(QStringLiteral("split_stash"));
+ actionCollection()->setDefaultShortcut(stashSplit, Qt::Key_F2);
+ stashSplit->setText(i18nc("@action:intoolbar Stash", "Stash"));
+ stashSplit->setToolTip(i18nc("@info", "Opens the stash virtual directory in a split window"));
+ stashSplit->setCheckable(true);
+ connect(stashSplit, &QAction::triggered, this, &DolphinMainWindow::toggleSplitStash);
+
QAction* reload = actionCollection()->addAction(QStringLiteral("reload"));
reload->setText(i18nc("@action:inmenu View", "Reload"));
actionCollection()->setDefaultShortcut(reload, Qt::Key_F5);
KIO::FileUndoManager::UiInterface::jobError(job);
}
}
-
*/
void toggleSplitView();
+ void toggleSplitStash();
+
/** Reloads the currently active view. */
void reloadView();
}
#endif // DOLPHIN_MAINWINDOW_H
-
return m_splitViewEnabled;
}
-void DolphinTabPage::setSplitViewEnabled(bool enabled)
+void DolphinTabPage::setSplitViewEnabled(bool enabled, bool stash /*= false*/)
{
if (m_splitViewEnabled != enabled) {
m_splitViewEnabled = enabled;
-
+ QUrl url;
if (enabled) {
- const QUrl& url = m_primaryViewContainer->url();
+ if (stash) {
+ url = QUrl("stash:/");
+ } else {
+ url = m_primaryViewContainer->url();
+ }
m_secondaryViewContainer = createViewContainer(url);
const bool placesSelectorVisible = m_primaryViewContainer->urlNavigator()->isPlacesSelectorVisible();
*
* If \a enabled is true, it creates a secondary view with the url of the primary view.
*/
- void setSplitViewEnabled(bool enabled);
+ void setSplitViewEnabled(bool enabled, bool stash = false);
/**
* @return The primary view containter.
<Action name="show_hidden_files" />
<Separator/>
<Action name="split_view" />
+ <Action name="split_stash" />
<Action name="reload" />
<Action name="stop" />
<Separator/>
<Action name="edit_find"/>
<Action name="show_preview" />
<Action name="split_view" />
+ <Action name="split_stash" />
</ToolBar>
<ActionProperties scheme="Default">
<Action priority="0" name="go_back"/>