source: titan/plugins/mc/mc_pictureplayer_settings.h @ 18249

Last change on this file since 18249 was 18249, checked in by obi, 11 years ago

add "Pic quality" to mc pp settings

File size: 5.0 KB
Line 
1#ifndef MC_PICTUREPLAYER_SETTINGS_H
2#define MC_PICTUREPLAYER_SETTINGS_H
3
4void screenmc_pictureplayer_settings()
5{
6        int rcret = 0;
7        char* ret = NULL;
8        struct skin* tmp = NULL;
9
10        struct skin* mc_pictureplayer_settings = getscreen("mc_pictureplayer_settings");
11        struct skin* listbox = getscreennode(mc_pictureplayer_settings, "listbox");
12        struct skin* dirsort = getscreennode(mc_pictureplayer_settings, "sort");
13        struct skin* view = getscreennode(mc_pictureplayer_settings, "view");
14        struct skin* sound = getscreennode(mc_pictureplayer_settings, "sound");
15        struct skin* interval = getscreennode(mc_pictureplayer_settings, "interval");
16        struct skin* showpictitle = getscreennode(mc_pictureplayer_settings, "showpictitle");
17        struct skin* picdenom = getscreennode(mc_pictureplayer_settings, "picdenom");
18        struct skin* picquality = getscreennode(mc_pictureplayer_settings, "picquality");
19        struct skin* pichwdecode = getscreennode(mc_pictureplayer_settings, "pichwdecode");
20        struct skin* defaultdir = getscreennode(mc_pictureplayer_settings, "defaultdir");
21        struct skin* uselastdir = getscreennode(mc_pictureplayer_settings, "uselastdir");
22       
23        changeinput(picdenom, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16");
24        setchoiceboxselection(picdenom, getskinconfig("mc_pp_picdenom", NULL));
25
26        changeinput(picquality, "0\n1\n2\n3");
27        setchoiceboxselection(picquality, getconfig("mc_pp_picquality", NULL));
28
29        addchoicebox(pichwdecode, "0", _("off"));       
30        addchoicebox(pichwdecode, "1", _("on"));       
31        setchoiceboxselection(pichwdecode, getconfig("mc_pp_pichwdecode", NULL));
32
33        addchoicebox(showpictitle, "0", _("off"));     
34        addchoicebox(showpictitle, "1", _("on"));       
35        setchoiceboxselection(showpictitle, getconfig("mc_pp_showpictitle", NULL));
36       
37        addchoicebox(dirsort, "0", _("alpha"));
38        addchoicebox(dirsort, "1", _("reverse alpha"));
39        addchoicebox(dirsort, "2", _("size"));
40        addchoicebox(dirsort, "3", _("reverse size"));
41        addchoicebox(dirsort, "4", _("date"));
42        addchoicebox(dirsort, "5", _("reverse date"));
43        setchoiceboxselection(dirsort, getconfig("mc_pp_dirsort", NULL));
44
45        addchoicebox(view, "0", _("fast"));
46        addchoicebox(view, "1", _("big"));     
47        addchoicebox(view, "2", _("cover"));
48//      addchoicebox(view, "3", _("fullcover"));               
49        addchoicebox(view, "4", _("size (default)"));
50        addchoicebox(view, "5", _("datetime"));
51
52        setchoiceboxselection(view, getconfig("mc_pp_view", NULL));
53
54        addchoicebox(sound, "http://mp3.89.0rtl.de:80/", _("Jump"));
55        addchoicebox(sound, "http://stream.mth-house.de:8500/", _("MTH House"));
56        addchoicebox(sound, "http://stream.laut.fm:80/radiofunclub", _("Radio Funclub"));
57        addchoicebox(sound, "http://stream.laut.fm:80/radiofunclub80", _("Radio Funclub 80s"));
58        addchoicebox(sound, "http://www.antennestream.at:8002/", _("Antenne Kaernten"));       
59        addchoicebox(sound, "http://webhost110.gtk.hu:9008/", _("Onkelz Rock Radio"));
60        addchoicebox(sound, "http://c22033-l.i.core.cdn.streamfarm.net/22004mdrjump/live/3087mdr_jump/live_de_128.mp3", _("Jump"));
61        addchoicebox(sound, "http://scfire-ntc-aa01.stream.aol.com:80/stream/1081", _("Raute Musik FM"));
62        addchoicebox(sound, "off", _("off"));
63        setchoiceboxselection(sound, getconfig("mc_pp_sound", NULL));
64
65        changeinput(interval, "10\n15\n20\n30\n40\n50\n60\n70\n80\n90\n100\n2\n5");
66        setchoiceboxselection(interval, getconfig("mc_pp_interval", NULL));
67
68        changeinput(defaultdir, getconfig("mc_pp_defaultdir", NULL));
69
70        addchoicebox(uselastdir, "0", _("no"));
71        addchoicebox(uselastdir, "1", _("yes"));
72        setchoiceboxselection(uselastdir, getconfig("mc_pp_uselastdir", NULL));
73
74        drawscreen(mc_pictureplayer_settings, 0, 0);
75        addscreenrc(mc_pictureplayer_settings, listbox);
76
77        tmp = listbox->select;
78        while(1)
79        {
80                addscreenrc(mc_pictureplayer_settings, tmp);
81                rcret = waitrc(mc_pictureplayer_settings, 0, 0);
82                tmp = listbox->select;
83       
84                if(rcret == getrcconfigint("rcexit", NULL)) break;
85                if(rcret == getrcconfigint("rcok", NULL))
86                {
87                        addconfigscreen("mc_pp_dirsort", dirsort);
88                        addconfigscreen("mc_pp_view", view);
89                        addconfigscreen("mc_pp_sound", sound);
90                        addconfigscreen("mc_pp_interval", interval);
91                        addconfigscreen("mc_pp_showpictitle", showpictitle);
92                        addconfigscreen("mc_pp_picdenom", picdenom);
93                        addconfigscreen("mc_pp_picquality", picquality);                       
94                        addconfigscreen("mc_pp_pichwdecode", pichwdecode);
95                        addconfigscreen("mc_pp_defaultdir", defaultdir);
96                        addconfigscreencheck("mc_pp_uselastdir", uselastdir, NULL);
97                        break;
98                }
99                else if(rcret == getrcconfigint("rcred", NULL))
100                {
101                        struct skin* screen = getscreen("networkmenu");
102                        menu(screen);
103                        drawscreen(mc_pictureplayer_settings, 0, 0);
104                }
105                else if(rcret == getrcconfigint("rcgreen", NULL))
106                {
107                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "defaultdir") == 0)
108                        {
109                                clearscreen(mc_pictureplayer_settings);
110                                ret = screendir(listbox->select->ret, "", NULL, NULL, NULL, NULL, 0, "SELECT", 0, NULL, 0, NULL, 0, 750, 0, 650, 0, 0);
111                                if(ret != NULL)
112                                        changeinput(listbox->select, ret);
113                                free(ret);
114
115                                drawscreen(mc_pictureplayer_settings, 0, 0);
116                        }
117                }
118        }
119
120        delownerrc(mc_pictureplayer_settings);
121        clearscreen(mc_pictureplayer_settings);
122}
123
124#endif
Note: See TracBrowser for help on using the repository browser.