From 007c45c5a39d0600cc1605086a63d727a3de3a70 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 18 Mar 2018 15:21:09 +0000 Subject: [PATCH] list of app names --- src/freedombone-controlpanel | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index a00ba7d5..d0d12d13 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -1894,7 +1894,7 @@ function menu_wifi { function menu_app_settings { detect_installable_apps - applist="" + W=() appnames=() n=1 app_index=0 @@ -1903,7 +1903,7 @@ function menu_app_settings { do if [[ ${APPS_INSTALLED[$app_index]} != "0" ]]; then if [[ $(function_exists "configure_interactive_${a}") == "1" ]]; then - applist="$applist $n $a off" + W+=("$n" "$a") n=$((n+1)) appnames+=("$a") fi @@ -1913,23 +1913,18 @@ function menu_app_settings { if [ $n -le 1 ]; then return fi - backstr=$'Exit' - applist="$applist $n $backstr on" - appnames+=("Exit") # shellcheck disable=SC2086 choice=$(dialog --stdout --backtitle $"Freedombone" \ --title $"Change settings for an App" \ --menu $'Choose:' \ - 26 40 30 $applist 3>&2 2>&1 1>&3) + 26 40 30 "${W[@]}" 3>&2 2>&1 1>&3) # shellcheck disable=SC2181 if [ "$choice" ]; then app_index=$((choice-1)) chosen_app=${appnames[$app_index]} - if [[ $chosen_app != "Exit" ]]; then - "configure_interactive_${chosen_app}" - fi + "configure_interactive_${chosen_app}" fi }