source: titan/titan/settings_redbutton.h @ 39052

Last change on this file since 39052 was 35450, checked in by Stephan, 9 years ago

cleanup

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, "TV/Radio", _("TV/Radio"), NULL, 0, 0);
17        addmenulist(&mlist, "Multi EPG", _("Multi EPG"), NULL, 0, 0);
18        addmenulist(&mlist, "Graphic Multi EPG", _("Graphic Multi EPG"), NULL, 0, 0);
19        addmenulist(&mlist, "Sleep Timer", _("Sleep Timer"), NULL, 0, 0);
20        addmenulist(&mlist, "Child Protection", _("Child Protection"), NULL, 0, 0);
21        addmenulist(&mlist, "Subchannel", _("Subchannel"), NULL, 0, 0);
22        addmenulist(&mlist, "Downloads", _("Downloads"), NULL, 0, 0);
23
24        while(child != NULL)
25        {
26        if(child->del == PLUGINDELMARK && (status.security >= 1 || (status.security == 0 && checkpluginskip(child->name) == 0)))
27                        addmenulist(&mlist, child->name, _(child->name), child->pic, 0, 0);
28                child = child->next;
29        }
30
31        char* redkey = getconfig("redkey", NULL);
32        debug(60, "Redkey: %s (default)", redkey);
33       
34        setmenulistdefault(mlist, redkey);
35        mbox = menulistbox(mlist, NULL, skintitle, _("Select a function for the red button"), NULL, NULL, 1, 0);
36
37        if(mbox == NULL)
38        {
39                free(tmpstr); tmpstr = NULL;
40                return;
41        }
42        debug(60, "(new) Redkey=%s", mbox->name);
43
44        if(ostrcmp(mbox->name, "Extensions List") == 0)
45                delconfig("redkey");
46        else
47                addconfig("redkey", mbox->name);
48
49        freemenulist(mlist, 1); mlist = NULL;
50        free(tmpstr); tmpstr = NULL;
51        return;
52}
53
54#endif
Note: See TracBrowser for help on using the repository browser.