source: titan/titan/settings_redbutton.h @ 45014

Last change on this file since 45014 was 42840, checked in by obi, 6 years ago

add favlist to red/blue button key menu

File size: 1.8 KB
Line 
1#ifndef SETTINGS_REDBUTTON_H
2#define SETTINGS_REDBUTTON_H
3
4void screensettings_redbutton()
5{
6        char* skintitle = _("Red Key Action - Setup");
7        struct skin* plugin = getscreen("plugin");
8        struct skin* child = plugin->child;
9        char* tmpstr = NULL;
10        struct menulist* mlist = NULL, *mbox = NULL;
11
12        addmenulist(&mlist, "Extensions List", _("Extensions List"), NULL, 0, 0);
13        addmenulist(&mlist, "Auto Resolution", _("Auto Resolution"), NULL, 0, 0);
14        if(checkemu() == 1)
15                addmenulist(&mlist, "Softcam Panel", _("Softcam Panel"), NULL, 0, 0);
16        addmenulist(&mlist, "Bouquet List", _("Bouquet List"), NULL, 0, 0);
17        addmenulist(&mlist, "TV/Radio", _("TV/Radio"), NULL, 0, 0);
18        addmenulist(&mlist, "Multi EPG", _("Multi EPG"), NULL, 0, 0);
19        addmenulist(&mlist, "Graphic Multi EPG", _("Graphic Multi EPG"), NULL, 0, 0);
20        addmenulist(&mlist, "Sleep Timer", _("Sleep Timer"), NULL, 0, 0);
21        addmenulist(&mlist, "Child Protection", _("Child Protection"), NULL, 0, 0);
22        addmenulist(&mlist, "Subchannel", _("Subchannel"), NULL, 0, 0);
23        addmenulist(&mlist, "Downloads", _("Downloads"), NULL, 0, 0);
24
25        while(child != NULL)
26        {
27        if(child->del == PLUGINDELMARK && (status.security >= 1 || (status.security == 0 && checkpluginskip(child->name) == 0)))
28                        addmenulist(&mlist, child->name, _(child->name), child->pic, 0, 0);
29                child = child->next;
30        }
31
32        char* redkey = getconfig("redkey", NULL);
33        debug(60, "Redkey: %s (default)", redkey);
34       
35        setmenulistdefault(mlist, redkey);
36        mbox = menulistbox(mlist, NULL, skintitle, _("Select a function for the red button"), NULL, NULL, 1, 0);
37
38        if(mbox == NULL)
39        {
40                free(tmpstr); tmpstr = NULL;
41                return;
42        }
43        debug(60, "(new) Redkey=%s", mbox->name);
44
45        if(ostrcmp(mbox->name, "Extensions List") == 0)
46                delconfig("redkey");
47        else
48                addconfig("redkey", mbox->name);
49
50        freemenulist(mlist, 1); mlist = NULL;
51        free(tmpstr); tmpstr = NULL;
52        return;
53}
54
55#endif
Note: See TracBrowser for help on using the repository browser.