source: titan/titan/epgsettings.h @ 10958

Last change on this file since 10958 was 10958, checked in by nit, 11 years ago

[titan] change width/height from screendir

File size: 3.7 KB
Line 
1#ifndef EPGSETTINGS_H
2#define EPGSETTINGS_H
3
4void screenepgsettings()
5{
6        int rcret = 0;
7        char* ret = NULL;
8        struct skin* epgsettings = getscreen("epgsettings");
9        struct skin* listbox = getscreennode(epgsettings, "listbox");
10        struct skin *epgpath = getscreennode(epgsettings, "epgpath");
11        struct skin* epgdays = getscreennode(epgsettings, "epgdays");
12        struct skin* epgdel = getscreennode(epgsettings, "epgdel");
13        struct skin* epgscreen = getscreennode(epgsettings, "epgscreen");
14        struct skin* epgfreespace = getscreennode(epgsettings, "epgfreespace");
15        struct skin* epglistmode = getscreennode(epgsettings, "epglistmode");
16        struct skin* epgrefresh = getscreennode(epgsettings, "epgrefresh");
17        struct skin* epgbutton = getscreennode(epgsettings, "epgbutton");
18        struct skin* tmp = NULL;
19
20        changeinput(epgpath, getconfig("epg_path", NULL));
21
22        changeinput(epgdays, "0\n2\n4\n6\n8\n10\n12\n14\n16\n18\n20");
23        setchoiceboxselection(epgdays, getconfig("epg_days", NULL));
24
25        addchoicebox(epgdel, "0", _("no"));
26        addchoicebox(epgdel, "1", _("yes"));
27        setchoiceboxselection(epgdel, getconfig("epg_del", NULL));
28
29        addchoicebox(epgscreen, "0", _("Channel EPG"));
30        addchoicebox(epgscreen, "1", _("Single EPG"));
31        addchoicebox(epgscreen, "2", _("Multi EPG"));
32        addchoicebox(epgscreen, "3", _("Graphic Multi EPG"));
33        setchoiceboxselection(epgscreen, getconfig("epg_screen", NULL));
34
35        changeinput(epgfreespace, "50\n100\n200\n300\n400\n500\n600\n700\n800\n900\n1000");
36        setchoiceboxselection(epgfreespace, getconfig("epgfreespace", NULL));
37
38        addchoicebox(epglistmode, "0", _("deaktiv"));
39        addchoicebox(epglistmode, "1", _("scan"));
40        addchoicebox(epglistmode, "2", _("whitelist"));
41        addchoicebox(epglistmode, "2", _("scan and whitelist"));
42        setchoiceboxselection(epglistmode, getconfig("epg_listmode", NULL));
43
44        changeinput(epgrefresh, "deaktiv\n01:00\n02:00\n03:00\n04:00\n05:00\n06:00\n07:00\n08:00\n09:00\n10:00\n11:00\n12:00\n13:00\n14:00\n15:00\n16:00\n17:00\n18:00\n19:00\n20:00\n21:00\n22:00\n23:00\n24:00");
45        setchoiceboxselection(epgrefresh, getconfig("epg_refreshtime", NULL));
46       
47        addchoicebox(epgbutton, "0", _("Single EPG"));           
48        addchoicebox(epgbutton, "1", _("Multi EPG"));           
49        setchoiceboxselection(epgbutton, getconfig("epgbutton", NULL));
50
51        drawscreen(epgsettings, 0);
52        addscreenrc(epgsettings, listbox);
53
54        tmp = listbox->select;
55        while(1)
56        {
57                addscreenrc(epgsettings, tmp);
58                rcret = waitrc(epgsettings, 0, 0);
59                tmp = listbox->select;
60
61                if(rcret == getrcconfigint("rcexit", NULL)) break;
62                if(rcret == getrcconfigint("rcgreen", NULL))
63                {
64                        addconfigscreen("epg_path", epgpath);
65                        addconfigscreen("epg_days", epgdays);
66                        status.epgdays = getconfigint("epg_days", NULL);
67                        addconfigscreen("epg_del", epgdel);
68                        addconfigscreen("epg_screen", epgscreen);
69                        addconfigscreen("epgfreespace", epgfreespace);
70                        addconfigscreencheck("epg_listmode", epglistmode, "0");
71                        status.epglistmode = getconfigint("epg_listmode", NULL);
72                        addconfigscreencheck("epg_refreshtime", epgrefresh, "deaktiv");
73                        addconfigscreencheck("epgbutton", epgbutton, "0");
74                        break;
75                }
76                if(rcret == getrcconfigint("rcok", NULL))
77                {
78                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgpath") == 0)
79                        {
80                                clearscreen(epgsettings);
81                                ret = screendir(listbox->select->ret, "", NULL, NULL, NULL, "OK", 0, NULL, 0, NULL, 0, NULL, 0, 700, 0, 650, 0, 0);
82                                if(ret != NULL)
83                                        changeinput(listbox->select, ret);
84                                free(ret);
85
86                                drawscreen(epgsettings, 0);
87                        }
88                }
89                if(rcret == getrcconfigint("rcred", NULL))
90                {
91                        resetepg();
92                        textbox(_("Message"), _("EPG resetet and now clear."), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
93                        drawscreen(epgsettings, 0);
94                }
95        }
96
97        delownerrc(epgsettings);
98        clearscreen(epgsettings);
99}
100
101#endif
Note: See TracBrowser for help on using the repository browser.