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

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

fix

File size: 3.1 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        struct skin* mlehd_user = getscreennode(tithek_settings, "mlehd_user");
17        struct skin* mlehd_pass = getscreennode(tithek_settings, "mlehd_pass");
18
19        addchoicebox(cover, "0", _("show auto entrys"));
20        addchoicebox(cover, "1", _("show 2 entrys"));
21        addchoicebox(cover, "2", _("show 6 entrys"));
22        addchoicebox(cover, "3", _("show 12 entrys")); 
23        addchoicebox(cover, "4", _("show 20 entrys"));
24        addchoicebox(cover, "5", _("show 30 entrys"));
25        addchoicebox(cover, "6", _("show in list"));
26        setchoiceboxselection(cover, getconfig("tithek_cover", NULL));
27
28        addchoicebox(view, "0", _("show auto entrys"));
29        addchoicebox(view, "1", _("show 2 entrys"));
30        addchoicebox(view, "2", _("show 6 entrys"));
31        addchoicebox(view, "3", _("show 12 entrys"));   
32        addchoicebox(view, "4", _("show 20 entrys"));
33        addchoicebox(view, "5", _("show 30 entrys"));
34        addchoicebox(view, "6", _("show in list"));
35        setchoiceboxselection(view, getconfig("tithek_view", NULL));
36
37        addchoicebox(picratio, "0", _("no"));
38        addchoicebox(picratio, "1", _("yes")); 
39        setchoiceboxselection(picratio, getconfig("tithek_pic_ratio", NULL));
40
41        addchoicebox(pay, "0", _("no"));
42        addchoicebox(pay, "1", _("yes"));       
43        setchoiceboxselection(pay, getconfig("tithek_pay", NULL));
44
45        addchoicebox(hidxxx, "0", _("no"));
46        addchoicebox(hidxxx, "1", _("yes"));   
47        setchoiceboxselection(hidxxx, getconfig("tithek_hid_xxx", NULL));
48
49        changemask(mlehd_user, "abcdefghijklmnopqrstuvwxyz");
50        changeinput(mlehd_user, getconfig("mlehd_user", NULL));
51
52        changemask(mlehd_pass, "abcdefghijklmnopqrstuvwxyz");
53        changeinput(mlehd_pass, getconfig("mlehd_pass", NULL));
54
55        drawscreen(tithek_settings, 0, 0);
56        addscreenrc(tithek_settings, listbox);
57
58        tmp = listbox->select;
59        while(1)
60        {
61                addscreenrc(tithek_settings, tmp);
62                rcret = waitrc(tithek_settings, 0, 0);
63                tmp = listbox->select;
64       
65                if(rcret == getrcconfigint("rcexit", NULL)) break;
66                if(rcret == getrcconfigint("rcok", NULL))
67                {
68                        addconfigscreencheck("tithek_view", view, NULL);
69                        addconfigscreencheck("tithek_cover", cover, NULL);
70                        addconfigscreencheck("tithek_pay", pay, NULL);
71                        addconfigscreencheck("tithek_pic_ratio", picratio, NULL);
72                        addconfigscreencheck("tithek_hid_xxx", hidxxx, NULL);
73                        addconfigscreen("mlehd_user", mlehd_user);
74                        addconfigscreen("mlehd_pass", mlehd_pass);
75                        break;
76                }
77                else if(rcret == getrcconfigint("rcgreen", NULL))
78                {
79                        screenscreensaveradjust();
80                        drawscreen(tithek_settings, 0, 0);
81                }       
82  }
83
84        delownerrc(tithek_settings);
85        clearscreen(tithek_settings);
86}
87
88#endif
Note: See TracBrowser for help on using the repository browser.