瀏覽代碼

list of app names

Bob Mottram 7 年之前
父節點
當前提交
007c45c5a3
共有 1 個文件被更改,包括 4 次插入9 次删除
  1. 4
    9
      src/freedombone-controlpanel

+ 4
- 9
src/freedombone-controlpanel 查看文件

@@ -1894,7 +1894,7 @@ function menu_wifi {
1894 1894
 function menu_app_settings {
1895 1895
     detect_installable_apps
1896 1896
 
1897
-    applist=""
1897
+    W=()
1898 1898
     appnames=()
1899 1899
     n=1
1900 1900
     app_index=0
@@ -1903,7 +1903,7 @@ function menu_app_settings {
1903 1903
     do
1904 1904
         if [[ ${APPS_INSTALLED[$app_index]} != "0" ]]; then
1905 1905
             if [[ $(function_exists "configure_interactive_${a}") == "1" ]]; then
1906
-                applist="$applist $n $a off"
1906
+                W+=("$n" "$a")
1907 1907
                 n=$((n+1))
1908 1908
                 appnames+=("$a")
1909 1909
             fi
@@ -1913,23 +1913,18 @@ function menu_app_settings {
1913 1913
     if [ $n -le 1 ]; then
1914 1914
         return
1915 1915
     fi
1916
-    backstr=$'Exit'
1917
-    applist="$applist $n $backstr on"
1918
-    appnames+=("Exit")
1919 1916
 
1920 1917
     # shellcheck disable=SC2086
1921 1918
     choice=$(dialog --stdout --backtitle $"Freedombone" \
1922 1919
                     --title $"Change settings for an App" \
1923 1920
                     --menu $'Choose:' \
1924
-                    26 40 30 $applist 3>&2 2>&1 1>&3)
1921
+                    26 40 30 "${W[@]}" 3>&2 2>&1 1>&3)
1925 1922
 
1926 1923
     # shellcheck disable=SC2181
1927 1924
     if [ "$choice" ]; then
1928 1925
         app_index=$((choice-1))
1929 1926
         chosen_app=${appnames[$app_index]}
1930
-        if [[ $chosen_app != "Exit" ]]; then
1931
-            "configure_interactive_${chosen_app}"
1932
-        fi
1927
+        "configure_interactive_${chosen_app}"
1933 1928
     fi
1934 1929
 }
1935 1930