Quellcode durchsuchen

Media menu on control panel

Bob Mottram vor 9 Jahren
Ursprung
Commit
69225e70c4
2 geänderte Dateien mit 38 neuen und 11 gelöschten Zeilen
  1. BIN
      man/freedombone.1.gz
  2. 38
    11
      src/freedombone-controlpanel

BIN
man/freedombone.1.gz Datei anzeigen


+ 38
- 11
src/freedombone-controlpanel Datei anzeigen

827
     done
827
     done
828
 }
828
 }
829
 
829
 
830
+function menu_media {
831
+    while true
832
+    do
833
+        data=$(tempfile 2>/dev/null)
834
+        trap "rm -f $data" 0 1 2 5 15
835
+        dialog --backtitle $"Freedombone Control Panel" \
836
+               --title $"Media Menu" \
837
+               --radiolist $"Choose an operation:" 13 70 2 \
838
+               1 $"Attach a drive containing playable media" off \
839
+               2 $"Remove a drive containing playable media" off \
840
+               3 $"Exit" on 2> $data
841
+        sel=$?
842
+        case $sel in
843
+            1) break;;
844
+            255) break;;
845
+        esac
846
+        case $(cat $data) in
847
+            1) remove-music
848
+               attach-music;;
849
+            2) remove-music;;
850
+            3) break;;
851
+        esac
852
+    done
853
+}
854
+
830
 function menu_top_level {
855
 function menu_top_level {
831
     while true
856
     while true
832
     do
857
     do
834
         trap "rm -f $data" 0 1 2 5 15
859
         trap "rm -f $data" 0 1 2 5 15
835
         dialog --backtitle $"Freedombone Control Panel" \
860
         dialog --backtitle $"Freedombone Control Panel" \
836
                --title $"Control Panel" \
861
                --title $"Control Panel" \
837
-               --radiolist $"Choose an operation:" 20 70 13 \
862
+               --radiolist $"Choose an operation:" 21 70 14 \
838
                1 $"Backup and Restore" off \
863
                1 $"Backup and Restore" off \
839
                2 $"Show SIP Phone Extensions" off \
864
                2 $"Show SIP Phone Extensions" off \
840
                3 $"Reset Tripwire" off \
865
                3 $"Reset Tripwire" off \
843
                6 $"Email Filtering Rules" off \
868
                6 $"Email Filtering Rules" off \
844
                7 $"Security Settings" off \
869
                7 $"Security Settings" off \
845
                8 $"Hubzilla" off \
870
                8 $"Hubzilla" off \
846
-               9 $"Change the name of this system" off \
847
-               10 $"Check for updates" off \
848
-               11 $"Power off the system" off \
849
-               12 $"Restart the system" off \
850
-               13 $"Exit" on 2> $data
871
+               9 $"Media menu" off \
872
+               10 $"Change the name of this system" off \
873
+               11 $"Check for updates" off \
874
+               12 $"Power off the system" off \
875
+               13 $"Restart the system" off \
876
+               14 $"Exit" on 2> $data
851
         sel=$?
877
         sel=$?
852
         case $sel in
878
         case $sel in
853
             1) exit 1;;
879
             1) exit 1;;
862
             6) menu_email;;
888
             6) menu_email;;
863
             7) security_settings;;
889
             7) security_settings;;
864
             8) menu_hubzilla;;
890
             8) menu_hubzilla;;
865
-            9) change_system_name;;
866
-            10) check_for_updates;;
867
-            11) shut_down_system;;
868
-            12) restart_system;;
869
-            13) break;;
891
+            9) menu_media;;
892
+            10) change_system_name;;
893
+            11) check_for_updates;;
894
+            12) shut_down_system;;
895
+            13) restart_system;;
896
+            14) break;;
870
         esac
897
         esac
871
     done
898
     done
872
 }
899
 }