From 8b20bfff3eb87b5a270ea59ef6711014bc5691e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 23 Oct 2017 18:34:23 +0300 Subject: fix for magic numbers in the installer --- tools/installer_ng/MirandaNG.iss | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tools/installer_ng') diff --git a/tools/installer_ng/MirandaNG.iss b/tools/installer_ng/MirandaNG.iss index 74c9d7b034..6a4884133c 100644 --- a/tools/installer_ng/MirandaNG.iss +++ b/tools/installer_ng/MirandaNG.iss @@ -607,6 +607,9 @@ const DRIVE_CDROM = 5; // The drive is a CD-ROM drive. DRIVE_RAMDISK = 6; // The drive is a RAM disk. + // don't forget to increment it after adding new components! + COMPONENTS_COUNT = 20; // Index of the first language + // Default installation check function IsDefault: Boolean; begin @@ -876,15 +879,15 @@ begin if CurPageID = wpSelectComponents then begin if ActiveLanguage = 'en' then - WizardForm.ComponentsList.Checked[25]:= True + WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+4]:= True else if ActiveLanguage = 'ru' then - WizardForm.ComponentsList.Checked[21]:= True + WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+0]:= True else if ActiveLanguage = 'cz' then - WizardForm.ComponentsList.Checked[22]:= True + WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+1]:= True else if ActiveLanguage = 'pl' then - WizardForm.ComponentsList.Checked[23]:= True + WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+2]:= True else if ActiveLanguage = 'de' then - WizardForm.ComponentsList.Checked[24]:= True; + WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+3]:= True; end; end; -- cgit v1.2.3