From c33a36878677cf5d6af6ecccc6a1b569609c31a6 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Tue, 19 Jan 2021 16:52:42 -0300 Subject: [PATCH] Allows multiple settings files for Linux too. --- source/global/IDEsettings.bas | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/source/global/IDEsettings.bas b/source/global/IDEsettings.bas index cc94c96f6..d552752d3 100644 --- a/source/global/IDEsettings.bas +++ b/source/global/IDEsettings.bas @@ -29,27 +29,19 @@ IF LoadedIDESettings = 0 THEN GOSUB CheckConfigFileExists 'make certain the config file exists and if not, create one - IF INSTR(_OS$, "WIN") THEN - - result = ReadConfigSetting("AllowIndependentSettings", value$) - IF result THEN - IF value$ = "TRUE" OR ABS(VAL(value$)) = 1 THEN 'We default to false and only use one set of IDE settings, no matter how many windows we open up - IDE_Index$ = "(" + LTRIM$(RTRIM$(STR$(tempfolderindex))) + ")" - ConfigFile$ = "internal/config" + IDE_Index$ + ".txt" - ConfigBak$ = "internal/config" + IDE_Index$ + ".bak" - GOSUB CheckConfigFileExists - ELSE - WriteConfigSetting "'[GENERAL SETTINGS]", "AllowIndependentSettings", "FALSE" - IDE_Index$ = "" - END IF + result = ReadConfigSetting("AllowIndependentSettings", value$) + IF result THEN + IF value$ = "TRUE" OR ABS(VAL(value$)) = 1 THEN 'We default to false and only use one set of IDE settings, no matter how many windows we open up + IDE_Index$ = "(" + LTRIM$(RTRIM$(STR$(tempfolderindex))) + ")" + ConfigFile$ = "internal/config" + IDE_Index$ + ".txt" + ConfigBak$ = "internal/config" + IDE_Index$ + ".bak" + GOSUB CheckConfigFileExists ELSE WriteConfigSetting "'[GENERAL SETTINGS]", "AllowIndependentSettings", "FALSE" IDE_Index$ = "" END IF - ELSE - 'Linux doesn't offer multiple temp folders and thus can not work properly with independent settings - 'This option is not included on Linux, and if manually inserted will simply be ignored. + WriteConfigSetting "'[GENERAL SETTINGS]", "AllowIndependentSettings", "FALSE" IDE_Index$ = "" END IF