persistent selections
Posted: 01 Feb 2006, 06:51
this is one of the two productivity features i would use *a lot*.
what:
persistent selections. the idea is to add 'keep selection' switch to the selection commands (either under edit or edit -> advanced).
when selected/checked (which could also be indicated by icon in the directory line as is the case with filter), all the selections would be kept when changing directories.
how it works:
on a directory change, active selection would be stored to selection memory together with complete path and then salamander would look if there's selection list for the new path and restore that selection.
advantage:
this would be huge time saver. consider you're selecting directories and suddenly want to look what's inside one of them. just enter, have a look, return back and have your selection as it was. of course one could use selection memory or 'restore selection' manually (edit: or browse it in the other panel, which is what i do at the moment), but that'd be a bit cumbersome for this purpose.
other plus is that you won't lose your selection by accident.
things to consider:
- should this be panel-specific? (probably yes to avoid some accidents)
- for multiple paths or just one (the one that was active when you switched 'keep selection' on)?
i would love either one; one path version would be easier to implement and also avoid some confusion, however multiple-path version could have some extra use (and get more use in the future).
like when you want to create list of files / directories not in the same parent directory. just activate 'keep selection' and go through your file system, selecting files and directories as you wish. then hit ctrl+m and have all your selections exported.
another commands could be extended to support full paths for selection too (mostly 'load selection' from clipboard).
not really what i would need, just a thought:
in the future, it could be even handy for file operations like copy / move / delete, however this could be a little bit dangerous on the user side (so user should be presented with list of directories and files before the operation). one would have to also consider cases when there are files / directories selected under another selected directory (possible solution: either use only top-level or bottom-level ones, or when entering selected directory, all its contents should be selected - so user could refine the selection and 'exclude' some items from it; if that would be the case, you could show overlay icons or tint icons on folders under which there's any selection).
thinking about it, you could possibly use this framework when adding treeview in the future, which is on the road map already.
implementation:
i think it would be best to have heap / list of selection groups in the selection memory.
one without any path = current selection memory, which is not bound to any concrete directory. and then multiple ones for all the paths with any selection on theirs children in the file system.
there could be some hash look-up on the paths; paths sorted lexicographically; linked paths (i.e. selection on items under c:\somepath1\somepath2\ would be linked to c:\somepath2\ and that to c:\) for faster and/or easier processing.
if using above-mentioned selection expansion when entering selected directory, there could be some additional logic to save memory space when not changing this selection (i.e. imagine that in the selection memory for c:\somepath1\ is its subdirectory somepath2. when you enter somepath2, you see all its contains selected so you could make changes to it. however consider that you won't and that you leave this directory without unselecting anything. then selection memory end-up being the same - c:\somepath1\ with selection somepath2, and not c:\somepath1\somepath2\ with selection on all its children).
----
sorry for the detailed and technical post; just ideas i had; all i need to be happy would be that single path version. i'm interested in others' opinions on subject ...
what:
persistent selections. the idea is to add 'keep selection' switch to the selection commands (either under edit or edit -> advanced).
when selected/checked (which could also be indicated by icon in the directory line as is the case with filter), all the selections would be kept when changing directories.
how it works:
on a directory change, active selection would be stored to selection memory together with complete path and then salamander would look if there's selection list for the new path and restore that selection.
advantage:
this would be huge time saver. consider you're selecting directories and suddenly want to look what's inside one of them. just enter, have a look, return back and have your selection as it was. of course one could use selection memory or 'restore selection' manually (edit: or browse it in the other panel, which is what i do at the moment), but that'd be a bit cumbersome for this purpose.
other plus is that you won't lose your selection by accident.
things to consider:
- should this be panel-specific? (probably yes to avoid some accidents)
- for multiple paths or just one (the one that was active when you switched 'keep selection' on)?
i would love either one; one path version would be easier to implement and also avoid some confusion, however multiple-path version could have some extra use (and get more use in the future).
like when you want to create list of files / directories not in the same parent directory. just activate 'keep selection' and go through your file system, selecting files and directories as you wish. then hit ctrl+m and have all your selections exported.
another commands could be extended to support full paths for selection too (mostly 'load selection' from clipboard).
not really what i would need, just a thought:
in the future, it could be even handy for file operations like copy / move / delete, however this could be a little bit dangerous on the user side (so user should be presented with list of directories and files before the operation). one would have to also consider cases when there are files / directories selected under another selected directory (possible solution: either use only top-level or bottom-level ones, or when entering selected directory, all its contents should be selected - so user could refine the selection and 'exclude' some items from it; if that would be the case, you could show overlay icons or tint icons on folders under which there's any selection).
thinking about it, you could possibly use this framework when adding treeview in the future, which is on the road map already.
implementation:
i think it would be best to have heap / list of selection groups in the selection memory.
one without any path = current selection memory, which is not bound to any concrete directory. and then multiple ones for all the paths with any selection on theirs children in the file system.
there could be some hash look-up on the paths; paths sorted lexicographically; linked paths (i.e. selection on items under c:\somepath1\somepath2\ would be linked to c:\somepath2\ and that to c:\) for faster and/or easier processing.
if using above-mentioned selection expansion when entering selected directory, there could be some additional logic to save memory space when not changing this selection (i.e. imagine that in the selection memory for c:\somepath1\ is its subdirectory somepath2. when you enter somepath2, you see all its contains selected so you could make changes to it. however consider that you won't and that you leave this directory without unselecting anything. then selection memory end-up being the same - c:\somepath1\ with selection somepath2, and not c:\somepath1\somepath2\ with selection on all its children).
----
sorry for the detailed and technical post; just ideas i had; all i need to be happy would be that single path version. i'm interested in others' opinions on subject ...