1 | #ifndef SETTINGS_MEDIABUTTON_H |
---|
2 | #define SETTINGS_MEDIABUTTON_H |
---|
3 | |
---|
4 | void screensettings_mediabutton() |
---|
5 | { |
---|
6 | char* skintitle = _("Media Key Action - Setup"); |
---|
7 | struct menulist* mlist = NULL, *mbox = NULL; |
---|
8 | struct skin* plugin = getscreen("plugin"); |
---|
9 | struct skin* child = plugin->child; |
---|
10 | |
---|
11 | addmenulist(&mlist, "Media Plugins List", _("Media Plugins List"), NULL, 0, 0); |
---|
12 | addmenulist(&mlist, "Record Player", _("Record Player"), NULL, 0, 0); |
---|
13 | |
---|
14 | while(child != NULL) |
---|
15 | { |
---|
16 | if(child->del == PLUGINDELMARK && (status.security >= 1 || (status.security == 0 && checkpluginskip(child->name) == 0))) |
---|
17 | { |
---|
18 | if(ostrcmp(child->name, "Media Center") == 0) |
---|
19 | { |
---|
20 | addmenulist(&mlist, child->name, _(child->name), child->pic, 0, 0); |
---|
21 | } |
---|
22 | else if(ostrcmp(child->name, "TiTan Mediathek") == 0) |
---|
23 | { |
---|
24 | addmenulist(&mlist, child->name, _(child->name), child->pic, 0, 0); |
---|
25 | } |
---|
26 | else if(ostrcmp(child->name, "Titan Media Center") == 0) |
---|
27 | { |
---|
28 | addmenulist(&mlist, child->name, _(child->name), child->pic, 0, 0); |
---|
29 | } |
---|
30 | else if(ostrcmp(child->name, "GmediaRender") == 0) |
---|
31 | { |
---|
32 | addmenulist(&mlist, child->name, _(child->name), child->pic, 0, 0); |
---|
33 | } |
---|
34 | else if(ostrcmp(child->name, "DVD Player") == 0) |
---|
35 | { |
---|
36 | addmenulist(&mlist, child->name, _(child->name), child->pic, 0, 0); |
---|
37 | } |
---|
38 | } |
---|
39 | child = child->next; |
---|
40 | } |
---|
41 | |
---|
42 | addmenulist(&mlist, "Media Player", _("Media Player"), NULL, 0, 0); |
---|
43 | |
---|
44 | char* mediakey = getconfig("mediakey", NULL); |
---|
45 | debug(60, "Mediakey: %s (default)", mediakey); |
---|
46 | |
---|
47 | setmenulistdefault(mlist, mediakey); |
---|
48 | mbox = menulistbox(mlist, NULL, skintitle, _("Choose your Media plugin item from the following list and show it so the plugin button"), NULL, NULL, 1, 0); |
---|
49 | |
---|
50 | if(mbox == NULL) |
---|
51 | { |
---|
52 | return; |
---|
53 | } |
---|
54 | debug(60, "(new) Mediakey=%s", mbox->name); |
---|
55 | |
---|
56 | addconfig("mediakey", mbox->name); |
---|
57 | |
---|
58 | freemenulist(mlist, 1); mlist = NULL; |
---|
59 | return; |
---|
60 | } |
---|
61 | |
---|
62 | #endif |
---|