From 2704b3693f86b31ac033597c63898c3aef16edf7 Mon Sep 17 00:00:00 2001 From: arnav dhamija Date: Mon, 26 Sep 2016 22:25:42 +0530 Subject: Added the GUI button for quick stashing --- src/dolphintabpage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dolphintabpage.h') diff --git a/src/dolphintabpage.h b/src/dolphintabpage.h index 9d180883a..d14574561 100644 --- a/src/dolphintabpage.h +++ b/src/dolphintabpage.h @@ -50,7 +50,7 @@ public: * * 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. -- cgit v1.3 From e7f6a1010ac07dfddaaa75a372dbeaa6d0352731 Mon Sep 17 00:00:00 2001 From: arnav dhamija Date: Wed, 2 Nov 2016 21:49:11 +0530 Subject: Changed default arg for the setSplitViewEnabled --- src/dolphinmainwindow.cpp | 2 +- src/dolphintabpage.cpp | 4 ++-- src/dolphintabpage.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/dolphintabpage.h') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 687b30698..9817bf08a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -527,7 +527,7 @@ void DolphinMainWindow::toggleSplitView() void DolphinMainWindow::toggleSplitStash() { DolphinTabPage* tabPage = m_tabWidget->currentTabPage(); - tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled(), true); + tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled(), QUrl("stash:/")); } void DolphinMainWindow::reloadView() diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 3491dbad8..9d239fdfc 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -71,13 +71,13 @@ bool DolphinTabPage::splitViewEnabled() const return m_splitViewEnabled; } -void DolphinTabPage::setSplitViewEnabled(bool enabled, bool stash /*= false*/) +void DolphinTabPage::setSplitViewEnabled(bool enabled, QUrl secondaryUrl /*= QUrl()*/) { if (m_splitViewEnabled != enabled) { m_splitViewEnabled = enabled; if (enabled) { - const QUrl& url = (stash) ? QUrl("stash:/") : m_primaryViewContainer->url(); + const QUrl& url = (secondaryUrl.isEmpty()) ? m_primaryViewContainer->url() : secondaryUrl; m_secondaryViewContainer = createViewContainer(url); const bool placesSelectorVisible = m_primaryViewContainer->urlNavigator()->isPlacesSelectorVisible(); diff --git a/src/dolphintabpage.h b/src/dolphintabpage.h index d14574561..023f216fc 100644 --- a/src/dolphintabpage.h +++ b/src/dolphintabpage.h @@ -50,7 +50,7 @@ public: * * If \a enabled is true, it creates a secondary view with the url of the primary view. */ - void setSplitViewEnabled(bool enabled, bool stash = false); + void setSplitViewEnabled(bool enabled, QUrl secondaryUrl = QUrl()); /** * @return The primary view containter. -- cgit v1.3 From d5e692d16def63a6e874aab57aff4a8f6abfd1f8 Mon Sep 17 00:00:00 2001 From: arnav dhamija Date: Mon, 13 Feb 2017 17:08:10 +0530 Subject: fixed arg --- src/dolphintabpage.cpp | 2 +- src/dolphintabpage.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dolphintabpage.h') diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 0ed5fd2f2..5c42d41ec 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -71,7 +71,7 @@ bool DolphinTabPage::splitViewEnabled() const return m_splitViewEnabled; } -void DolphinTabPage::setSplitViewEnabled(bool enabled, QUrl secondaryUrl) +void DolphinTabPage::setSplitViewEnabled(bool enabled, const QUrl &secondaryUrl) { if (m_splitViewEnabled != enabled) { m_splitViewEnabled = enabled; diff --git a/src/dolphintabpage.h b/src/dolphintabpage.h index 023f216fc..1a97ea457 100644 --- a/src/dolphintabpage.h +++ b/src/dolphintabpage.h @@ -50,7 +50,7 @@ public: * * If \a enabled is true, it creates a secondary view with the url of the primary view. */ - void setSplitViewEnabled(bool enabled, QUrl secondaryUrl = QUrl()); + void setSplitViewEnabled(bool enabled, const QUrl &secondaryUrl = QUrl()); /** * @return The primary view containter. -- cgit v1.3