Skip to content

Commit

Permalink
installer: skip Experimental Options page, if empty
Browse files Browse the repository at this point in the history
As of a75602a (installer: hide the "experimental" FSMonitor setting by
default, 2024-07-17), the FSMonitor option is hidden from the options
page unless the user had enabled it previously.

However, this then left the page blank (or: all options hidden), not a
good user experience. So let's skip it if it would appear blank.

This fixes git-for-windows/git#5231.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Oct 30, 2024
1 parent db9cbd9 commit 1ffa3df
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion installer/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,18 @@ end;
procedure QueryUninstallValues; forward;
function IsHiddenExperimentalOptionsPageEmpty:Boolean;
var
i:Integer;
begin
Result:=True;
#ifdef HAVE_EXPERIMENTAL_OPTIONS
for i:=1 to GP_MaxExperimental do
if (RdbExperimentalOptions[i]<>nil) and RdbExperimentalOptions[i].Visible then
Result:=False;
#endif
end;
procedure InitializeWizard;
var
PrevPageID,TabOrder,TopOfLabels,Top,Left:Integer;
Expand Down Expand Up @@ -2589,7 +2601,10 @@ begin
Result:=False
else
Result:=(PageID<>wpInfoBefore) and (PageID<>wpFinished);
end else
end else if (PageID=ExperimentalOptionsPage.ID) and IsHiddenExperimentalOptionsPageEmpty then
// Skip experimental options page if all options are hidden
Result:=True
else
Result:=False;
#ifdef DEBUG_WIZARD_PAGE
Result:=PageID<>DebugWizardPage
Expand Down

0 comments on commit 1ffa3df

Please sign in to comment.