source: titan/titan/skinadjust.h @ 38540

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

fix

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