Media menu on control panel

This commit is contained in:
Bob Mottram 2015-12-03 14:51:18 +00:00
parent 6a56893b47
commit 69225e70c4
2 changed files with 38 additions and 11 deletions

Binary file not shown.

View File

@ -827,6 +827,31 @@ function menu_hubzilla {
done
}
function menu_media {
while true
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Control Panel" \
--title $"Media Menu" \
--radiolist $"Choose an operation:" 13 70 2 \
1 $"Attach a drive containing playable media" off \
2 $"Remove a drive containing playable media" off \
3 $"Exit" on 2> $data
sel=$?
case $sel in
1) break;;
255) break;;
esac
case $(cat $data) in
1) remove-music
attach-music;;
2) remove-music;;
3) break;;
esac
done
}
function menu_top_level {
while true
do
@ -834,7 +859,7 @@ function menu_top_level {
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Control Panel" \
--title $"Control Panel" \
--radiolist $"Choose an operation:" 20 70 13 \
--radiolist $"Choose an operation:" 21 70 14 \
1 $"Backup and Restore" off \
2 $"Show SIP Phone Extensions" off \
3 $"Reset Tripwire" off \
@ -843,11 +868,12 @@ function menu_top_level {
6 $"Email Filtering Rules" off \
7 $"Security Settings" off \
8 $"Hubzilla" off \
9 $"Change the name of this system" off \
10 $"Check for updates" off \
11 $"Power off the system" off \
12 $"Restart the system" off \
13 $"Exit" on 2> $data
9 $"Media menu" off \
10 $"Change the name of this system" off \
11 $"Check for updates" off \
12 $"Power off the system" off \
13 $"Restart the system" off \
14 $"Exit" on 2> $data
sel=$?
case $sel in
1) exit 1;;
@ -862,11 +888,12 @@ function menu_top_level {
6) menu_email;;
7) security_settings;;
8) menu_hubzilla;;
9) change_system_name;;
10) check_for_updates;;
11) shut_down_system;;
12) restart_system;;
13) break;;
9) menu_media;;
10) change_system_name;;
11) check_for_updates;;
12) shut_down_system;;
13) restart_system;;
14) break;;
esac
done
}