diff options
| author | arnav dhamija <[email protected]> | 2016-09-26 22:25:42 +0530 |
|---|---|---|
| committer | arnav dhamija <[email protected]> | 2016-09-26 22:25:42 +0530 |
| commit | 2704b3693f86b31ac033597c63898c3aef16edf7 (patch) | |
| tree | d075a94f1652a8793cafed821f1f42996ea5186c /src/dolphinmainwindow.cpp | |
| parent | 67099640b90588af1c72c340756253400da3e95b (diff) | |
Added the GUI button for quick stashing
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 4d97fc1b1..db9c34c6a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -524,6 +524,12 @@ void DolphinMainWindow::toggleSplitView() updateViewActions(); } +void DolphinMainWindow::toggleSplitStash() +{ + DolphinTabPage* tabPage = m_tabWidget->currentTabPage(); + tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled(), true); +} + void DolphinMainWindow::reloadView() { clearStatusBar(); @@ -1040,6 +1046,13 @@ void DolphinMainWindow::setupActions() 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); @@ -1521,4 +1534,3 @@ void DolphinMainWindow::UndoUiInterface::jobError(KIO::Job* job) KIO::FileUndoManager::UiInterface::jobError(job); } } - |
