From a5b1356ddc6229b436c7075be29ade62d59a7fa6 Mon Sep 17 00:00:00 2001 From: Tegas Aziz <49786146+WilloIzCitron@users.noreply.github.com> Date: Mon, 4 Apr 2022 22:19:45 +0700 Subject: [PATCH] fix(#653): use isArray and update gitignore (#670) * fix(#653): use isArray and update gitignore * forgor * try no 2 --- .gitignore | 3 +++ WhyNotWin11.au3 | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 30f8aea9..58e3ecaa 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ theme.def Backup/* results.txt *.csv + +# Remove the editor settings directory +.vscode diff --git a/WhyNotWin11.au3 b/WhyNotWin11.au3 index fa17e111..6b4de04a 100644 --- a/WhyNotWin11.au3 +++ b/WhyNotWin11.au3 @@ -344,9 +344,10 @@ Func Main(ByRef $aResults, ByRef $aOutput) For $iLoop = 1 To $aLangs[0] Step 1 $aLangs[$iLoop] &= " - " & IniRead(@LocalAppDataDir & "\WhyNotWin11\langs\" & $aLangs[$iLoop], "MetaData", "Language", "Unknown") Next - _ArrayDelete($aLangs, 0) + _ArrayDelete($aLangs, 0) + _ArrayDelete($aLangs, 55) ;==> Remove the "Unknown" entry EndIf - + Local $aThemes = _FileListToArray(@ScriptDir & "\", "*.def", $FLTA_FILES) If Not @error Then For $iLoop = 1 To $aThemes[0] Step 1 @@ -809,17 +810,16 @@ Func Main(ByRef $aResults, ByRef $aOutput) GUICtrlCreateGroup("", 30, 180, 400, 328) GUICtrlCreateLabel(" " & _Translate($aMUI[1], "Settings") & " ", 40, 180, 380, 20) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) - GUICtrlCreateLabel(_Translate($aMUI[1], "Language") & ":", 40, 200, 380, 20) - Local $hLanguage = GUICtrlCreateCombo("", 40, 220, 380, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) - If Not _ArrayToString($aLangs) = -1 Then GUICtrlSetData(-1, _ArrayToString($aLangs), $aMUI[1]) - GUICtrlCreateLabel(_Translate($aMUI[1], "Translation by") & ":", 40, 250, 100, 20) + Local $hLanguage = GUICtrlCreateCombo($alangs, 40, 220, 380, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) + GUICtrlSetData(-1, _ArrayToString($aLangs), $aMUI[1]) + If IsArray($aLangs) Then GUICtrlCreateLabel(_Translate($aMUI[1], "Translation by") & ":", 40, 250, 100, 20) GUICtrlCreateLabel(_GetTranslationCredit($aMUI[1]), 140, 250, 280, 40, $SS_RIGHT) GUICtrlCreateLabel(_Translate($aMUI[1], "Theme") & ":", 40, 290, 380, 20) Local $hTheme = GUICtrlCreateCombo("", 40, 310, 380, 20, $CBS_DROPDOWNLIST+$WS_VSCROLL) #forceref $hTheme - If Not _ArrayToString($aThemes) = -1 Then GUICtrlSetData(-1, _ArrayToString($aThemes)) + If IsArray($aThemes) Then GUICtrlSetData(-1, _ArrayToString($aThemes)) GUICtrlCreateLabel(_Translate($aMUI[1], "Theme by") & ":", 40, 340, 100, 20) ; GUICtrlCreateLabel(_GetThemeCredit($sTheme), 140, 340, 280, 40, $SS_RIGHT)