list of app names

This commit is contained in:
Bob Mottram 2018-03-18 15:21:09 +00:00
parent a62d7fdd99
commit 007c45c5a3
1 changed files with 4 additions and 9 deletions

View File

@ -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,24 +1913,19 @@ 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
fi
}
function menu_top_level {