Switch easily between Batch- & GUI-mode: *.ffs_batch, *.ffs_gui, *.ffs
I was confused about *.ffs_batch and *.ffs_gui, if i first used FFS, because both do the same thing. The only difference: with or without GUI. Now i suggest (for 3 goals):
1. to unify the structure of *.ffs_batch & *.ffs_gui (and retaining the functionality of both)
2. to simplify the GUI for Handling with Configurations
3. to enable the GUI for switching between Batch- & GUI-mode.
1. Merge *.ffs_batch and *.ffs_gui in new unified *.ffs
The different 2. lines in *.ffs_batch:
<?xml version="1.0" encoding="UTF-8"?>
<FreeFileSync XmlFormat="4" XmlType="BATCH">
<MainConfig>
...
<?xml version="1.0" encoding="UTF-8"?>
<FreeFileSync XmlFormat="4" XmlType="GUI">
<MainConfig>
...
<?xml version="1.0" encoding="UTF-8"?>
<FreeFileSync XmlFormat="4" XmlType="BATCH"> --- or: --- <FreeFileSync XmlFormat="4" XmlType="GUI">
<MainConfig>
...
The different last lines in *.ffs_batch:
...
</MainConfig>
<BatchConfig>
<HandleError>Popup</HandleError>
<ShowProgress>true</ShowProgress>
<LogfileFolder Limit="-1"/>
</BatchConfig>
</FreeFileSync>
...
</MainConfig>
<GuiConfig>
<HandleError>Popup</HandleError>
<MiddleGridView>Action</MiddleGridView>
</GuiConfig>
</FreeFileSync>
...
</MainConfig>
<BatchConfig>
<HandleError>Popup</HandleError>
<ShowProgress>true</ShowProgress>
<LogfileFolder Limit="-1"/>
</BatchConfig>
<GuiConfig>
<HandleError>Popup</HandleError>
<MiddleGridView>Action</MiddleGridView>
</GuiConfig>
</FreeFileSync>
If the extension of a *.ffs is renamed to *.ffs_gui and this is run in FFS ==> FFS sets the coresponding entry in the in *.ffs_gui file to <... XmlType="GUI">
The GUI can change BATCH- or GUI-Mode from an *.ffs file (change the entry <... XmlType="...">).
The GUI can't change the entry <... XmlType="..."> from an *.ffs_batch nor an *.ffs_gui file.
2. The Configuration-Dialog in the GUI ... (and 2 Radio-Button for the 3. goal)
... has 5 Buttons: [New], [Open], [Save], [Save as GUI-Configuration as...], [Save as Batch-Configuration as...]
and 1 Text-Box with the lines <last_session>, <config-1>, <config-2>, ... and so on ...
The handling of the Text-Box is great: easy and intuitiv :)
I think the function of the 5 Buttons can be integrated in the Text-Box. Without the 5 Buttons the configuration-Dialog looks simpler and i hope you found my suggestion for handling the Buttons-functionality in the Text-Box more intuitiv like it is now. The 5 Buttons:
[New]: The Text-Box became a new entry: <new>, <last_session>, <config-1>, ...
[Open]: The Text-Box became a new entry at top: <open_new_configuration_file>, <new>, <last_session>, <config-1>, ...
If someone highlights it accidentally, the Escape-Key closes the opening Open-Dialog, immediately and the highlighted Cursor jumps to his old position.
The HOME- and PageUp-Keys does not highlight the first entry <open_new_configuration_file>.
[Save], [Save as GUI-Configuration as...], [Save as Batch-Configuration as...]: No Button, no new entry in the Text-Box, but a new entry in the Contextmenu (right mouse-clik): "Save/Save as...".
"Save/Save as...": opens a Dialog with 4 Buttons (one below the other) and the text right of them (for each one), but first 3 Info-lines:
> --- Dialog-Begin ---
The actual configuration file is:
<path>\
<filename>
> [Save]: overwrite the actual configuration
> Ceate a new configuration file ...
[Save as...]: ... which can be used for GUI or for Batch
[Save as GUI-Configuration as...]: ... which can be used for GUI, only
[Save as Batch-Configuration as...]: ... which can be used for Batch, only
--- Dialog-End ---
Right of the Text-Box are 2 Radio-Buttons with the text:
> start next time
(x) as GUI
( ) as Batch
This changes the entry <... XmlType="..."> in the *.ffs file, simple.
In the case of a *.ffs_batch file or a *.ffs_gui file the 2 Radio-Buttons are disabled and a Tooltip text (if the mouse is over the 2 Radio-Buttons) can explain: e.g. ... rename the file test.ffs_gui in test.ffs to enable these Radio-Buttons ...
More 3 new entrys in the Contextmenu (right mouse-clik) of the Text-Box:
"Enable GUI or Batch mode"
"Enable GUI mode, only"
"Enable Batch mode, only"
<-- only two of them are enabled, suitable the case *.ffs_batch or *.ffs_gui or *.ffs.
The Contextmenu contains one entry "Delete selected configuration DEL" (in DE: "Lösche ausgewählte Konfiguration DEL"). But there will be no file deleted, hence i suggest to rename this entry to: "Erase selected configuration from this list DEL" (in DE: "Entferne ausgewählte Konfiguration aus dieser Liste DEL"). And this Contextmenu entry should not appear for the 3 lines <open_new_configuration_file>, <new>, <last_session>.
3. Enable the Dialog of Batch-mode, to open GUI
The Dialog "Scanning..." has 2 Buttons [Pause] and [Stop]. It becames a 3. Button [Open GUI], which opens the GUI :) and continues scanning in the GUI. But after completed scanning no synchronize starts. The user must push the Button [synchronize] in the GUI, if he want it.
If the Dialog "Scanning..." (of Batch-mode) changes to "Synchronising..." the 3. Button [Open GUI] disappears.
The Dialog "Scanning..." stays for at least 7 seconds (if the Scanning is finished earlier), so the user has a chance to press the new 3. button.