source: titan/titan/settings_redbutton.h @ 23286

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

[titan] cleanup

File size: 1.6 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", NULL, NULL, 0, 0);
13        addmenulist(&mlist, "Auto Resolution", NULL, NULL, 0, 0);
14        if(checkemu() == 1)
15                addmenulist(&mlist, "Softcam Panel", NULL, NULL, 0, 0);
16        addmenulist(&mlist, "TV / Radio Switch", NULL, NULL, 0, 0);
17        addmenulist(&mlist, "Multi EPG", NULL, NULL, 0, 0);
18        addmenulist(&mlist, "Graphic Multi EPG", NULL, NULL, 0, 0);
19        addmenulist(&mlist, "Sleep Timer", NULL, NULL, 0, 0);
20        addmenulist(&mlist, "Child Protection", NULL, NULL, 0, 0);
21        addmenulist(&mlist, "Subchannel", NULL, NULL, 0, 0);
22        addmenulist(&mlist, "Downloads", NULL, 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, NULL, 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, 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.