Bug 297666 - split view: active window is closed when disabling split view
Summary: split view: active window is closed when disabling split view
Status: RESOLVED DUPLICATE of bug 312834
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Archlinux Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-07 15:36 UTC by Nelson Chan
Modified: 2020-07-19 11:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to make toggleSplitView() to close inactive view instead of the active one (1.77 KB, patch)
2012-04-07 16:39 UTC, Nelson Chan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nelson Chan 2012-04-07 15:36:03 UTC
Problem:
when disabling split view, the active panel is closed and the inactive one is kept.

Step to reproduce:
1. open dolphin
2. navigate to your favourite folder
3. enable split view (hit F3 by default)
4. navigate both panels to different folder
5. select the right panel to make it active  (note the folder path to remember which one was active, which one was not).  that means left panel should now be inactive
6. now disable split view (hit F3 by default)
7. look at the path, the one remains is the *inactive* which is not the one we want!

Expected behaviour:
when split view is being disabled, the *inactive* panel should be closed and keep the active panel that we were working on.
Comment 1 Nelson Chan 2012-04-07 16:03:48 UTC
um i just checked the source code (quoted below)
judging from the comments, closing active view when toogling splitview seems  to be an expected feature.
but i still think this is a flawed idea that closing the view that the user is working with (the active one). 
maybe make this bug a feature request?

///////////////////////////////////////////////////////////

// In dolphinmainwindow.cpp
void DolphinMainWindow::toggleSplitView()
{
    if (!m_viewTab[m_tabIndex].secondaryView) {
        createSecondaryView(m_tabIndex);
        setActiveViewContainer(m_viewTab[m_tabIndex].secondaryView);
    } else if (m_activeViewContainer == m_viewTab[m_tabIndex].secondaryView) {
        // remove secondary view
        m_viewTab[m_tabIndex].secondaryView->close();
        m_viewTab[m_tabIndex].secondaryView->deleteLater();
        m_viewTab[m_tabIndex].secondaryView = 0;

        setActiveViewContainer(m_viewTab[m_tabIndex].primaryView);
    } else {
        // The primary view is active and should be closed. Hence from a users point of view
        // the content of the secondary view should be moved to the primary view.
        // From an implementation point of view it is more efficient to close
        // the primary view and exchange the internal pointers afterwards.

        m_viewTab[m_tabIndex].primaryView->close();
        m_viewTab[m_tabIndex].primaryView->deleteLater();
        m_viewTab[m_tabIndex].primaryView = m_viewTab[m_tabIndex].secondaryView;
        m_viewTab[m_tabIndex].secondaryView = 0;

        setActiveViewContainer(m_viewTab[m_tabIndex].primaryView);
    }

    updateViewActions();
}
Comment 2 Peter Penz 2012-04-07 16:12:00 UTC
Thanks for the input, but we initially had it the other way around in Dolphin 1.0 and users complained that actions should always be applied to the active view and not the inactive view -> we changed the behavior to the current one on purpose. I'll close this issue as "wontfix" as the requests for going back to the old behavior during the last few years is too low to making an option for this.
Comment 3 Nelson Chan 2012-04-07 16:39:21 UTC
Created attachment 70213 [details]
patch to make toggleSplitView() to close inactive view instead of the active one

proposing a patch
Comment 4 Nelson Chan 2012-04-07 17:05:10 UTC
never mind i rarely really use split view myself since tabbing pretty much does the job for me
but would there be any chance to get accepted if i go ahead and make the bahviour configurable by making an option? 
say, in dolphin preferences->General->Behaviour in a "Split view" frame with a pair of radio buttons
so the GUI may look like:

-- Split view mode --
when disabling split view mode, close:
(o) Active view   (  ) Inactive view         <---- radio buttons

                                  [OK]   [Apply]   [Cancel]  


by the way, dolphin code seems pretty neat (at least the splitview and tabbing part)
i'm interested in working on dolphin development as i'm a bored college student looking to get involved in oss project and dolphin seems to be a good start
Comment 5 Peter Penz 2012-04-07 18:15:43 UTC
> would there be any chance to get accepted if i go ahead and
> make the bahviour configurable by making an option? 

Any help to improve Dolphin is really welcome in general, but in this case it just don't justifies an option based on the user-feedback during the last 4 years. I'm generally open for options (see also http://dolphin.kde.org/philosophy.html) but in this case I'd say a decision is needed (and has already been done).

> by the way, dolphin code seems pretty neat (at least the splitview and tabbing part)

Oh, I wanted to refactor this code since 2 years already because I think it is not nice ;-) But it is fine to hear that you don't consider it as bad as I thought it is.

> i'm interested in working on dolphin development as i'm a bored college
> student looking to get involved in oss project and dolphin seems to be a
> good start

Any help would really be welcome! Development-tasks for Dolphin (and Konqueror) are discussed at kfm-devel@kde.org. Please contact us there before investigating a lot of work into a feature or bugfix, so that we can discuss the general approach and whether e.g. a feature should go in at all. Probably a good start are either tasks marked as "junior-job" or of course bugs you want to have fixed for yourself.
Comment 6 unfa 2017-05-21 15:43:56 UTC
Since this is a wontfix, could there be an option added in the Dolphin configuration to make it close the inactive view instead of the active one?
Comment 7 Christoph Feck 2017-06-07 16:13:07 UTC
See bug 312834.
Comment 8 manuelchaves 2020-04-26 08:34:46 UTC
If I have the left pane focused and then press F3 to exit split view, I would expect the formerly left pane to remain, not the inactive one. As it is, it feels odd.
Comment 9 postix 2020-07-19 11:08:23 UTC

*** This bug has been marked as a duplicate of bug 312834 ***