source: titan/titan/skinadjust.h @ 38852

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

skinadjust add bgcol3

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