Different menu style

This commit is contained in:
Bob Mottram 2018-03-17 21:19:41 +00:00
parent 45c484420b
commit e96027b8d3
1 changed files with 30 additions and 37 deletions

View File

@ -2275,41 +2275,37 @@ function menu_app_settings {
function menu_top_level {
while true
do
data=$(mktemp 2>/dev/null)
dialog --backtitle $"Freedombone Control Panel" \
--title $"Control Panel" \
--radiolist $"Choose an operation:" 30 70 22 \
1 $"About this system" off \
2 $"Passwords" off \
3 $"Backup and Restore" off \
4 $"Show Firewall" off \
5 $"Verify Tripwire Code" off \
6 $"Reset Tripwire" off \
7 $"App Settings" off \
8 $"Add/Remove Apps" off \
9 $"Logging on/off" off \
10 $"Ping enable/disable" off \
11 $"Manage Users" off \
12 $"Email Menu" off \
13 $"Domain or User Blocking" off \
14 $"Security Settings" off \
15 $"Change the name of this system" off \
16 $"Set a static local IP address" off \
17 $"Wifi menu" off \
18 $"Add Clacks" off \
19 $"Check for updates" off \
20 $"Power off the system" off \
21 $"Restart the system" off \
22 $"Exit" on 2> "$data"
sel=$?
case $sel in
1) rm -f "$data"
exit 1;;
255) rm -f "$data"
exit 1;;
esac
W=(1 $"About this system"
2 $"Passwords"
3 $"Backup and Restore"
4 $"Show Firewall"
5 $"Verify Tripwire Code"
6 $"Reset Tripwire"
7 $"App Settings"
8 $"Add/Remove Apps"
9 $"Logging on/off"
10 $"Ping enable/disable"
11 $"Manage Users"
12 $"Email Menu"
13 $"Domain or User Blocking"
14 $"Security Settings"
15 $"Change the name of this system"
16 $"Set a static local IP address"
17 $"Wifi menu"
18 $"Add Clacks"
19 $"Check for updates"
20 $"Power off the system"
21 $"Restart the system")
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Control Panel" --title $"Control Panel" --menu $"Choose an operation, or ESC to exit:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
break
fi
please_wait
case $(cat "$data") in
case $selection in
1) show_about;;
2) view_or_change_passwords;;
3) menu_backup_restore;;
@ -2335,10 +2331,7 @@ function menu_top_level {
19) check_for_updates;;
20) shut_down_system;;
21) restart_system;;
22) rm -f "$data"
break;;
esac
rm -f "$data"
done
}