source: titan/plugins/mc/mc_videoplayer_settings.h @ 15216

Last change on this file since 15216 was 15216, checked in by obi, 12 years ago

[titan] update grid filelist and enable changing in mc vp

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