Find files: Unpackers selection and priority
Posted: 2015-11-15, 15:37 UTC
This suggestion does not touch unpacker selection or priority for Alt+F6 or Open archive features because of different use-cases which require different design. So for them I posted separate suggestion here.
This suggestion, if implemented, will allow user to choose archive types and packers they want to use each time they use "Find files" "Search Archives" feature.
When "Search archives" item on "General" tab of "Find files" window is active, new separate tab of "Find files" window, called "Search Archives", must be available. It will have to consist of two Search Archives modes: basic and advanced.
In Basic mode search in archives will operate like it does now. A field for configuration of SearchInFiles wincmd.ini parameter can be added here.
Advanced mode will have list of templates (similar to "Load/Save" "Find files" window tab). Each template will define in what archives user want to search and what unpackers want to use. Default template may be a configuration for default Total Commander's Search Archives settings. With "Advanced mode", SearchInFiles wincmd.ini setting and all other settings TC use in Basic mode will be ignored, because if user wants they still may be enabled, in more flexible way, in any "Advanced mode" template.
Each template have extensions list field, with wildcards like *.* or *.r?? allowed. It may be dropdown list but I think it's better to make it as a text field with possibility to select several extensions. Anyway, near the field we put a "Configure selected" button. For extensions selected in the extensions list field, "Configure selected" button calls window with next options:
1. Unpackers. It consist of movable list (similar to one in "Configure this custom columns view..." - each field of the list can be moved, changed or removed) of unpackers user want to use for extension(s). This list created by user using available "Add unpackers" button. Pressing the button will call dialog with following options:
a) "load a list of all available unpackers" (internal, external, WCX), then user can manually remove unnecessary;
c) "try to detect packers for extension" - will load only unpackers that match extension in wincmd.ini. Packers that can detect archive type by header also may be present here, especially if our extension contains wildcards.
c) "load unpackers list from other template" may also add some automation.
d) "add manually": window with drobdown list of all unpackers and "Manually add" button to add selected to the list.
e) checkbox "Replace current list", applies to any of above options. If not active - unpackers added to items in the list.
If user added more than one unpacker for extension, both will be called during search, in their sort order, for a file with that extension; in results list found files/folders may be divided by groups for each used unpacker, like it's currently done when "Find duplicate file" used.
2. Try to search in sub-archives.
3. Try to search for text. Option used only if "Find text" selected in main "Find files", but "Try to search for text" setting has higher priority, so this way search for text may be disabled only for selected archive extensions.
This suggestion, if implemented, will allow user to choose archive types and packers they want to use each time they use "Find files" "Search Archives" feature.
When "Search archives" item on "General" tab of "Find files" window is active, new separate tab of "Find files" window, called "Search Archives", must be available. It will have to consist of two Search Archives modes: basic and advanced.
In Basic mode search in archives will operate like it does now. A field for configuration of SearchInFiles wincmd.ini parameter can be added here.
Advanced mode will have list of templates (similar to "Load/Save" "Find files" window tab). Each template will define in what archives user want to search and what unpackers want to use. Default template may be a configuration for default Total Commander's Search Archives settings. With "Advanced mode", SearchInFiles wincmd.ini setting and all other settings TC use in Basic mode will be ignored, because if user wants they still may be enabled, in more flexible way, in any "Advanced mode" template.
Each template have extensions list field, with wildcards like *.* or *.r?? allowed. It may be dropdown list but I think it's better to make it as a text field with possibility to select several extensions. Anyway, near the field we put a "Configure selected" button. For extensions selected in the extensions list field, "Configure selected" button calls window with next options:
1. Unpackers. It consist of movable list (similar to one in "Configure this custom columns view..." - each field of the list can be moved, changed or removed) of unpackers user want to use for extension(s). This list created by user using available "Add unpackers" button. Pressing the button will call dialog with following options:
a) "load a list of all available unpackers" (internal, external, WCX), then user can manually remove unnecessary;
c) "try to detect packers for extension" - will load only unpackers that match extension in wincmd.ini. Packers that can detect archive type by header also may be present here, especially if our extension contains wildcards.
c) "load unpackers list from other template" may also add some automation.
d) "add manually": window with drobdown list of all unpackers and "Manually add" button to add selected to the list.
e) checkbox "Replace current list", applies to any of above options. If not active - unpackers added to items in the list.
If user added more than one unpacker for extension, both will be called during search, in their sort order, for a file with that extension; in results list found files/folders may be divided by groups for each used unpacker, like it's currently done when "Find duplicate file" used.
2. Try to search in sub-archives.
3. Try to search for text. Option used only if "Find text" selected in main "Find files", but "Try to search for text" setting has higher priority, so this way search for text may be disabled only for selected archive extensions.