source: titan/titan/settings_mediabutton.h @ 27990

Last change on this file since 27990 was 27990, checked in by obi, 10 years ago

add lost file

File size: 1.4 KB
Line 
1#ifndef SETTINGS_MEDIABUTTON_H
2#define SETTINGS_MEDIABUTTON_H
3
4void screensettings_mediabutton()
5{
6        char* skintitle = _("Media Key Action - Setup");
7        struct menulist* mlist = NULL, *mbox = NULL;
8
9// needed for translation
10        char* tmptxt = NULL;
11        tmptxt = ostrcat(tmptxt, _("MediaCenter"), 1, 0);
12        tmptxt = ostrcat(tmptxt, _("VideoPlayer"), 1, 0);
13        tmptxt = ostrcat(tmptxt, _("AudioPlayer"), 1, 0);
14        tmptxt = ostrcat(tmptxt, _("PicturePlayer"), 1, 0);
15        tmptxt = ostrcat(tmptxt, _("MediaThek"), 1, 0);
16        tmptxt = ostrcat(tmptxt, _("MiniPlayer"), 1, 0);
17        free(tmptxt), tmptxt = NULL;
18
19        addmenulist(&mlist, "MediaCenter List", NULL, NULL, 0, 0);
20        addmenulist(&mlist, "VideoPlayer", NULL, NULL, 0, 0);
21        addmenulist(&mlist, "AudioPlayer", NULL, NULL, 0, 0);
22        addmenulist(&mlist, "PicturePlayer", NULL, NULL, 0, 0);
23        addmenulist(&mlist, "MediaThek", NULL, NULL, 0, 0);
24        addmenulist(&mlist, "MiniPlayer", NULL, NULL, 0, 0);
25        addmenulist(&mlist, "RecordPlayer", NULL, NULL, 0, 0);
26
27        char* mediakey = getconfig("mediakey", NULL);
28        debug(60, "Mediakey: %s (default)", mediakey);
29       
30        setmenulistdefault(mlist, mediakey);
31        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);
32
33        if(mbox == NULL)
34        {
35                free(tmpstr); tmpstr = NULL;
36                return;
37        }
38        debug(60, "(new) Mediakey=%s", mbox->name);
39
40        freemenulist(mlist, 1); mlist = NULL;
41        free(tmpstr); tmpstr = NULL;
42        return;
43}
44
45#endif
Note: See TracBrowser for help on using the repository browser.