Bug 222186 - Opening multiple items with directories among them
Summary: Opening multiple items with directories among them
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 08:58 UTC by Harsh J
Modified: 2010-01-11 14:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
dolphincontroller.cpp patch that queues selected directory for launching at the end (1.08 KB, patch)
2010-01-11 09:03 UTC, Harsh J
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harsh J 2010-01-11 08:58:47 UTC
Version:           1.4 (using Devel)
Compiler:          gcc version 4.4.2 20091208 Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic Thread model: posix
OS:                Linux
Installed from:    Compiled sources

After selecting multiple items in Dolphin's view and launching them by hitting the Return/Enter key, improper behavior occurs if one or more items selected is a directory/folder.

It would appear as if Dolphin is simply opening them in the sequence they were selected, which is correct - except that when it launches a directory the view itself changes and whatever else was selected after the directory for launching does not launch - it abruptly stops launching the rest.

This brings up a particular question about 'launching' multiple selected directories - of how it should be handled (new window/new tab?).

How to Reproduce:
1. Open Dolphin and select some items in the view.
2. Make sure at least one among them is a folder/directory, and is selected somewhere in middle of two/more other normal files.
3. Hit Return to launch them.
4. Notice that whatever you selected AFTER a directory does not launch, since that directory has changed the view.

Expected Behavior:
Ideally all files should be launched even if there's a directory to enter into, and this could be fixed by moving all directory launches to the end of the selection index list/queue.

I've attached a patch that does this (queue directory(s) last) but doesn't really help with multiple directories selected (the last selected among them alone appears launched). I'd like some help/guidance on how to implement that behavior if it is needed :)

I did do some searching but in case I missed an existing report, I apologize and would gladly mark it as a DUP :)
Comment 1 Harsh J 2010-01-11 09:03:26 UTC
Created attachment 39759 [details]
dolphincontroller.cpp patch that queues selected directory for launching at the end

I'm simply checking if the selected item is a directory and pushing them into another list (without letting it emit first), then emitting them after files are done.

End result: Works as would be the expected behavior for files alone.
Comment 2 Harsh J 2010-01-11 09:10:33 UTC
Began a review request for the patch: http://reviewboard.kde.org/r/2553/ - Please review and add suggestions there :)
Comment 3 Harsh J 2010-01-11 13:08:39 UTC
SVN commit 1073019 by harshj:

BUG:222186

With respect to the action done on hitting the "Return/Enter" key:
 * Fix the behavior for multiple-item opening, when they have directories among them.
 * Open multiple directories in background tabs.



 M  +20 -1     dolphincontroller.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1073019
Comment 4 Peter Penz 2010-01-11 14:39:55 UTC
SVN commit 1073048 by ppenz:

Backport of SVN commit 1073019: 
With respect to the action done on hitting the "Return/Enter" key:
 * Fix the behavior for multiple-item opening, when they have directories among them.
 * Open multiple directories in background tabs.

CCBUG:222186


 M  +24 -5     dolphincontroller.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1073048