Skip to content

Commit

Permalink
installer: hide the "experimental" FSMonitor setting by default
Browse files Browse the repository at this point in the history
Seeing a disabled option that the user never enabled may be quite
confusing. So maybe just disabling it may be desirable only in scenarios
where users had enabled it?

So let's in fact not even show the FSMonitor option unless the user is
upgrading and had the option checked in the previous run.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Jul 17, 2024
1 parent 0f3e11b commit a75602a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions installer/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,7 @@ var
Data:String;
LblInfo:TLabel;
AslrSetting: AnsiString;
WasFSMonitorEnabled:Boolean;
begin
SanitizeGitEnvironmentVariables();
Expand Down Expand Up @@ -2410,12 +2411,19 @@ begin
#endif
#ifdef WITH_EXPERIMENTAL_BUILTIN_FSMONITOR
RdbExperimentalOptions[GP_EnableFSMonitor]:=CreateCheckBox(ExperimentalOptionsPage,'Built-in file system monitor','<RED>The FSMonitor feature is no longer experimental, and now needs to be'+#13+'configured per repository via the core.fsmonitor config setting.</RED>',TabOrder,Top,Left);
WasFSMonitorEnabled:=ReplayChoice('Enable FSMonitor','Auto')='Enabled';
Data:='<RED>The FSMonitor feature is no longer experimental, and now needs to be'+#13+'configured per repository via the core.fsmonitor config setting.</RED>';
if not WasFSMonitorEnabled then
Data:=''; // Avoid rendering in red because we want to hide the option, and the way we render red text, it is added as separate `TLabel` that would _still_ be shown.
RdbExperimentalOptions[GP_EnableFSMonitor]:=CreateCheckBox(ExperimentalOptionsPage,'Built-in file system monitor',Data,TabOrder,Top,Left);
// Restore the settings chosen during a previous install
RdbExperimentalOptions[GP_EnableFSMonitor].Checked:=ReplayChoice('Enable FSMonitor','Auto')='Enabled';
RdbExperimentalOptions[GP_EnableFSMonitor].Checked:=WasFSMonitorEnabled;
// FSMonitor is no longer experimental, and it is also no longer supported to be enabled by the installer for all repositories.
RdbExperimentalOptions[GP_EnableFSMonitor].Enabled:=False;
// If the FSMonitor was not enabled previously, do not even bother to show the option.
if not WasFSMonitorEnabled then
RdbExperimentalOptions[GP_EnableFSMonitor].Visible:=False;
#endif
#endif
Expand Down

0 comments on commit a75602a

Please sign in to comment.