- DolphinViewContainer* view = m_mainWindow->activeViewContainer();
- const KUrl::List urls = m_view->selectedUrls();
- if (urls.count() > 1) {
- // More than one item has been selected for renaming. Open
- // a rename dialog and rename all items afterwards.
- RenameDialog dialog(urls);
- if (dialog.exec() == QDialog::Rejected) {
- return;
+ GeneralSettings* settings = DolphinSettings::instance().generalSettings();
+ if (settings->modifiedStartupSettings()) {
+ // The startup settings should only get applied if they have been
+ // modified by the user. Otherwise keep the (possibly) different current
+ // settings of the URL navigator and the filterbar.
+ m_urlNavigator->setUrlEditable(settings->editableUrl());
+ m_urlNavigator->setShowFullPath(settings->showFullPath());
+ setFilterBarVisible(settings->filterBar());
+ }
+
+ m_view->refresh();
+ m_statusBar->refresh();
+}
+
+bool DolphinViewContainer::isFilterBarVisible() const
+{
+ return m_filterBar->isVisible();
+}
+
+void DolphinViewContainer::setSearchModeEnabled(bool enabled)
+{
+ if (enabled == isSearchModeEnabled()) {
+ return;
+ }
+
+ m_searchBox->setVisible(enabled);
+ m_urlNavigator->setVisible(!enabled);
+
+ if (enabled) {
+ // Remember the most recent non-search URL as search path
+ // of the search-box, so that it can be restored
+ // when switching back to the URL navigator.
+ KUrl url = m_urlNavigator->locationUrl();
+
+ int index = m_urlNavigator->historyIndex();
+ const int historySize = m_urlNavigator->historySize();
+ while (isSearchUrl(url) && (index < historySize)) {
+ ++index;
+ url = m_urlNavigator->locationUrl(index);