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
RevLine 
[7497]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");
[7925]13        struct skin* epgscreen = getscreennode(epgsettings, "epgscreen");
[7975]14        struct skin* epgfreespace = getscreennode(epgsettings, "epgfreespace");
[8976]15        struct skin* epglistmode = getscreennode(epgsettings, "epglistmode");
[9005]16        struct skin* epgrefresh = getscreennode(epgsettings, "epgrefresh");
[10606]17        struct skin* epgbutton = getscreennode(epgsettings, "epgbutton");
[7497]18        struct skin* tmp = NULL;
19
[7506]20        changeinput(epgpath, getconfig("epg_path", NULL));
[7497]21
22        changeinput(epgdays, "0\n2\n4\n6\n8\n10\n12\n14\n16\n18\n20");
[7506]23        setchoiceboxselection(epgdays, getconfig("epg_days", NULL));
[7497]24
25        addchoicebox(epgdel, "0", _("no"));
26        addchoicebox(epgdel, "1", _("yes"));
[7506]27        setchoiceboxselection(epgdel, getconfig("epg_del", NULL));
[7497]28
[7925]29        addchoicebox(epgscreen, "0", _("Channel EPG"));
30        addchoicebox(epgscreen, "1", _("Single EPG"));
31        addchoicebox(epgscreen, "2", _("Multi EPG"));
[10655]32        addchoicebox(epgscreen, "3", _("Graphic Multi EPG"));
[7925]33        setchoiceboxselection(epgscreen, getconfig("epg_screen", NULL));
[7975]34
35        changeinput(epgfreespace, "50\n100\n200\n300\n400\n500\n600\n700\n800\n900\n1000");
36        setchoiceboxselection(epgfreespace, getconfig("epgfreespace", NULL));
[8601]37
[8976]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
[9005]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));
[10605]46       
47        addchoicebox(epgbutton, "0", _("Single EPG"));           
48        addchoicebox(epgbutton, "1", _("Multi EPG"));           
49        setchoiceboxselection(epgbutton, getconfig("epgbutton", NULL));
[9005]50
[7975]51        drawscreen(epgsettings, 0);
[7497]52        addscreenrc(epgsettings, listbox);
53
54        tmp = listbox->select;
[7975]55        while(1)
56        {
[7497]57                addscreenrc(epgsettings, tmp);
[8247]58                rcret = waitrc(epgsettings, 0, 0);
[7497]59                tmp = listbox->select;
60
[7506]61                if(rcret == getrcconfigint("rcexit", NULL)) break;
[7623]62                if(rcret == getrcconfigint("rcgreen", NULL))
[7497]63                {
64                        addconfigscreen("epg_path", epgpath);
65                        addconfigscreen("epg_days", epgdays);
[8318]66                        status.epgdays = getconfigint("epg_days", NULL);
[7497]67                        addconfigscreen("epg_del", epgdel);
[7925]68                        addconfigscreen("epg_screen", epgscreen);
[7975]69                        addconfigscreen("epgfreespace", epgfreespace);
[8976]70                        addconfigscreencheck("epg_listmode", epglistmode, "0");
71                        status.epglistmode = getconfigint("epg_listmode", NULL);
[9005]72                        addconfigscreencheck("epg_refreshtime", epgrefresh, "deaktiv");
[10605]73                        addconfigscreencheck("epgbutton", epgbutton, "0");
[7497]74                        break;
75                }
[7506]76                if(rcret == getrcconfigint("rcok", NULL))
[7497]77                {
78                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgpath") == 0)
79                        {
80                                clearscreen(epgsettings);
[10958]81                                ret = screendir(listbox->select->ret, "", NULL, NULL, NULL, "OK", 0, NULL, 0, NULL, 0, NULL, 0, 700, 0, 650, 0, 0);
[7754]82                                if(ret != NULL)
83                                        changeinput(listbox->select, ret);
[7497]84                                free(ret);
[8601]85
[7975]86                                drawscreen(epgsettings, 0);
[7497]87                        }
88                }
[9754]89                if(rcret == getrcconfigint("rcred", NULL))
90                {
91                        resetepg();
[10256]92                        textbox(_("Message"), _("EPG resetet and now clear."), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, NULL, 0, 600, 200, 0, 0);
[9754]93                        drawscreen(epgsettings, 0);
94                }
[7975]95        }
[7497]96
97        delownerrc(epgsettings);
98        clearscreen(epgsettings);
99}
100
101#endif
Note: See TracBrowser for help on using the repository browser.