source: titan/plugins/tithek/tithek_settings.h @ 22712

Last change on this file since 22712 was 22712, checked in by obi, 10 years ago

[tithek] add xxx filter in menu

File size: 2.5 KB
Line 
1#ifndef TITHEK_SETTINGS_H
2#define TITHEK_SETTINGS_H
3
4void screentithek_settings()
5{
6        int rcret = 0;
7        struct skin* tmp = NULL;
8
9        struct skin* tithek_settings = getscreen("tithek_settings");
10        struct skin* listbox = getscreennode(tithek_settings, "listbox");
11        struct skin* view = getscreennode(tithek_settings, "view");
12        struct skin* cover = getscreennode(tithek_settings, "cover");
13        struct skin* pay = getscreennode(tithek_settings, "pay");
14        struct skin* picratio = getscreennode(tithek_settings, "picratio");
15        struct skin* hidxxx = getscreennode(tithek_settings, "hidxxx");
16
17        addchoicebox(cover, "0", _("show auto entrys"));
18        addchoicebox(cover, "1", _("show 2 entrys"));
19        addchoicebox(cover, "2", _("show 6 entrys"));
20        addchoicebox(cover, "3", _("show 12 entrys")); 
21        addchoicebox(cover, "4", _("show 20 entrys"));
22        addchoicebox(cover, "5", _("show 30 entrys"));
23        setchoiceboxselection(cover, getconfig("tithek_cover", NULL));
24
25        addchoicebox(view, "0", _("show auto entrys"));
26        addchoicebox(view, "1", _("show 2 entrys"));
27        addchoicebox(view, "2", _("show 6 entrys"));
28        addchoicebox(view, "3", _("show 12 entrys"));   
29        addchoicebox(view, "4", _("show 20 entrys"));
30        addchoicebox(view, "5", _("show 30 entrys"));
31        setchoiceboxselection(view, getconfig("tithek_view", NULL));
32
33        addchoicebox(picratio, "0", _("no"));
34        addchoicebox(picratio, "1", _("yes")); 
35        setchoiceboxselection(picratio, getconfig("tithek_pic_ratio", NULL));
36
37        addchoicebox(pay, "0", _("no"));
38        addchoicebox(pay, "1", _("yes"));       
39        setchoiceboxselection(pay, getconfig("tithek_pay", NULL));
40
41        addchoicebox(hidxxx, "0", _("no"));
42        addchoicebox(hidxxx, "1", _("yes"));   
43        setchoiceboxselection(hidxxx, getconfig("tithek_hid_xxx", NULL));
44
45        drawscreen(tithek_settings, 0, 0);
46        addscreenrc(tithek_settings, listbox);
47
48        tmp = listbox->select;
49        while(1)
50        {
51                addscreenrc(tithek_settings, tmp);
52                rcret = waitrc(tithek_settings, 0, 0);
53                tmp = listbox->select;
54       
55                if(rcret == getrcconfigint("rcexit", NULL)) break;
56                if(rcret == getrcconfigint("rcok", NULL))
57                {
58                        addconfigscreencheck("tithek_view", view, NULL);
59                        addconfigscreencheck("tithek_cover", cover, NULL);
60                        addconfigscreencheck("tithek_pay", pay, NULL);
61                        addconfigscreencheck("tithek_pic_ratio", picratio, NULL);
62                        addconfigscreencheck("tithek_hid_xxx", hidxxx, NULL);
63                        break;
64                }
65                else if(rcret == getrcconfigint("rcgreen", NULL))
66                {
67                        screenscreensaveradjust();
68                        drawscreen(tithek_settings, 0, 0);
69                }       
70  }
71
72        delownerrc(tithek_settings);
73        clearscreen(tithek_settings);
74}
75
76#endif
Note: See TracBrowser for help on using the repository browser.