Selecting apps on the user control panel
This commit is contained in:
parent
8861e41128
commit
6781dba015
|
@ -812,7 +812,7 @@ function sign_keys {
|
|||
function menu_run_client_app {
|
||||
detect_installable_apps
|
||||
|
||||
applist=""
|
||||
W=()
|
||||
appnames=()
|
||||
n=1
|
||||
app_index=0
|
||||
|
@ -821,7 +821,7 @@ function menu_run_client_app {
|
|||
do
|
||||
if [[ ${APPS_INSTALLED[$app_index]} != "0" ]]; then
|
||||
if [[ $(function_exists "run_client_${a}") == "1" ]]; then
|
||||
applist="$applist $n $a off"
|
||||
W+=("$n" "$a")
|
||||
n=$((n+1))
|
||||
appnames+=("$a")
|
||||
fi
|
||||
|
@ -831,24 +831,17 @@ function menu_run_client_app {
|
|||
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 $"Run an App" \
|
||||
--radiolist $'Choose:' \
|
||||
16 40 20 $applist)
|
||||
selection=$(dialog --backtitle $"Freedombone" --title $"Run an App" --menu $"Choose an operation, or ESC for main menu:" 16 70 20 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||
|
||||
# shellcheck disable=SC2181
|
||||
if [ $? -eq 0 ]; then
|
||||
app_index=$((choice-1))
|
||||
if [ ! "$selection" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
app_index=$((selection-1))
|
||||
chosen_app=${appnames[$app_index]}
|
||||
if [[ $chosen_app != "Exit" ]]; then
|
||||
"run_client_${chosen_app}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function show_your_email_address {
|
||||
|
|
Loading…
Reference in New Issue