Selecting apps
This commit is contained in:
parent
ebf91c686d
commit
2df98832c9
|
@ -144,21 +144,18 @@ function passwords_select_user {
|
||||||
|
|
||||||
function passwords_show_apps {
|
function passwords_show_apps {
|
||||||
SELECTED_APP=
|
SELECTED_APP=
|
||||||
select_all_apps=$1
|
i=0
|
||||||
applist=""
|
W=()
|
||||||
n=1
|
|
||||||
app_index=0
|
|
||||||
for a in "${APPS_AVAILABLE[@]}"
|
for a in "${APPS_AVAILABLE[@]}"
|
||||||
do
|
do
|
||||||
applist="$applist $n $a off"
|
i=$((i+1))
|
||||||
n=$[n+1]
|
W+=($i "$a")
|
||||||
app_index=$[app_index+1]
|
|
||||||
done
|
done
|
||||||
|
|
||||||
selected_app_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select App" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
|
selected_app_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select App" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
SELECTED_APP="${name[$((selected_app_index-1))]}"
|
SELECTED_APP="${APPS_INSTALLED_NAMES[$((selected_app_index-1))]}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue