From 73c30c7ea25891d3579277734393b70d9d1e2ab3 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 10 May 2012 23:26:29 +0200 Subject: Allow to remember view-properties for the search-mode Per default Dolphin remembers the view-properties for each search-URL individually. However when being in the search-mode, where the search-URL is different each time by definition, it should also be possible for the user to adjust the view-properties. The DolphinView is not aware about any "search-mode", so an interface has been added to provide a "context" for storing the view-properties. The context will be adjusted by the DolphinViewContainer in case if the search-mode is active. --- src/dolphinviewcontainer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/dolphinviewcontainer.cpp') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 51f2b4218..9e297364b 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -297,6 +297,8 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled) m_searchBox->setSearchPath(url); } } else { + m_view->setViewPropertiesContext(QString()); + // Restore the URL for the URL navigator. If Dolphin has been // started with a search-URL, the home URL is used as fallback. const KUrl url = m_searchBox->searchPath(); @@ -589,6 +591,7 @@ void DolphinViewContainer::startSearching() { const KUrl url = m_searchBox->urlForSearching(); if (url.isValid() && !url.isEmpty()) { + m_view->setViewPropertiesContext("search"); m_urlNavigator->setLocationUrl(url); } } -- cgit v1.3