1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-07 19:10:25 +00:00

Allows multiple settings files for Linux too.

This commit is contained in:
FellippeHeitor 2021-01-19 16:52:42 -03:00
parent 6c7dda0296
commit c33a368786

View file

@ -29,27 +29,19 @@ IF LoadedIDESettings = 0 THEN
GOSUB CheckConfigFileExists 'make certain the config file exists and if not, create one 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
result = ReadConfigSetting("AllowIndependentSettings", value$) 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
IF result THEN IDE_Index$ = "(" + LTRIM$(RTRIM$(STR$(tempfolderindex))) + ")"
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 ConfigFile$ = "internal/config" + IDE_Index$ + ".txt"
IDE_Index$ = "(" + LTRIM$(RTRIM$(STR$(tempfolderindex))) + ")" ConfigBak$ = "internal/config" + IDE_Index$ + ".bak"
ConfigFile$ = "internal/config" + IDE_Index$ + ".txt" GOSUB CheckConfigFileExists
ConfigBak$ = "internal/config" + IDE_Index$ + ".bak"
GOSUB CheckConfigFileExists
ELSE
WriteConfigSetting "'[GENERAL SETTINGS]", "AllowIndependentSettings", "FALSE"
IDE_Index$ = ""
END IF
ELSE ELSE
WriteConfigSetting "'[GENERAL SETTINGS]", "AllowIndependentSettings", "FALSE" WriteConfigSetting "'[GENERAL SETTINGS]", "AllowIndependentSettings", "FALSE"
IDE_Index$ = "" IDE_Index$ = ""
END IF END IF
ELSE ELSE
'Linux doesn't offer multiple temp folders and thus can not work properly with independent settings WriteConfigSetting "'[GENERAL SETTINGS]", "AllowIndependentSettings", "FALSE"
'This option is not included on Linux, and if manually inserted will simply be ignored.
IDE_Index$ = "" IDE_Index$ = ""
END IF END IF