[9290] | 1 | #ifndef MC_VIDEOPLAYER_SETTINGS_H |
---|
| 2 | #define MC_VIDEOPLAYER_SETTINGS_H |
---|
| 3 | |
---|
| 4 | void screenmc_videoplayer_settings() |
---|
| 5 | { |
---|
| 6 | int rcret = 0; |
---|
[9820] | 7 | struct skin* tmp = NULL; |
---|
| 8 | |
---|
[9290] | 9 | struct skin* mc_videoplayer_settings = getscreen("mc_videoplayer_settings"); |
---|
| 10 | struct skin* listbox = getscreennode(mc_videoplayer_settings, "listbox"); |
---|
| 11 | struct skin* dirsort = getscreennode(mc_videoplayer_settings, "sort"); |
---|
| 12 | struct skin* view = getscreennode(mc_videoplayer_settings, "view"); |
---|
[15221] | 13 | struct skin* imdb_directory = getscreennode(mc_videoplayer_settings, "imdb_directory"); |
---|
[13500] | 14 | struct skin* vp_autostart_playlist = getscreennode(mc_videoplayer_settings, "autostart_playlist"); |
---|
[9290] | 15 | |
---|
| 16 | addchoicebox(dirsort, "0", _("alpha")); |
---|
| 17 | addchoicebox(dirsort, "1", _("reverse alpha")); |
---|
| 18 | addchoicebox(dirsort, "2", _("size")); |
---|
| 19 | addchoicebox(dirsort, "3", _("reverse size")); |
---|
| 20 | addchoicebox(dirsort, "4", _("date")); |
---|
| 21 | addchoicebox(dirsort, "5", _("reverse date")); |
---|
| 22 | setchoiceboxselection(dirsort, getconfig("dirsort", NULL)); |
---|
| 23 | |
---|
[15220] | 24 | addchoicebox(view, "0", "fast"); |
---|
[15521] | 25 | // addchoicebox(view, "1", "big"); |
---|
| 26 | // addchoicebox(view, "2", "cover"); |
---|
| 27 | // addchoicebox(view, "3", "default"); |
---|
| 28 | // addchoicebox(view, "4", "details"); |
---|
| 29 | // addchoicebox(view, "5", "fullcover"); |
---|
[15216] | 30 | |
---|
| 31 | // addchoicebox(view, "0", _("default")); |
---|
| 32 | // addchoicebox(view, "1", _("cover")); |
---|
| 33 | // addchoicebox(view, "2", _("size")); |
---|
| 34 | // addchoicebox(view, "3", _("details")); |
---|
| 35 | // addchoicebox(view, "4", _("smal")); |
---|
| 36 | // addchoicebox(view, "5", _("fast")); |
---|
[9290] | 37 | setchoiceboxselection(view, getconfig("view", NULL)); |
---|
| 38 | |
---|
[13500] | 39 | addchoicebox(vp_autostart_playlist, "0", _("no")); |
---|
| 40 | addchoicebox(vp_autostart_playlist, "1", _("yes")); |
---|
| 41 | setchoiceboxselection(vp_autostart_playlist, getconfig("vp_autostart_playlist", NULL)); |
---|
| 42 | |
---|
[9290] | 43 | system("ls -al /media/net ; ls -al /media/usb"); |
---|
| 44 | |
---|
| 45 | addchoicebox(imdb_directory, "/var/swap", "/var/swap"); |
---|
| 46 | |
---|
| 47 | char* nfs = command("cat /proc/mounts | grep nfs | awk '{print $2}'"); |
---|
| 48 | debug(50, "[mc_imdb_sync] imdb_directory nfs: %s", nfs); |
---|
| 49 | addchoicebox(imdb_directory, nfs, nfs); |
---|
| 50 | |
---|
| 51 | char* cifs = command("cat /proc/mounts | grep cifs | awk '{print $2}'"); |
---|
| 52 | debug(50, "[mc_imdb_sync] imdb_directory cifs: %s", cifs); |
---|
| 53 | addchoicebox(imdb_directory, cifs, cifs); |
---|
| 54 | |
---|
| 55 | char* vfat = command("cat /proc/mounts | grep vfat | awk '{print $2}'"); |
---|
| 56 | debug(50, "[mc_imdb_sync] imdb_directory vfat: %s", vfat); |
---|
| 57 | addchoicebox(imdb_directory, vfat, vfat); |
---|
| 58 | |
---|
| 59 | char* ntfs3g = command("cat /proc/mounts | grep ntfs-3g | awk '{print $2}'"); |
---|
| 60 | debug(50, "[mc_imdb_sync] imdb_directory ntfs-3g: %s", ntfs3g); |
---|
| 61 | addchoicebox(imdb_directory, ntfs3g, ntfs3g); |
---|
| 62 | |
---|
| 63 | char* ntfsmount = command("cat /proc/mounts | grep ntfsmount | awk '{print $2}'"); |
---|
| 64 | debug(50, "[mc_imdb_sync] imdb_directory ntfsmount: %s", ntfsmount); |
---|
| 65 | addchoicebox(imdb_directory, ntfsmount, ntfsmount); |
---|
| 66 | |
---|
| 67 | char* jfs = command("cat /proc/mounts | grep jfs | awk '{print $2}'"); |
---|
| 68 | debug(50, "[mc_imdb_sync] imdb_directory jfs: %s", jfs); |
---|
| 69 | addchoicebox(imdb_directory, jfs, jfs); |
---|
| 70 | |
---|
| 71 | char* ext2 = command("cat /proc/mounts | grep ext2 | awk '{print $2}'"); |
---|
| 72 | debug(50, "[mc_imdb_sync] imdb_directory ext2: %s", ext2); |
---|
| 73 | addchoicebox(imdb_directory, ext2, ext2); |
---|
| 74 | |
---|
| 75 | char* ext3 = command("cat /proc/mounts | grep ext3 | awk '{print $2}'"); |
---|
| 76 | debug(50, "[mc_imdb_sync] imdb_directory ext3: %s", ext3); |
---|
| 77 | addchoicebox(imdb_directory, ext3, ext3); |
---|
| 78 | |
---|
| 79 | setchoiceboxselection(imdb_directory, getconfig("imdb_directory", NULL)); |
---|
| 80 | |
---|
| 81 | drawscreen(mc_videoplayer_settings, 0); |
---|
| 82 | addscreenrc(mc_videoplayer_settings, listbox); |
---|
| 83 | |
---|
| 84 | tmp = listbox->select; |
---|
| 85 | while(1) |
---|
| 86 | { |
---|
| 87 | addscreenrc(mc_videoplayer_settings, tmp); |
---|
| 88 | rcret = waitrc(mc_videoplayer_settings, 0, 0); |
---|
| 89 | tmp = listbox->select; |
---|
| 90 | |
---|
| 91 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
| 92 | if(rcret == getrcconfigint("rcok", NULL)) |
---|
| 93 | { |
---|
[9820] | 94 | addconfigscreencheck("dirsort", dirsort, NULL); |
---|
| 95 | addconfigscreencheck("view", view, NULL); |
---|
| 96 | addconfigscreencheck("imdb_directory", imdb_directory, NULL); |
---|
[13500] | 97 | addconfigscreencheck("vp_autostart_playlist", vp_autostart_playlist, NULL); |
---|
[9290] | 98 | break; |
---|
| 99 | } |
---|
[13253] | 100 | else if(rcret == getrcconfigint("rcred", NULL)) |
---|
[9820] | 101 | { |
---|
| 102 | struct skin* screen = getscreen("networkmenu"); |
---|
| 103 | menu(screen); |
---|
| 104 | drawscreen(mc_videoplayer_settings, 0); |
---|
| 105 | } |
---|
[9290] | 106 | } |
---|
| 107 | |
---|
| 108 | delownerrc(mc_videoplayer_settings); |
---|
| 109 | clearscreen(mc_videoplayer_settings); |
---|
| 110 | free(ext2); |
---|
| 111 | free(ext3); |
---|
| 112 | free(vfat); |
---|
| 113 | free(ntfsmount); |
---|
| 114 | free(ntfs3g); |
---|
| 115 | free(cifs); |
---|
| 116 | free(nfs); |
---|
| 117 | } |
---|
| 118 | |
---|
| 119 | #endif |
---|