From da1adf7ba407fc58cf458b8ebe26c793090c1763 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 5 Nov 2010 17:02:58 +0000 Subject: If the user has changed the startup settings, they should also get applied to the current views. BUG: 254947 FIXED-IN: 4.6.0 svn path=/trunk/KDE/kdebase/apps/; revision=1193344 --- src/dolphinmainwindow.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index b666cacb0..d1358036b 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -285,6 +285,19 @@ void DolphinMainWindow::refreshViews() } setActiveViewContainer(activeViewContainer); + + const GeneralSettings* generalSettings = DolphinSettings::instance().generalSettings(); + if (generalSettings->modifiedStartupSettings()) { + // The startup settings have been changed by the user (see bug #254947). + // Synchronizethe split-view setting with the active view: + const bool splitView = generalSettings->splitView(); + const ViewTab& activeTab = m_viewTab[m_tabIndex]; + const bool toggle = ( splitView && (activeTab.secondaryView == 0)) + || (!splitView && (activeTab.secondaryView != 0)); + if (toggle) { + toggleSplitView(); + } + } } void DolphinMainWindow::pasteIntoFolder() @@ -856,14 +869,14 @@ void DolphinMainWindow::replaceLocation() void DolphinMainWindow::goBack() { clearStatusBar(); - + KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator(); urlNavigator->goBack(); - + if (urlNavigator->locationState().isEmpty()) { // An empty location state indicates a redirection URL, // which must be skipped too - urlNavigator->goBack(); + urlNavigator->goBack(); } } -- cgit v1.3