source: titan/titan/skinadjust.h @ 38791

Last change on this file since 38791 was 38791, checked in by obi, 7 years ago

skinadjust add gepg selection

File size: 45.4 KB
Line 
1#ifndef SKINADJUST_H
2#define SKINADJUST_H
3
4void screenskinadjust()
5{
6        int rcret = 0, oleftoffset = 0, orightoffset = 0, otopoffset = 0, obottomoffset = 0, reboot = 0;
7        char* tmpstr = NULL;
8        struct skin* skinadjust = getscreen("skinadjust");
9        struct skin* listbox = getscreennode(skinadjust, "listbox");
10        struct skin* fontsizeadjust = getscreennode(skinadjust, "fontsizeadjust");
11        struct skin* listboxselecttype = getscreennode(skinadjust, "listboxselecttype");
12        struct skin* osdtransparent = getscreennode(skinadjust, "osdtransparent");
13        struct skin* blinkoff = getscreennode(skinadjust, "blinkoff");
14        struct skin* leftoffset = getscreennode(skinadjust, "leftoffset");
15        struct skin* rightoffset = getscreennode(skinadjust, "rightoffset");
16        struct skin* topoffset = getscreennode(skinadjust, "topoffset");
17        struct skin* bottomoffset = getscreennode(skinadjust, "bottomoffset");
18        struct skin* showrecfreesize = getscreennode(skinadjust, "showrecfreesize");
19        struct skin* listboxselect = getscreennode(skinadjust, "listboxselect");
20        struct skin* tithek_selectcol = getscreennode(skinadjust, "tithek_selectcol");
21        struct skin* filelistselect = getscreennode(skinadjust, "filelistselect");
22        struct skin* buttonbar_bgcol = getscreennode(skinadjust, "buttonbar_bgcol");
23        struct skin* buttonbar_bgcol2 = getscreennode(skinadjust, "buttonbar_bgcol2");
24        struct skin* buttonbar_bordercol = getscreennode(skinadjust, "buttonbar_bordercol");
25        struct skin* buttonbar_fontcol = getscreennode(skinadjust, "buttonbar_fontcol");
26        struct skin* titlebar_bgcol = getscreennode(skinadjust, "titlebar_bgcol");
27        struct skin* titlebar_bgcol2 = getscreennode(skinadjust, "titlebar_bgcol2");
28        struct skin* titlebar_bordercol = getscreennode(skinadjust, "titlebar_bordercol");
29        struct skin* titlebar_fontcol = getscreennode(skinadjust, "titlebar_fontcol");
30        struct skin* bgcol = getscreennode(skinadjust, "bgcol");
31        struct skin* bgcol2 = getscreennode(skinadjust, "bgcol2");
32        struct skin* fontcol = getscreennode(skinadjust, "fontcol");
33        struct skin* bordercol = getscreennode(skinadjust, "bordercol");
34        struct skin* progresscol = getscreennode(skinadjust, "progresscol");
35        struct skin* titlebgcol = getscreennode(skinadjust, "titlebgcol");
36        struct skin* markcol = getscreennode(skinadjust, "markcol");
37        struct skin* okcol = getscreennode(skinadjust, "okcol");
38        struct skin* exitcol = getscreennode(skinadjust, "exitcol");
39        struct skin* deaktivcol = getscreennode(skinadjust, "deaktivcol");
40        struct skin* cpmode_bgcol = getscreennode(skinadjust, "cpmode_bgcol");
41        struct skin* cpmode_fontcol = getscreennode(skinadjust, "cpmode_fontcol");
42        struct skin* editmode_bgcol = getscreennode(skinadjust, "editmode_bgcol");
43        struct skin* editmode_fontcol = getscreennode(skinadjust, "editmode_fontcol");
44        struct skin* mvmode_bgcol = getscreennode(skinadjust, "mvmode_bgcol");
45        struct skin* mvmode_fontcol = getscreennode(skinadjust, "mvmode_fontcol");
46        struct skin* protectmode_bgcol = getscreennode(skinadjust, "protectmode_bgcol");
47        struct skin* protectmode_fontcol = getscreennode(skinadjust, "protectmode_fontcol");
48        struct skin* rec_progress = getscreennode(skinadjust, "rec_progress");
49        struct skin* epgcol1 = getscreennode(skinadjust, "epgcol1");
50        struct skin* epgcol2 = getscreennode(skinadjust, "epgcol2");
51        struct skin* epgcol3 = getscreennode(skinadjust, "epgcol3");
52        struct skin* emuaktivecol = getscreennode(skinadjust, "emuaktivecol");
53        struct skin* emurunningcol = getscreennode(skinadjust, "emurunningcol");
54        struct skin* favcol = getscreennode(skinadjust, "favcol");
55        struct skin* minitv = getscreennode(skinadjust, "choiceminitv");
56
57        struct skin* infobar_sel = getscreennode(skinadjust, "infobar_sel");
58        struct skin* infobar2_sel = getscreennode(skinadjust, "infobar2_sel");
59        struct skin* channellist_sel = getscreennode(skinadjust, "channellist_sel");
60        struct skin* gmultiepg_sel = getscreennode(skinadjust, "gmultiepg_sel");
61
62        struct skin* filelist = getscreennode(skinadjust, "filelist");
63        struct skin* skinstyle_sel = getscreennode(skinadjust, "skinstyle_sel");
64        struct skin* node = NULL;
65
66//      struct skin* pic1 = getscreennode(skinadjust, "pic1");
67//      struct skin* pic2 = getscreennode(skinadjust, "pic2");
68        struct skin* b7 = getscreennode(skinadjust, "b7");
69        struct skin* load = getscreen("loading");
70
71        struct skin* tmp = NULL;
72
73start:
74
75        changeinput(fontsizeadjust, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n-15\n-14\n-13\n-12\n-11\n-10\n-9\n-8\n-7\n-6\n-5\n-4\n-3\n-2\n-1");
76        setchoiceboxselection(fontsizeadjust, getskinconfig("fontsizeadjust", NULL));
77
78        addchoicebox(listboxselecttype, "0", _("border"));
79        addchoicebox(listboxselecttype, "1", _("bar"));
80        addchoicebox(listboxselecttype, "2", _("text"));
81        addchoicebox(listboxselecttype, "3", _("picture"));
82        setchoiceboxselection(listboxselecttype, getskinconfig("listboxselecttype", NULL));
83
84        changeinput(osdtransparent, "0\n5\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60\n65\n70");
85        setchoiceboxselection(osdtransparent, getskinconfig("osdtransparent", NULL));
86
87        addchoicebox(blinkoff, "0", _("on"));
88        addchoicebox(blinkoff, "1", _("off"));
89        setchoiceboxselection(blinkoff, getconfig("skinblinkoff", NULL));
90
91#ifdef MIPSEL
92        changeinput(leftoffset, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20");
93        setchoiceboxselection(leftoffset, getconfig("fbleftoffset", NULL));
94
95        changeinput(rightoffset, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20");
96        setchoiceboxselection(rightoffset, getconfig("fbrightoffset", NULL));
97
98        changeinput(topoffset, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20");
99        setchoiceboxselection(topoffset, getconfig("fbtopoffset", NULL));
100
101        changeinput(bottomoffset, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20");
102        setchoiceboxselection(bottomoffset, getconfig("fbbottomoffset", NULL));
103#else
104        changeinput(leftoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100");
105        setchoiceboxselection(leftoffset, getconfig("fbleftoffset", NULL));
106
107        changeinput(rightoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100");
108        setchoiceboxselection(rightoffset, getconfig("fbrightoffset", NULL));
109
110        changeinput(topoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100");
111        setchoiceboxselection(topoffset, getconfig("fbtopoffset", NULL));
112
113        changeinput(bottomoffset, "0\n10\n20\n30\n40\n50\n60\n70\n80\n90\n100");
114        setchoiceboxselection(bottomoffset, getconfig("fbbottomoffset", NULL));
115#endif
116        oleftoffset = getconfigint("fbleftoffset", NULL);
117        orightoffset = getconfigint("fbrightoffset", NULL);
118        otopoffset = getconfigint("fbtopoffset", NULL);
119        obottomoffset = getconfigint("fbbottomoffset", NULL);
120
121        if(checkscreen("infobar") != status.skinerr)
122                addchoicebox(infobar_sel, "infobar", "v1");
123        if(checkscreen("infobar_v2") != status.skinerr)
124                addchoicebox(infobar_sel, "infobar_v2","v2");
125        if(checkscreen("infobar_v3") != status.skinerr)
126                addchoicebox(infobar_sel, "infobar_v3","v3");
127        if(checkscreen("infobar_v4") != status.skinerr)
128                addchoicebox(infobar_sel, "infobar_v4","v4");
129        if(checkscreen("infobar_v5") != status.skinerr)
130                addchoicebox(infobar_sel, "infobar_v5","v5");
131        if(checkscreen("infobar_v6") != status.skinerr)
132                addchoicebox(infobar_sel, "infobar_v6","v6");
133        if(checkscreen("infobar_v7") != status.skinerr)
134                addchoicebox(infobar_sel, "infobar_v7","v7");
135        if(checkscreen("infobar_v8") != status.skinerr)
136                addchoicebox(infobar_sel, "infobar_v8","v8");
137        if(checkscreen("infobar_v9") != status.skinerr)
138                addchoicebox(infobar_sel, "infobar_v9","v9");
139        setchoiceboxselection(infobar_sel, getskinconfig("infobar_selection", NULL));
140
141        if(checkscreen("infobar2") != status.skinerr)
142                addchoicebox(infobar2_sel, "infobar2", "v1");
143        if(checkscreen("infobar2_v2") != status.skinerr)
144                addchoicebox(infobar2_sel, "infobar2_v2","v2");
145        if(checkscreen("infobar2_v3") != status.skinerr)
146                addchoicebox(infobar2_sel, "infobar2_v3","v3");
147        if(checkscreen("infobar2_v4") != status.skinerr)
148                addchoicebox(infobar2_sel, "infobar2_v4","v4");
149        if(checkscreen("infobar2_v5") != status.skinerr)
150                addchoicebox(infobar2_sel, "infobar2_v5","v5");
151        if(checkscreen("infobar2_v6") != status.skinerr)
152                addchoicebox(infobar2_sel, "infobar2_v6","v6");
153        if(checkscreen("infobar2_v7") != status.skinerr)
154                addchoicebox(infobar2_sel, "infobar2_v7","v7");
155        if(checkscreen("infobar2_v8") != status.skinerr)
156                addchoicebox(infobar2_sel, "infobar2_v8","v8");
157        if(checkscreen("infobar2_v9") != status.skinerr)
158                addchoicebox(infobar2_sel, "infobar2_v9","v9");
159        setchoiceboxselection(infobar2_sel, getskinconfig("infobar2_selection", NULL));
160
161        if(checkscreen("channellist") != status.skinerr)
162                addchoicebox(channellist_sel, "channellist", "v1");
163        if(checkscreen("channellist_v2") != status.skinerr)
164                addchoicebox(channellist_sel, "channellist_v2","v2");
165        if(checkscreen("channellist_v3") != status.skinerr)
166                addchoicebox(channellist_sel, "channellist_v3","v3");
167        if(checkscreen("channellist_v4") != status.skinerr)
168                addchoicebox(channellist_sel, "channellist_v4","v4");
169        if(checkscreen("channellist_v5") != status.skinerr)
170                addchoicebox(channellist_sel, "channellist_v5","v5");
171        if(checkscreen("channellist_v6") != status.skinerr)
172                addchoicebox(channellist_sel, "channellist_v6","v6");
173        if(checkscreen("channellist_v7") != status.skinerr)
174                addchoicebox(channellist_sel, "channellist_v7","v7");
175        if(checkscreen("channellist_v8") != status.skinerr)
176                addchoicebox(channellist_sel, "channellist_v8","v8");
177        if(checkscreen("channellist_v9") != status.skinerr)
178                addchoicebox(channellist_sel, "channellist_v9","v9");
179        setchoiceboxselection(channellist_sel, getskinconfig("channellist_selection", NULL));
180
181        if(checkscreen("gmultiepg") != status.skinerr)
182                addchoicebox(gmultiepg_sel, "gmultiepg", "v1");
183        if(checkscreen("gmultiepg_v2") != status.skinerr)
184                addchoicebox(gmultiepg_sel, "gmultiepg_v2","v2");
185        if(checkscreen("gmultiepg_v3") != status.skinerr)
186                addchoicebox(gmultiepg_sel, "gmultiepg_v3","v3");
187        if(checkscreen("gmultiepg_v4") != status.skinerr)
188                addchoicebox(gmultiepg_sel, "gmultiepg_v4","v4");
189        if(checkscreen("gmultiepg_v5") != status.skinerr)
190                addchoicebox(gmultiepg_sel, "gmultiepg_v5","v5");
191        if(checkscreen("gmultiepg_v6") != status.skinerr)
192                addchoicebox(gmultiepg_sel, "gmultiepg_v6","v6");
193        if(checkscreen("gmultiepg_v7") != status.skinerr)
194                addchoicebox(gmultiepg_sel, "gmultiepg_v7","v7");
195        if(checkscreen("gmultiepg_v8") != status.skinerr)
196                addchoicebox(gmultiepg_sel, "gmultiepg_v8","v8");
197        if(checkscreen("gmultiepg_v9") != status.skinerr)
198                addchoicebox(gmultiepg_sel, "gmultiepg_v9","v9");
199        setchoiceboxselection(gmultiepg_sel, getskinconfig("gmultiepg_selection", NULL));
200
201        char* skinpath = NULL;
202        if(ostrcmp(getconfig("skinpath", NULL), "/var/usr/local/share/titan/skin/default") == 0)
203        {
204                skinpath = ostrcat("/mnt/config", NULL, 0, 0);
205                if(!file_exist("/mnt/config/skinconfig.default"))
206                {
207                        char* cmd = NULL;
208                        cmd = ostrcat(cmd, "cp -a /var/usr/local/share/titan/skin/default/skinconfig.* /mnt/config", 1, 0);
209                        printf("cmd: %s\n", cmd);
210                        system(cmd);
211                        free(cmd); cmd = NULL;
212                }
213        }
214        else
215                skinpath = ostrcat(getconfig("skinpath", NULL), NULL, 0, 0);
216
217        if(file_exist(skinpath))
218        {
219                delmarkedscreennodes(skinadjust, FILELISTDELMARK);
220                changeinput(filelist, skinpath);
221                changemask(filelist, "*");
222                createfilelist(skinadjust, filelist, 0);
223
224                node = filelist;
225                while(node != NULL)
226                {
227                        if(node->del == FILELISTDELMARK && node->text != NULL && ostrcmp(node->text, "..") != 0)
228                        {
229                                if(!ostrncmp("skinconfig.", node->text, 11))
230                                {
231                                        tmpstr = string_replace("skinconfig.", "", node->text, 0);
232                                        addchoicebox(skinstyle_sel, node->text, tmpstr);
233                                        free(tmpstr), tmpstr = NULL;
234                                }
235                        }
236                        node = node->next;
237                }
238                setchoiceboxselection(skinstyle_sel, getconfig("skinstyle", NULL));
239        }
240
241        addchoicebox(showrecfreesize, "0", _("No"));
242        addchoicebox(showrecfreesize, "1", _("%"));
243        addchoicebox(showrecfreesize, "2", _("GB"));
244        setchoiceboxselection(showrecfreesize, getconfig("showrecfreesize", NULL));
245
246        addchoicebox(minitv, "0", _("no"));
247        addchoicebox(minitv, "1", _("yes"));
248        setchoiceboxselection(minitv, getskinconfig("minitv", NULL));
249
250        addchoicebox(listboxselect, "0", getskinconfig("listboxselect", NULL));
251        addchoicebox(tithek_selectcol, "1", getskinconfig("tithek_selectcol", NULL));
252        addchoicebox(filelistselect, "2", getskinconfig("filelistselect", NULL));
253        addchoicebox(buttonbar_bgcol, "3", getskinconfig("buttonbar_bgcol", NULL));
254        addchoicebox(buttonbar_bgcol2, "4", getskinconfig("buttonbar_bgcol2", NULL));
255        addchoicebox(buttonbar_bordercol, "5", getskinconfig("buttonbar_bordercol", NULL));
256        addchoicebox(buttonbar_fontcol, "6", getskinconfig("buttonbar_fontcol", NULL));
257        addchoicebox(titlebar_bgcol, "7", getskinconfig("titlebar_bgcol", NULL));
258        addchoicebox(titlebar_bgcol2, "8", getskinconfig("titlebar_bgcol2", NULL));
259        addchoicebox(titlebar_bordercol, "9", getskinconfig("titlebar_bordercol", NULL));
260        addchoicebox(titlebar_fontcol, "10", getskinconfig("titlebar_fontcol", NULL));
261        addchoicebox(okcol, "11", getskinconfig("okcol", NULL));
262        addchoicebox(exitcol, "12", getskinconfig("exitcol", NULL));
263        addchoicebox(deaktivcol, "13", getskinconfig("deaktivcol", NULL));
264        addchoicebox(bgcol, "14", getskinconfig("bgcol", NULL));
265        addchoicebox(bgcol2, "15", getskinconfig("bgcol2", NULL));
266        addchoicebox(fontcol, "16", getskinconfig("fontcol", NULL));
267        addchoicebox(bordercol, "17", getskinconfig("bordercol", NULL));
268        addchoicebox(progresscol, "18", getskinconfig("progresscol", NULL));
269        addchoicebox(titlebgcol, "19", getskinconfig("titlebgcol", NULL));
270        addchoicebox(markcol, "20", getskinconfig("markcol", NULL));
271        addchoicebox(cpmode_bgcol, "21", getskinconfig("cpmode_bgcol", NULL));
272        addchoicebox(cpmode_fontcol, "22", getskinconfig("cpmode_fontcol", NULL));
273        addchoicebox(editmode_bgcol, "23", getskinconfig("editmode_bgcol", NULL));
274        addchoicebox(editmode_fontcol, "24", getskinconfig("editmode_fontcol", NULL));
275        addchoicebox(mvmode_fontcol, "25", getskinconfig("mvmode_fontcol", NULL));
276        addchoicebox(protectmode_bgcol, "26", getskinconfig("protectmode_bgcol", NULL));
277        addchoicebox(protectmode_fontcol, "27", getskinconfig("protectmode_fontcol", NULL));
278        addchoicebox(rec_progress, "28", getskinconfig("rec_progress", NULL));
279        addchoicebox(epgcol1, "29", getskinconfig("epgcol1", NULL));
280        addchoicebox(epgcol2, "30", getskinconfig("epgcol2", NULL));
281        addchoicebox(epgcol3, "31", getskinconfig("epgcol3", NULL));
282        addchoicebox(emuaktivecol, "32", getskinconfig("emuaktivecol", NULL));
283        addchoicebox(emurunningcol, "33", getskinconfig("emurunningcol", NULL));
284        addchoicebox(favcol, "34", getskinconfig("favcol", NULL));
285
286        listboxselect->fontcol2 = convertcol(getskinconfig("listboxselect", NULL));
287        tithek_selectcol->fontcol2 = convertcol(getskinconfig("tithek_selectcol", NULL));
288        filelistselect->fontcol2 = convertcol(getskinconfig("filelistselect", NULL));
289        buttonbar_bgcol->fontcol2 = convertcol(getskinconfig("buttonbar_bgcol", NULL));
290        buttonbar_bgcol2->fontcol2 = convertcol(getskinconfig("buttonbar_bgcol2", NULL));
291        buttonbar_bordercol->fontcol2 = convertcol(getskinconfig("buttonbar_bordercol", NULL));
292        buttonbar_fontcol->fontcol2 = convertcol(getskinconfig("buttonbar_fontcol", NULL));
293        titlebar_bgcol->fontcol2 = convertcol(getskinconfig("titlebar_bgcol", NULL));
294        titlebar_bgcol2->fontcol2 = convertcol(getskinconfig("titlebar_bgcol2", NULL));
295        titlebar_bordercol->fontcol2 = convertcol(getskinconfig("titlebar_bordercol", NULL));
296        titlebar_fontcol->fontcol2 = convertcol(getskinconfig("titlebar_fontcol", NULL));
297        okcol->fontcol2 = convertcol(getskinconfig("okcol", NULL));
298        exitcol->fontcol2 = convertcol(getskinconfig("exitcol", NULL));
299        deaktivcol->fontcol2 = convertcol(getskinconfig("deaktivcol", NULL));
300        bgcol->fontcol2 = convertcol(getskinconfig("bgcol", NULL));
301        bgcol2->fontcol2 = convertcol(getskinconfig("bgcol2", NULL));
302        fontcol->fontcol2 = convertcol(getskinconfig("fontcol", NULL));
303        bordercol->fontcol2 = convertcol(getskinconfig("bordercol", NULL));
304        progresscol->fontcol2 = convertcol(getskinconfig("progresscol", NULL));
305        titlebgcol->fontcol2 = convertcol(getskinconfig("titlebgcol", NULL));
306        markcol->fontcol2 = convertcol(getskinconfig("markcol", NULL));
307        rec_progress->fontcol2 = convertcol(getskinconfig("rec_progress", NULL));
308        cpmode_bgcol->fontcol2 = convertcol(getskinconfig("cpmode_bgcol", NULL));
309        cpmode_fontcol->fontcol2 = convertcol(getskinconfig("cpmode_fontcol", NULL));
310        editmode_bgcol->fontcol2 = convertcol(getskinconfig("editmode_bgcol", NULL));
311        editmode_fontcol->fontcol2 = convertcol(getskinconfig("editmode_fontcol", NULL));
312        mvmode_bgcol->fontcol2 = convertcol(getskinconfig("mvmode_bgcol", NULL));
313        mvmode_fontcol->fontcol2 = convertcol(getskinconfig("mvmode_fontcol", NULL));
314        protectmode_bgcol->fontcol2 = convertcol(getskinconfig("protectmode_bgcol", NULL));
315        protectmode_fontcol->fontcol2 = convertcol(getskinconfig("protectmode_fontcol", NULL));
316        epgcol1->fontcol2 = convertcol(getskinconfig("epgcol1", NULL));
317        epgcol2->fontcol2 = convertcol(getskinconfig("epgcol2", NULL));
318        epgcol3->fontcol2 = convertcol(getskinconfig("epgcol3", NULL));
319        emuaktivecol->fontcol2 = convertcol(getskinconfig("emuaktivecol", NULL));
320        emurunningcol->fontcol2 = convertcol(getskinconfig("emurunningcol", NULL));
321        favcol->fontcol2 = convertcol(getskinconfig("favcol", NULL));
322
323        if(status.expertmodus < 10)
324        {
325//              listboxselect->hidden = YES;
326//              tithek_selectcol->hidden = YES;
327//              filelistselect->hidden = YES;
328                buttonbar_bgcol->hidden = YES;
329                buttonbar_bgcol2->hidden = YES;
330                buttonbar_bordercol->hidden = YES;
331                buttonbar_fontcol->hidden = YES;
332                titlebar_bgcol->hidden = YES;
333                titlebar_bgcol2->hidden = YES;
334                titlebar_bordercol->hidden = YES;
335                titlebar_fontcol->hidden = YES;
336                okcol->hidden = YES;
337                exitcol->hidden = YES;
338                deaktivcol->hidden = YES;
339//              bgcol->hidden = YES;
340//              bgcol2->hidden = YES;
341                fontcol->hidden = YES;
342                bordercol->hidden = YES;
343                progresscol->hidden = YES;
344                titlebgcol->hidden = YES;
345                markcol->hidden = YES;
346                rec_progress->hidden = YES;
347                cpmode_bgcol->hidden = YES;
348                cpmode_fontcol->hidden = YES;
349                editmode_bgcol->hidden = YES;
350                editmode_fontcol->hidden = YES;
351                mvmode_bgcol->hidden = YES;
352                mvmode_fontcol->hidden = YES;
353                protectmode_bgcol->hidden = YES;
354                protectmode_fontcol->hidden = YES;
355                epgcol1->hidden = YES;
356                epgcol2->hidden = YES;
357                epgcol3->hidden = YES;
358                emuaktivecol->hidden = YES;
359                emurunningcol->hidden = YES;
360                favcol->hidden = YES;
361        }
362
363        if(status.security == 0 || checkemu() == 0)
364        {
365                emuaktivecol->hidden = YES;
366                emurunningcol->hidden = YES;
367        }
368        else
369        {
370                emuaktivecol->hidden = NO;
371                emurunningcol->hidden = NO;
372        }
373
374        drawscreen(skinadjust, 0, 0);
375        addscreenrc(skinadjust, listbox);
376
377        tmp = listbox->select;
378        while(1)
379        {
380                int offsetchange = 0;
381                addscreenrc(skinadjust, tmp);
382
383                if(listbox->select != NULL && ostrcmp(listbox->select->name, "listboxselect") == 0)
384                        b7->hidden = NO;
385                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "tithek_selectcol") == 0)
386                        b7->hidden = NO;
387                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "filelistselect") == 0)
388                        b7->hidden = NO;
389                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol") == 0)
390                        b7->hidden = NO;
391                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol2") == 0)
392                        b7->hidden = NO;
393                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bordercol") == 0)
394                        b7->hidden = NO;
395                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_fontcol") == 0)
396                        b7->hidden = NO;
397                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol") == 0)
398                        b7->hidden = NO;
399                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol2") == 0)
400                        b7->hidden = NO;
401                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bordercol") == 0)
402                        b7->hidden = NO;
403                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_fontcol") == 0)
404                        b7->hidden = NO;
405                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "okcol") == 0)
406                        b7->hidden = NO;
407                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "exitcol") == 0)
408                        b7->hidden = NO;
409                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "deaktivcol") == 0)
410                        b7->hidden = NO;
411                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol") == 0)
412                        b7->hidden = NO;
413                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol2") == 0)
414                        b7->hidden = NO;
415                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "fontcol") == 0)
416                        b7->hidden = NO;
417                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "bordercol") == 0)
418                        b7->hidden = NO;
419                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebgcol") == 0)
420                        b7->hidden = NO;
421                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "progresscol") == 0)
422                        b7->hidden = NO;
423                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "markcol") == 0)
424                        b7->hidden = NO;
425                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_bgcol") == 0)
426                        b7->hidden = NO;
427                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_fontcol") == 0)
428                        b7->hidden = NO;
429                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_bgcol") == 0)
430                        b7->hidden = NO;
431                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_fontcol") == 0)
432                        b7->hidden = NO;
433                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_bgcol") == 0)
434                        b7->hidden = NO;
435                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_fontcol") == 0)
436                        b7->hidden = NO;
437                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_bgcol") == 0)
438                        b7->hidden = NO;
439                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_fontcol") == 0)
440                        b7->hidden = NO;
441                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "rec_progress") == 0)
442                        b7->hidden = NO;
443                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol1") == 0)
444                        b7->hidden = NO;
445                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol2") == 0)
446                        b7->hidden = NO;
447                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol3") == 0)
448                        b7->hidden = NO;
449                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "emuaktivecol") == 0)
450                        b7->hidden = NO;
451                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "emurunningcol") == 0)
452                        b7->hidden = NO;
453                else if(listbox->select != NULL && ostrcmp(listbox->select->name, "favcol") == 0)
454                        b7->hidden = NO;
455                else
456                        b7->hidden = YES;
457
458                drawscreen(skinadjust, 0, 0);
459
460                rcret = waitrc(skinadjust, 0, 0);
461                tmp = listbox->select;
462
463                addconfigscreencheck("fbleftoffset", leftoffset, "0");
464                if(status.leftoffset != getconfigint("fbleftoffset", NULL)) offsetchange = 1;
465                status.leftoffset = getconfigint("fbleftoffset", NULL);
466
467                addconfigscreencheck("fbrightoffset", rightoffset, "0");
468                if(status.rightoffset != getconfigint("fbrightoffset", NULL)) offsetchange = 1;
469                status.rightoffset = getconfigint("fbrightoffset", NULL);
470
471                addconfigscreencheck("fbtopoffset", topoffset, "0");
472                if(status.topoffset != getconfigint("fbtopoffset", NULL)) offsetchange = 1;
473                status.topoffset = getconfigint("fbtopoffset", NULL);
474
475                addconfigscreencheck("fbbottomoffset", bottomoffset, "0");
476                if(status.bottomoffset != getconfigint("fbbottomoffset", NULL)) offsetchange = 1;
477                status.bottomoffset = getconfigint("fbbottomoffset", NULL);
478
479                if(offsetchange == 1 && (ostrcmp(getconfig("av_mode3d", NULL), "sbs") == 0 || ostrcmp(getconfig("av_mode3d", NULL), "tab") == 0)) clearfball();
480
481                drawscreen(skinadjust, 0, 0);
482
483#ifdef MIPSEL
484                if(checkbox("DM7020HD") == 0 && checkbox("DM7020HDV2") == 0)
485                        setfbosd();
486#endif
487
488                if(rcret == getrcconfigint("rcexit", NULL))
489                {
490                        addconfigint("fbleftoffset", oleftoffset);
491                        status.leftoffset = getconfigint("fbleftoffset", NULL);
492                        addconfigint("fbrightoffset", orightoffset);
493                        status.rightoffset = getconfigint("fbrightoffset", NULL);
494                        addconfigint("fbtopoffset", otopoffset);
495                        status.topoffset = getconfigint("fbtopoffset", NULL);
496                        addconfigint("fbbottomoffset", obottomoffset);
497                        status.bottomoffset = getconfigint("fbbottomoffset", NULL);
498                        clearfball();
499                        break;
500                }
501
502                if(rcret == getrcconfigint("rcred", NULL))
503                {
504                        if(textbox(_("Message"), _("Reset your Skin Settings ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0) == 1)
505                        {
506                                char* cmd = NULL;
507                                if(ostrcmp(getconfig("skinconfig", NULL), "/mnt/config/skinconfig") == 0)
508                                        cmd = ostrcat("cp -a /etc/titan.restore/mnt/config/skinconfig ", getconfig("skinconfig", NULL), 0, 0);
509                                else
510                                {
511                                        cmd = ostrcat(cmd, "cp -a ", 1, 0);
512                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
513                                        cmd = ostrcat(cmd, ".default ", 1, 0);
514                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
515                                }
516                                printf("cmd: %s\n", cmd);
517                                system(cmd);
518                                free(cmd); cmd = NULL;
519
520                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
521                                oshutdown(3, 0);
522                        }
523                        break;
524                }
525
526                if(rcret == getrcconfigint("rcgreen", NULL))
527                {
528                        if(textbox(_("Message"), _("Create new Skinstyle ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0) == 1)
529                        {
530                                char* search = NULL;
531                                search = textinputhist(_("Skinstyle Name"), " ", "searchhist");
532                                strstrip(search);
533                                if(search != NULL)
534                                {
535                                        drawscreen(load, 0, 0);
536                                        char* cmd = NULL;
537                                        cmd = ostrcat(cmd, "cp ", 1, 0);
538                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
539                                        cmd = ostrcat(cmd, " \"", 1, 0);
540                                        cmd = ostrcat(cmd, skinpath, 1, 0);
541                                        cmd = ostrcat(cmd, "/skinconfig.", 1, 0);
542                                        cmd = ostrcat(cmd, search, 1, 0);
543                                        cmd = ostrcat(cmd, "\"", 1, 0);
544                                        printf("cmd: %s\n", cmd);
545                                        system(cmd);
546                                        free(cmd); cmd = NULL;
547
548                                        delskinconfigtmpall();
549                                        delownerrc(skinadjust);
550                                        clearscreen(skinadjust);
551
552                                        goto start;
553                                }
554                        }
555                        break;
556                }
557
558                if(rcret == getrcconfigint("rcyellow", NULL))
559                {
560                        if(ostrcmp(skinstyle_sel->ret, "skinconfig.default") != 0)
561                        {
562                                tmpstr = string_replace("skinconfig.", "", skinstyle_sel->ret, 0);
563                                char* msg = ostrcat(_("Remove Skinstyle"), NULL, 0, 0);
564                                msg = ostrcat(msg, " '", 1, 0);
565                                msg = ostrcat(msg, tmpstr, 1, 0);
566                                msg = ostrcat(msg, "' ?", 1, 0);
567                                free(tmpstr), tmpstr = NULL;
568
569                                if(textbox(_("Message"), msg, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0) == 1)
570                                {
571                                        char* cmd = NULL;
572                                        cmd = ostrcat(cmd, "rm \"", 1, 0);
573                                        cmd = ostrcat(cmd, skinpath, 1, 0);
574                                        cmd = ostrcat(cmd, "/", 1, 0);
575                                        cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
576                                        cmd = ostrcat(cmd, "\"", 1, 0);
577                                        printf("cmd: %s\n", cmd);
578                                        system(cmd);
579                                        free(cmd); cmd = NULL;
580
581//                                      delskinconfigtmpall();
582//                                      delownerrc(skinadjust);
583//                                      clearscreen(skinadjust);
584
585//                                      goto start;
586                                        textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
587                                        oshutdown(3, 0);
588                                }
589                                free(msg), msg = NULL;
590                        }
591                }
592
593                if(rcret == getrcconfigint("rcblue", NULL))
594                {
595                        setfbtransparent(255);
596                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "listboxselect") == 0)
597                        {
598                                long oldlistboxselectcol = convertcol("listboxselect");
599                                tmpstr = screencolorpicker(getskinconfig("listboxselect", NULL), 0, 0, 0);
600                                if(tmpstr != NULL)
601                                        addskinconfigtmp("listboxselect", tmpstr);
602                                if(oldlistboxselectcol != convertcol("listboxselect")) reboot = 1;
603                                listboxselect->fontcol2 = convertcol(tmpstr);
604                        }
605
606                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "tithek_selectcol") == 0)
607                        {
608                                long oldtithek_selectcol = convertcol("tithek_selectcol");
609                                tmpstr = screencolorpicker(getskinconfig("tithek_selectcol", NULL), 0, 0, 0);
610                                if(tmpstr != NULL)
611                                        addskinconfigtmp("tithek_selectcol", tmpstr);
612                                if(oldtithek_selectcol != convertcol("tithek_selectcol")) reboot = 1;
613                                tithek_selectcol->fontcol2 = convertcol(tmpstr);
614                        }
615
616                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "filelistselect") == 0)
617                        {
618                                long oldfilelistselect = convertcol("filelistselect");
619                                tmpstr = screencolorpicker(getskinconfig("filelistselect", NULL), 0, 0, 0);
620                                if(tmpstr != NULL)
621                                        addskinconfigtmp("filelistselect", tmpstr);
622                                if(oldfilelistselect != convertcol("filelistselect")) reboot = 1;
623                                filelistselect->fontcol2 = convertcol(tmpstr);
624                        }
625
626                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol") == 0)
627                        {
628                                long oldbuttonbar_bgcol = convertcol("buttonbar_bgcol");
629                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bgcol", NULL), 0, 0, 0);
630                                if(tmpstr != NULL)
631                                        addskinconfigtmp("buttonbar_bgcol", tmpstr);
632                                if(oldbuttonbar_bgcol != convertcol("buttonbar_bgcol")) reboot = 1;
633                                buttonbar_bgcol->fontcol2 = convertcol(tmpstr);
634                        }
635
636                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol2") == 0)
637                        {
638                                long oldbuttonbar_bgcol2 = convertcol("buttonbar_bgcol2");
639                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bgcol2", NULL), 0, 0, 0);
640                                if(tmpstr != NULL)
641                                        addskinconfigtmp("buttonbar_bgcol2", tmpstr);
642                                if(oldbuttonbar_bgcol2 != convertcol("buttonbar_bgcol2")) reboot = 1;
643                                buttonbar_bgcol2->fontcol2 = convertcol(tmpstr);
644                        }
645
646                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bordercol") == 0)
647                        {
648                                long oldbuttonbar_bordercol = convertcol("buttonbar_bordercol");
649                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bordercol", NULL), 0, 0, 0);
650                                if(tmpstr != NULL)
651                                        addskinconfigtmp("buttonbar_bordercol", tmpstr);
652                                if(oldbuttonbar_bordercol != convertcol("buttonbar_bordercol")) reboot = 1;
653                                buttonbar_bordercol->fontcol2 = convertcol(tmpstr);
654                        }
655
656                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_fontcol") == 0)
657                        {
658                                long oldbuttonbar_fontcol = convertcol("buttonbar_fontcol");
659                                tmpstr = screencolorpicker(getskinconfig("buttonbar_fontcol", NULL), 0, 0, 0);
660                                if(tmpstr != NULL)
661                                        addskinconfigtmp("buttonbar_fontcol", tmpstr);
662                                if(oldbuttonbar_fontcol != convertcol("buttonbar_fontcol")) reboot = 1;
663                                buttonbar_fontcol->fontcol2 = convertcol(tmpstr);
664                        }
665
666                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol") == 0)
667                        {
668                                long oldtitlebar_bgcol = convertcol("titlebar_bgcol");
669                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol", NULL), 0, 0, 0);
670                                if(tmpstr != NULL)
671                                        addskinconfigtmp("titlebar_bgcol", tmpstr);
672                                if(oldtitlebar_bgcol != convertcol("titlebar_bgcol")) reboot = 1;
673                                titlebar_bgcol->fontcol2 = convertcol(tmpstr);
674                        }
675
676                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol2") == 0)
677                        {
678                                long oldtitlebar_bgcol2 = convertcol("titlebar_bgcol2");
679                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol2", NULL), 0, 0, 0);
680                                if(tmpstr != NULL)
681                                        addskinconfigtmp("titlebar_bgcol2", tmpstr);
682                                if(oldtitlebar_bgcol2 != convertcol("titlebar_bgcol2")) reboot = 1;
683                                titlebar_bgcol2->fontcol2 = convertcol(tmpstr);
684                        }
685
686                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bordercol") == 0)
687                        {
688                                long oldtitlebar_bordercol = convertcol("titlebar_bordercol");
689                                tmpstr = screencolorpicker(getskinconfig("titlebar_bordercol", NULL), 0, 0, 0);
690                                if(tmpstr != NULL)
691                                        addskinconfigtmp("titlebar_bordercol", tmpstr);
692                                if(oldtitlebar_bordercol != convertcol("titlebar_bordercol")) reboot = 1;
693                                titlebar_bordercol->fontcol2 = convertcol(tmpstr);
694                        }
695
696                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_fontcol") == 0)
697                        {
698                                long oldtitlebar_fontcol = convertcol("titlebar_fontcol");
699                                tmpstr = screencolorpicker(getskinconfig("titlebar_fontcol", NULL), 0, 0, 0);
700                                if(tmpstr != NULL)
701                                        addskinconfigtmp("titlebar_fontcol", tmpstr);
702                                if(oldtitlebar_fontcol != convertcol("titlebar_fontcol")) reboot = 1;
703                                titlebar_fontcol->fontcol2 = convertcol(tmpstr);
704                        }
705
706                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "okcol") == 0)
707                        {
708                                long oldokcol = convertcol("okcol");
709                                tmpstr = screencolorpicker(getskinconfig("okcol", NULL), 0, 0, 0);
710                                if(tmpstr != NULL)
711                                        addskinconfigtmp("okcol", tmpstr);
712                                if(oldokcol != convertcol("okcol")) reboot = 1;
713                                okcol->fontcol2 = convertcol(tmpstr);
714                        }
715
716                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "exitcol") == 0)
717                        {
718                                long oldexitcol = convertcol("exitcol");
719                                tmpstr = screencolorpicker(getskinconfig("exitcol", NULL), 0, 0, 0);
720                                if(tmpstr != NULL)
721                                        addskinconfigtmp("exitcol", tmpstr);
722                                if(oldexitcol != convertcol("exitcol")) reboot = 1;
723                                okcol->fontcol2 = convertcol(tmpstr);
724                        }
725
726                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "deaktivcol") == 0)
727                        {
728                                long olddeaktivcol = convertcol("deaktivcol");
729                                tmpstr = screencolorpicker(getskinconfig("deaktivcol", NULL), 0, 0, 0);
730                                if(tmpstr != NULL)
731                                        addskinconfigtmp("deaktivcol", tmpstr);
732                                if(olddeaktivcol != convertcol("deaktivcol")) reboot = 1;
733                                deaktivcol->fontcol2 = convertcol(tmpstr);
734                        }
735
736                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol") == 0)
737                        {
738                                long oldbgcol = convertcol("bgcol");
739                                tmpstr = screencolorpicker(getskinconfig("bgcol", NULL), 0, 0, 0);
740                                if(tmpstr != NULL)
741                                        addskinconfigtmp("bgcol", tmpstr);
742                                if(oldbgcol != convertcol("bgcol")) reboot = 1;
743                                bgcol->fontcol2 = convertcol(tmpstr);
744                        }
745
746                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol2") == 0)
747                        {
748                                long oldbgcol2 = convertcol("bgcol2");
749                                tmpstr = screencolorpicker(getskinconfig("bgcol2", NULL), 0, 0, 0);
750                                if(tmpstr != NULL)
751                                        addskinconfigtmp("bgcol2", tmpstr);
752                                if(oldbgcol2 != convertcol("bgcol2")) reboot = 1;
753                                bgcol2->fontcol2 = convertcol(tmpstr);
754                        }
755
756                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "fontcol") == 0)
757                        {
758                                long oldfontcol = convertcol("fontcol");
759                                tmpstr = screencolorpicker(getskinconfig("fontcol", NULL), 0, 0, 0);
760                                if(tmpstr != NULL)
761                                        addskinconfigtmp("fontcol", tmpstr);
762                                if(oldfontcol != convertcol("fontcol")) reboot = 1;
763                                fontcol->fontcol2 = convertcol(tmpstr);
764                        }
765
766                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bordercol") == 0)
767                        {
768                                long oldbordercol = convertcol("bordercol");
769                                tmpstr = screencolorpicker(getskinconfig("bordercol", NULL), 0, 0, 0);
770                                if(tmpstr != NULL)
771                                        addskinconfigtmp("bordercol", tmpstr);
772                                if(oldbordercol != convertcol("bordercol")) reboot = 1;
773                                bordercol->fontcol2 = convertcol(tmpstr);
774                        }
775
776                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "progresscol") == 0)
777                        {
778                                long oldprogresscol = convertcol("progresscol");
779                                tmpstr = screencolorpicker(getskinconfig("progresscol", NULL), 0, 0, 0);
780                                if(tmpstr != NULL)
781                                        addskinconfigtmp("progresscol", tmpstr);
782                                if(oldprogresscol != convertcol("progresscol")) reboot = 1;
783                                progresscol->fontcol2 = convertcol(tmpstr);
784                        }
785
786                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebgcol") == 0)
787                        {
788                                long oldtitlebgcol = convertcol("titlebgcol");
789                                tmpstr = screencolorpicker(getskinconfig("titlebgcol", NULL), 0, 0, 0);
790                                if(tmpstr != NULL)
791                                        addskinconfigtmp("titlebgcol", tmpstr);
792                                if(oldtitlebgcol != convertcol("titlebgcol")) reboot = 1;
793                                titlebgcol->fontcol2 = convertcol(tmpstr);
794                        }
795
796                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "markcol") == 0)
797                        {
798                                long oldmarkcol = convertcol("markcol");
799                                tmpstr = screencolorpicker(getskinconfig("markcol", NULL), 0, 0, 0);
800                                if(tmpstr != NULL)
801                                        addskinconfigtmp("markcol", tmpstr);
802                                if(oldmarkcol != convertcol("markcol")) reboot = 1;
803                                markcol->fontcol2 = convertcol(tmpstr);
804                        }
805
806                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_bgcol") == 0)
807                        {
808                                long oldcpmode_bgcol = convertcol("cpmode_bgcol");
809                                tmpstr = screencolorpicker(getskinconfig("cpmode_bgcol", NULL), 0, 0, 0);
810                                if(tmpstr != NULL)
811                                        addskinconfigtmp("cpmode_bgcol", tmpstr);
812                                if(oldcpmode_bgcol != convertcol("cpmode_bgcol")) reboot = 1;
813                                cpmode_bgcol->fontcol2 = convertcol(tmpstr);
814                        }
815
816                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_fontcol") == 0)
817                        {
818                                long oldcpmode_fontcol = convertcol("cpmode_fontcol");
819                                tmpstr = screencolorpicker(getskinconfig("cpmode_fontcol", NULL), 0, 0, 0);
820                                if(tmpstr != NULL)
821                                        addskinconfigtmp("cpmode_fontcol", tmpstr);
822                                if(oldcpmode_fontcol != convertcol("cpmode_fontcol")) reboot = 1;
823                                cpmode_fontcol->fontcol2 = convertcol(tmpstr);
824                        }
825
826                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_bgcol") == 0)
827                        {
828                                long oldeditmode_bgcol = convertcol("editmode_bgcol");
829                                tmpstr = screencolorpicker(getskinconfig("editmode_bgcol", NULL), 0, 0, 0);
830                                if(tmpstr != NULL)
831                                        addskinconfigtmp("editmode_bgcol", tmpstr);
832                                if(oldeditmode_bgcol != convertcol("editmode_bgcol")) reboot = 1;
833                                editmode_bgcol->fontcol2 = convertcol(tmpstr);
834                        }
835
836                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_fontcol") == 0)
837                        {
838                                long oldeditmode_fontcol = convertcol("editmode_fontcol");
839                                tmpstr = screencolorpicker(getskinconfig("editmode_fontcol", NULL), 0, 0, 0);
840                                if(tmpstr != NULL)
841                                        addskinconfigtmp("editmode_fontcol", tmpstr);
842                                if(oldeditmode_fontcol != convertcol("editmode_fontcol")) reboot = 1;
843                                editmode_fontcol->fontcol2 = convertcol(tmpstr);
844                        }
845
846                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_bgcol") == 0)
847                        {
848                                long oldmvmode_bgcol = convertcol("mvmode_bgcol");
849                                tmpstr = screencolorpicker(getskinconfig("mvmode_bgcol", NULL), 0, 0, 0);
850                                if(tmpstr != NULL)
851                                        addskinconfigtmp("mvmode_bgcol", tmpstr);
852                                if(oldmvmode_bgcol != convertcol("mvmode_bgcol")) reboot = 1;
853                                mvmode_bgcol->fontcol2 = convertcol(tmpstr);
854                        }
855
856                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_fontcol") == 0)
857                        {
858                                long oldmvmode_fontcol = convertcol("mvmode_fontcol");
859                                tmpstr = screencolorpicker(getskinconfig("mvmode_fontcol", NULL), 0, 0, 0);
860                                if(tmpstr != NULL)
861                                        addskinconfigtmp("mvmode_fontcol", tmpstr);
862                                if(oldmvmode_fontcol != convertcol("mvmode_fontcol")) reboot = 1;
863                                mvmode_fontcol->fontcol2 = convertcol(tmpstr);
864                        }
865
866                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_bgcol") == 0)
867                        {
868                                long oldprotectmode_bgcol = convertcol("protectmode_bgcol");
869                                tmpstr = screencolorpicker(getskinconfig("protectmode_bgcol", NULL), 0, 0, 0);
870                                if(tmpstr != NULL)
871                                        addskinconfigtmp("protectmode_bgcol", tmpstr);
872                                if(oldprotectmode_bgcol != convertcol("protectmode_bgcol")) reboot = 1;
873                                protectmode_bgcol->fontcol2 = convertcol(tmpstr);
874                        }
875
876                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_fontcol") == 0)
877                        {
878                                long oldprotectmode_fontcol = convertcol("protectmode_fontcol");
879                                tmpstr = screencolorpicker(getskinconfig("protectmode_fontcol", NULL), 0, 0, 0);
880                                if(tmpstr != NULL)
881                                        addskinconfigtmp("protectmode_fontcol", tmpstr);
882                                if(oldprotectmode_fontcol != convertcol("protectmode_fontcol")) reboot = 1;
883                                protectmode_fontcol->fontcol2 = convertcol(tmpstr);
884                        }
885
886                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "rec_progress") == 0)
887                        {
888                                long oldrec_progress = convertcol("rec_progress");
889                                tmpstr = screencolorpicker(getskinconfig("rec_progress", NULL), 0, 0, 0);
890                                if(tmpstr != NULL)
891                                        addskinconfigtmp("rec_progress", tmpstr);
892                                if(oldrec_progress != convertcol("rec_progress")) reboot = 1;
893                                rec_progress->fontcol2 = convertcol(tmpstr);
894                        }
895
896                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol1") == 0)
897                        {
898                                long oldepgcol1 = convertcol("epgcol1");
899                                tmpstr = screencolorpicker(getskinconfig("epgcol1", NULL), 0, 0, 0);
900                                if(tmpstr != NULL)
901                                        addskinconfigtmp("epgcol1", tmpstr);
902                                if(oldepgcol1 != convertcol("epgcol1")) reboot = 1;
903                                epgcol1->fontcol2 = convertcol(tmpstr);
904                        }
905
906                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol2") == 0)
907                        {
908                                long oldepgcol2 = convertcol("epgcol2");
909                                tmpstr = screencolorpicker(getskinconfig("epgcol2", NULL), 0, 0, 0);
910                                if(tmpstr != NULL)
911                                        addskinconfigtmp("epgcol2", tmpstr);
912                                if(oldepgcol2 != convertcol("epgcol2")) reboot = 1;
913                                epgcol2->fontcol2 = convertcol(tmpstr);
914                        }
915
916                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol3") == 0)
917                        {
918                                long oldepgcol3 = convertcol("epgcol3");
919                                tmpstr = screencolorpicker(getskinconfig("epgcol3", NULL), 0, 0, 0);
920                                if(tmpstr != NULL)
921                                        addskinconfigtmp("epgcol3", tmpstr);
922                                if(oldepgcol3 != convertcol("epgcol3")) reboot = 1;
923                                epgcol3->fontcol2 = convertcol(tmpstr);
924                        }
925
926                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "emuaktivecol") == 0)
927                        {
928                                long oldemuaktivecol = convertcol("emuaktivecol");
929                                tmpstr = screencolorpicker(getskinconfig("emuaktivecol", NULL), 0, 0, 0);
930                                if(tmpstr != NULL)
931                                        addskinconfigtmp("emuaktivecol", tmpstr);
932                                if(oldemuaktivecol != convertcol("emuaktivecol")) reboot = 1;
933                                emuaktivecol->fontcol2 = convertcol(tmpstr);
934                        }
935
936                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "emurunningcol") == 0)
937                        {
938                                long oldemurunningcol = convertcol("emurunningcol");
939                                tmpstr = screencolorpicker(getskinconfig("emurunningcol", NULL), 0, 0, 0);
940                                if(tmpstr != NULL)
941                                        addskinconfigtmp("emurunningcol", tmpstr);
942                                if(oldemurunningcol != convertcol("emurunningcol")) reboot = 1;
943                                emurunningcol->fontcol2 = convertcol(tmpstr);
944                        }
945
946                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "favcol") == 0)
947                        {
948                                long oldfavcol = convertcol("favcol");
949                                tmpstr = screencolorpicker(getskinconfig("favcol", NULL), 0, 0, 0);
950                                if(tmpstr != NULL)
951                                        addskinconfigtmp("favcol", tmpstr);
952                                if(oldfavcol != convertcol("favcol")) reboot = 1;
953                                favcol->fontcol2 = convertcol(tmpstr);
954                        }
955                        setosdtransparent(getskinconfigint("osdtransparent", NULL));
956                        drawscreen(skinadjust, 0, 0);
957
958                        debug(10, "%s set %s", listbox->select->name, tmpstr);
959                        free(tmpstr), tmpstr = NULL;
960                        continue;
961                }
962
963                if(rcret == getrcconfigint("rcok", NULL))
964                {
965                        char* oldskinstyle_sel = getconfig("skinstyle", NULL);
966                        addconfigscreencheck("skinstyle", skinstyle_sel, "0");
967                        if(ostrcmp(oldskinstyle_sel,getconfig("skinstyle", NULL)) != 0)
968                        {
969                                writeconfigtmp();
970
971                                char* cmd = NULL;
972                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
973                                cmd = ostrcat(cmd, skinpath, 1, 0);
974                                cmd = ostrcat(cmd, "/", 1, 0);
975                                cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
976                                cmd = ostrcat(cmd, " ", 1, 0);
977                                cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
978                                printf("cmd: %s\n", cmd);
979                                system(cmd);
980                                free(cmd); cmd = NULL;
981
982                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
983                                oshutdown(3, 0);
984                        }
985
986                        if(ostrcmp(minitv->ret, "1") == 0) resettvpic();
987                        int oldminitv = getskinconfigint("minitv", NULL);
988                        addskinconfigscreencheck("minitv", minitv, "0");
989                        if(oldminitv != getskinconfigint("minitv", NULL)) reboot = 1;
990
991                        int oldfontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
992                        addskinconfigscreencheck("fontsizeadjust", fontsizeadjust, "0");
993                        if(oldfontsizeadjust != getskinconfigint("fontsizeadjust", NULL)) reboot = 1;
994                        status.fontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
995
996                        addskinconfigscreencheck("listboxselecttype", listboxselecttype, "0");
997                        status.listboxselecttype = getskinconfigint("listboxselecttype", NULL);
998
999                        addskinconfigscreencheck("osdtransparent", osdtransparent, "0");
1000                        setosdtransparent(getskinconfigint("osdtransparent", NULL));
1001                        addconfigscreencheck("showrecfreesize", showrecfreesize, "0");
1002                        status.showrecfreesize = getconfigint("showrecfreesize", NULL);
1003
1004                        char* oldinfobar_sel = getskinconfig("infobar_selection", NULL);
1005                        addskinconfigscreencheck("infobar_selection", infobar_sel, "0");
1006                        if(ostrcmp(oldinfobar_sel,getskinconfig("infobar_selection", NULL)) != 0) reboot = 1;
1007                        //free(oldinfobar_sel); oldinfobar_sel=NULL;
1008
1009                        char* oldinfobar2_sel = getskinconfig("infobar2_selection", NULL);
1010                        addskinconfigscreencheck("infobar2_selection", infobar2_sel, "0");
1011                        if(ostrcmp(oldinfobar2_sel,getskinconfig("infobar2_selection", NULL)) != 0) reboot = 1;
1012                        //free(oldinfobar2_sel); oldinfobar2_sel=NULL;
1013
1014                        char* oldchannellist_sel = getskinconfig("channellist_selection", NULL);
1015                        addskinconfigscreencheck("channellist_selection", channellist_sel, "0");
1016                        if(ostrcmp(oldchannellist_sel,getskinconfig("channellist_selection", NULL)) != 0) reboot = 1;
1017                        //free(oldchannellist_sel); oldchannellist_sel=NULL;
1018
1019                        char* oldgmultiepg_sel = getskinconfig("gmultiepg_selection", NULL);
1020                        addskinconfigscreencheck("gmultiepg_selection", gmultiepg_sel, "0");
1021                        if(ostrcmp(oldgmultiepg_sel,getskinconfig("gmultiepg_selection", NULL)) != 0) reboot = 1;
1022                        //free(oldgmultiepg_sel); oldgmultiepg_sel=NULL;
1023
1024                        addconfig("skinblinkoff", blinkoff->ret);
1025
1026                        writeskinconfigtmp();
1027
1028                        if(ostrcmp(skinstyle_sel->ret, "skinconfig.default") != 0)
1029                        {
1030                                char* cmd = NULL;
1031                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
1032                                cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
1033                                cmd = ostrcat(cmd, " ", 1, 0);
1034                                cmd = ostrcat(cmd, skinpath, 1, 0);
1035                                cmd = ostrcat(cmd, "/", 1, 0);
1036                                cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
1037                                printf("cmd: %s\n", cmd);
1038                                system(cmd);
1039                                free(cmd); cmd = NULL;
1040                        }
1041
1042                        if(reboot == 1)
1043                        {
1044                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
1045                                oshutdown(3, 0);
1046                        }
1047
1048                        break;
1049                }
1050        }
1051
1052        delskinconfigtmpall();
1053        delownerrc(skinadjust);
1054        clearscreen(skinadjust);
1055}
1056
1057#endif
Note: See TracBrowser for help on using the repository browser.