source: titan/titan/settings_pluginbutton.h @ 33139

Last change on this file since 33139 was 33139, checked in by obi, 9 years ago

update demo stuff

File size: 1.9 KB
Line 
1#ifndef SETTINGS_PLUGINBUTTON_H
2#define SETTINGS_PLUGINBUTTON_H
3
4void screensettings_pluginbutton()
5{
6        char* skintitle = _("Plugin 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 Switch", _("TV / Radio Switch"), 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* pluginkey = getconfig("pluginkey", NULL);
32        debug(60, "Pluginkey: %s (default)", pluginkey);
33       
34        setmenulistdefault(mlist, pluginkey);
35        mbox = menulistbox(mlist, NULL, skintitle, _("Choose your plugin / menu item from the following list and show it so the plugin button"), NULL, NULL, 1, 0);
36
37        if(mbox == NULL)
38        {
39                free(tmpstr); tmpstr = NULL;
40                return;
41        }
42        debug(60, "(new) Pluginkey=%s", mbox->name);
43
44        if(ostrcmp(mbox->name, _("Extensions List")) == 0)
45                delconfig("pluginkey");
46        else
47                addconfig("pluginkey", 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.