source: titan/titan/skinadjust.h @ 38537

Last change on this file since 38537 was 38537, checked in by obi, 8 years ago

fix

File size: 42.2 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, "mv -f ", 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.backup", 1, 0);
504                                        printf("cmd: %s\n", cmd);       
505                                        system(cmd);
506                                        free(cmd); cmd = NULL;
507                                        writeskinconfigtmp();
508
509                                        cmd = ostrcat(cmd, "mv -f ", 1, 0);
510                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
511                                        cmd = ostrcat(cmd, " ", 1, 0); 
512                                        cmd = ostrcat(cmd, getconfig("skinpath", NULL), 1, 0);
513                                        cmd = ostrcat(cmd, "/skinconfig.", 1, 0);
514                                        cmd = ostrcat(cmd, search, 1, 0);
515                                        printf("cmd: %s\n", cmd);       
516                                        system(cmd);
517                                        free(cmd); cmd = NULL;
518
519                                        cmd = ostrcat(cmd, "mv -f ", 1, 0);
520                                        cmd = ostrcat(cmd, getconfig("skinpath", NULL), 1, 0);
521                                        cmd = ostrcat(cmd, "/skinconfig.backup", 1, 0);
522                                        cmd = ostrcat(cmd, " ", 1, 0); 
523                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
524                                        printf("cmd: %s\n", cmd);       
525                                        system(cmd);
526                                        free(cmd); cmd = NULL;
527                                       
528                                        delskinconfigtmpall();
529                                        delownerrc(skinadjust);
530                                        clearscreen(skinadjust);
531
532                                        goto start;
533                                }
534                        }
535                        break;
536                }
537
538                if(rcret == getrcconfigint("rcyellow", NULL))
539                {
540                        setfbtransparent(255);
541                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "listboxselect") == 0)
542                        {
543                                long oldlistboxselectcol = convertcol("listboxselect");
544                                tmpstr = screencolorpicker(getskinconfig("listboxselect", NULL), 0, 0, 0);
545                                if(tmpstr != NULL)
546                                        addskinconfigtmp("listboxselect", tmpstr);
547                                if(oldlistboxselectcol != convertcol("listboxselect")) reboot = 1;
548                                listboxselect->fontcol2 = convertcol(tmpstr);
549                        }
550
551                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "tithek_selectcol") == 0)
552                        {
553                                long oldtithek_selectcol = convertcol("tithek_selectcol");
554                                tmpstr = screencolorpicker(getskinconfig("tithek_selectcol", NULL), 0, 0, 0);
555                                if(tmpstr != NULL)
556                                        addskinconfigtmp("tithek_selectcol", tmpstr);
557                                if(oldtithek_selectcol != convertcol("tithek_selectcol")) reboot = 1;
558                                tithek_selectcol->fontcol2 = convertcol(tmpstr);
559                        }
560
561                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "filelistselect") == 0)
562                        {
563                                long oldfilelistselect = convertcol("filelistselect");
564                                tmpstr = screencolorpicker(getskinconfig("filelistselect", NULL), 0, 0, 0);
565                                if(tmpstr != NULL)
566                                        addskinconfigtmp("filelistselect", tmpstr);
567                                if(oldfilelistselect != convertcol("filelistselect")) reboot = 1;
568                                filelistselect->fontcol2 = convertcol(tmpstr);
569                        }
570
571                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol") == 0)
572                        {
573                                long oldbuttonbar_bgcol = convertcol("buttonbar_bgcol");
574                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bgcol", NULL), 0, 0, 0);
575                                if(tmpstr != NULL)
576                                        addskinconfigtmp("buttonbar_bgcol", tmpstr);
577                                if(oldbuttonbar_bgcol != convertcol("buttonbar_bgcol")) reboot = 1;
578                                buttonbar_bgcol->fontcol2 = convertcol(tmpstr);
579                        }
580
581                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol2") == 0)
582                        {
583                                long oldbuttonbar_bgcol2 = convertcol("buttonbar_bgcol2");
584                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bgcol2", NULL), 0, 0, 0);
585                                if(tmpstr != NULL)
586                                        addskinconfigtmp("buttonbar_bgcol2", tmpstr);
587                                if(oldbuttonbar_bgcol2 != convertcol("buttonbar_bgcol2")) reboot = 1;
588                                buttonbar_bgcol2->fontcol2 = convertcol(tmpstr);
589                        }
590
591                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bordercol") == 0)
592                        {
593                                long oldbuttonbar_bordercol = convertcol("buttonbar_bordercol");
594                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bordercol", NULL), 0, 0, 0);
595                                if(tmpstr != NULL)
596                                        addskinconfigtmp("buttonbar_bordercol", tmpstr);
597                                if(oldbuttonbar_bordercol != convertcol("buttonbar_bordercol")) reboot = 1;
598                                buttonbar_bordercol->fontcol2 = convertcol(tmpstr);
599                        }
600
601                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_fontcol") == 0)
602                        {
603                                long oldbuttonbar_fontcol = convertcol("buttonbar_fontcol");
604                                tmpstr = screencolorpicker(getskinconfig("buttonbar_fontcol", NULL), 0, 0, 0);
605                                if(tmpstr != NULL)
606                                        addskinconfigtmp("buttonbar_fontcol", tmpstr);
607                                if(oldbuttonbar_fontcol != convertcol("buttonbar_fontcol")) reboot = 1;
608                                buttonbar_fontcol->fontcol2 = convertcol(tmpstr);
609                        }
610
611                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol") == 0)
612                        {
613                                long oldtitlebar_bgcol = convertcol("titlebar_bgcol");
614                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol", NULL), 0, 0, 0);
615                                if(tmpstr != NULL)
616                                        addskinconfigtmp("titlebar_bgcol", tmpstr);
617                                if(oldtitlebar_bgcol != convertcol("titlebar_bgcol")) reboot = 1;
618                                titlebar_bgcol->fontcol2 = convertcol(tmpstr);
619                        }
620
621                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol2") == 0)
622                        {
623                                long oldtitlebar_bgcol2 = convertcol("titlebar_bgcol2");
624                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol2", NULL), 0, 0, 0);
625                                if(tmpstr != NULL)
626                                        addskinconfigtmp("titlebar_bgcol2", tmpstr);
627                                if(oldtitlebar_bgcol2 != convertcol("titlebar_bgcol2")) reboot = 1;
628                                titlebar_bgcol2->fontcol2 = convertcol(tmpstr);
629                        }
630
631                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bordercol") == 0)
632                        {
633                                long oldtitlebar_bordercol = convertcol("titlebar_bordercol");
634                                tmpstr = screencolorpicker(getskinconfig("titlebar_bordercol", NULL), 0, 0, 0);
635                                if(tmpstr != NULL)
636                                        addskinconfigtmp("titlebar_bordercol", tmpstr);
637                                if(oldtitlebar_bordercol != convertcol("titlebar_bordercol")) reboot = 1;
638                                titlebar_bordercol->fontcol2 = convertcol(tmpstr);
639                        }
640
641                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_fontcol") == 0)
642                        {
643                                long oldtitlebar_fontcol = convertcol("titlebar_fontcol");
644                                tmpstr = screencolorpicker(getskinconfig("titlebar_fontcol", NULL), 0, 0, 0);
645                                if(tmpstr != NULL)
646                                        addskinconfigtmp("titlebar_fontcol", tmpstr);
647                                if(oldtitlebar_fontcol != convertcol("titlebar_fontcol")) reboot = 1;
648                                titlebar_fontcol->fontcol2 = convertcol(tmpstr);
649                        }
650
651                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "okcol") == 0)
652                        {
653                                long oldokcol = convertcol("okcol");
654                                tmpstr = screencolorpicker(getskinconfig("okcol", NULL), 0, 0, 0);
655                                if(tmpstr != NULL)
656                                        addskinconfigtmp("okcol", tmpstr);
657                                if(oldokcol != convertcol("okcol")) reboot = 1;
658                                okcol->fontcol2 = convertcol(tmpstr);
659                        }
660
661                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "exitcol") == 0)
662                        {
663                                long oldexitcol = convertcol("exitcol");
664                                tmpstr = screencolorpicker(getskinconfig("exitcol", NULL), 0, 0, 0);
665                                if(tmpstr != NULL)
666                                        addskinconfigtmp("exitcol", tmpstr);
667                                if(oldexitcol != convertcol("exitcol")) reboot = 1;
668                                okcol->fontcol2 = convertcol(tmpstr);
669                        }
670
671                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "deaktivcol") == 0)
672                        {
673                                long olddeaktivcol = convertcol("deaktivcol");
674                                tmpstr = screencolorpicker(getskinconfig("deaktivcol", NULL), 0, 0, 0);
675                                if(tmpstr != NULL)
676                                        addskinconfigtmp("deaktivcol", tmpstr);
677                                if(olddeaktivcol != convertcol("deaktivcol")) reboot = 1;
678                                deaktivcol->fontcol2 = convertcol(tmpstr);
679                        }
680
681                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol") == 0)
682                        {
683                                long oldbgcol = convertcol("bgcol");
684                                tmpstr = screencolorpicker(getskinconfig("bgcol", NULL), 0, 0, 0);
685                                if(tmpstr != NULL)
686                                        addskinconfigtmp("bgcol", tmpstr);
687                                if(oldbgcol != convertcol("bgcol")) reboot = 1;
688                                bgcol->fontcol2 = convertcol(tmpstr);
689                        }
690
691                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol2") == 0)
692                        {
693                                long oldbgcol2 = convertcol("bgcol2");
694                                tmpstr = screencolorpicker(getskinconfig("bgcol2", NULL), 0, 0, 0);
695                                if(tmpstr != NULL)
696                                        addskinconfigtmp("bgcol2", tmpstr);
697                                if(oldbgcol2 != convertcol("bgcol2")) reboot = 1;
698                                bgcol2->fontcol2 = convertcol(tmpstr);
699                        }
700
701                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "fontcol") == 0)
702                        {
703                                long oldfontcol = convertcol("fontcol");
704                                tmpstr = screencolorpicker(getskinconfig("fontcol", NULL), 0, 0, 0);
705                                if(tmpstr != NULL)
706                                        addskinconfigtmp("fontcol", tmpstr);
707                                if(oldfontcol != convertcol("fontcol")) reboot = 1;
708                                fontcol->fontcol2 = convertcol(tmpstr);
709                        }
710
711                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bordercol") == 0)
712                        {
713                                long oldbordercol = convertcol("bordercol");
714                                tmpstr = screencolorpicker(getskinconfig("bordercol", NULL), 0, 0, 0);
715                                if(tmpstr != NULL)
716                                        addskinconfigtmp("bordercol", tmpstr);
717                                if(oldbordercol != convertcol("bordercol")) reboot = 1;
718                                bordercol->fontcol2 = convertcol(tmpstr);
719                        }
720
721                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "progresscol") == 0)
722                        {
723                                long oldprogresscol = convertcol("progresscol");
724                                tmpstr = screencolorpicker(getskinconfig("progresscol", NULL), 0, 0, 0);
725                                if(tmpstr != NULL)
726                                        addskinconfigtmp("progresscol", tmpstr);
727                                if(oldprogresscol != convertcol("progresscol")) reboot = 1;
728                                progresscol->fontcol2 = convertcol(tmpstr);
729                        }
730
731                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebgcol") == 0)
732                        {
733                                long oldtitlebgcol = convertcol("titlebgcol");
734                                tmpstr = screencolorpicker(getskinconfig("titlebgcol", NULL), 0, 0, 0);
735                                if(tmpstr != NULL)
736                                        addskinconfigtmp("titlebgcol", tmpstr);
737                                if(oldtitlebgcol != convertcol("titlebgcol")) reboot = 1;
738                                titlebgcol->fontcol2 = convertcol(tmpstr);
739                        }
740
741                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "markcol") == 0)
742                        {
743                                long oldmarkcol = convertcol("markcol");
744                                tmpstr = screencolorpicker(getskinconfig("markcol", NULL), 0, 0, 0);
745                                if(tmpstr != NULL)
746                                        addskinconfigtmp("markcol", tmpstr);
747                                if(oldmarkcol != convertcol("markcol")) reboot = 1;
748                                markcol->fontcol2 = convertcol(tmpstr);
749                        }
750
751                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_bgcol") == 0)
752                        {
753                                long oldcpmode_bgcol = convertcol("cpmode_bgcol");
754                                tmpstr = screencolorpicker(getskinconfig("cpmode_bgcol", NULL), 0, 0, 0);
755                                if(tmpstr != NULL)
756                                        addskinconfigtmp("cpmode_bgcol", tmpstr);
757                                if(oldcpmode_bgcol != convertcol("cpmode_bgcol")) reboot = 1;
758                                cpmode_bgcol->fontcol2 = convertcol(tmpstr);
759                        }
760
761                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_fontcol") == 0)
762                        {
763                                long oldcpmode_fontcol = convertcol("cpmode_fontcol");
764                                tmpstr = screencolorpicker(getskinconfig("cpmode_fontcol", NULL), 0, 0, 0);
765                                if(tmpstr != NULL)
766                                        addskinconfigtmp("cpmode_fontcol", tmpstr);
767                                if(oldcpmode_fontcol != convertcol("cpmode_fontcol")) reboot = 1;
768                                cpmode_fontcol->fontcol2 = convertcol(tmpstr);
769                        }
770
771                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_bgcol") == 0)
772                        {
773                                long oldeditmode_bgcol = convertcol("editmode_bgcol");
774                                tmpstr = screencolorpicker(getskinconfig("editmode_bgcol", NULL), 0, 0, 0);
775                                if(tmpstr != NULL)
776                                        addskinconfigtmp("editmode_bgcol", tmpstr);
777                                if(oldeditmode_bgcol != convertcol("editmode_bgcol")) reboot = 1;
778                                editmode_bgcol->fontcol2 = convertcol(tmpstr);
779                        }
780
781                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_fontcol") == 0)
782                        {
783                                long oldeditmode_fontcol = convertcol("editmode_fontcol");
784                                tmpstr = screencolorpicker(getskinconfig("editmode_fontcol", NULL), 0, 0, 0);
785                                if(tmpstr != NULL)
786                                        addskinconfigtmp("editmode_fontcol", tmpstr);
787                                if(oldeditmode_fontcol != convertcol("editmode_fontcol")) reboot = 1;
788                                editmode_fontcol->fontcol2 = convertcol(tmpstr);
789                        }
790
791                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_bgcol") == 0)
792                        {
793                                long oldmvmode_bgcol = convertcol("mvmode_bgcol");
794                                tmpstr = screencolorpicker(getskinconfig("mvmode_bgcol", NULL), 0, 0, 0);
795                                if(tmpstr != NULL)
796                                        addskinconfigtmp("mvmode_bgcol", tmpstr);
797                                if(oldmvmode_bgcol != convertcol("mvmode_bgcol")) reboot = 1;
798                                mvmode_bgcol->fontcol2 = convertcol(tmpstr);
799                        }
800
801                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_fontcol") == 0)
802                        {
803                                long oldmvmode_fontcol = convertcol("mvmode_fontcol");
804                                tmpstr = screencolorpicker(getskinconfig("mvmode_fontcol", NULL), 0, 0, 0);
805                                if(tmpstr != NULL)
806                                        addskinconfigtmp("mvmode_fontcol", tmpstr);
807                                if(oldmvmode_fontcol != convertcol("mvmode_fontcol")) reboot = 1;
808                                mvmode_fontcol->fontcol2 = convertcol(tmpstr);
809                        }
810
811                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_bgcol") == 0)
812                        {
813                                long oldprotectmode_bgcol = convertcol("protectmode_bgcol");
814                                tmpstr = screencolorpicker(getskinconfig("protectmode_bgcol", NULL), 0, 0, 0);
815                                if(tmpstr != NULL)
816                                        addskinconfigtmp("protectmode_bgcol", tmpstr);
817                                if(oldprotectmode_bgcol != convertcol("protectmode_bgcol")) reboot = 1;
818                                protectmode_bgcol->fontcol2 = convertcol(tmpstr);
819                        }
820
821                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_fontcol") == 0)
822                        {
823                                long oldprotectmode_fontcol = convertcol("protectmode_fontcol");
824                                tmpstr = screencolorpicker(getskinconfig("protectmode_fontcol", NULL), 0, 0, 0);
825                                if(tmpstr != NULL)
826                                        addskinconfigtmp("protectmode_fontcol", tmpstr);
827                                if(oldprotectmode_fontcol != convertcol("protectmode_fontcol")) reboot = 1;
828                                protectmode_fontcol->fontcol2 = convertcol(tmpstr);
829                        }
830
831                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "rec_progress") == 0)
832                        {
833                                long oldrec_progress = convertcol("rec_progress");
834                                tmpstr = screencolorpicker(getskinconfig("rec_progress", NULL), 0, 0, 0);
835                                if(tmpstr != NULL)
836                                        addskinconfigtmp("rec_progress", tmpstr);
837                                if(oldrec_progress != convertcol("rec_progress")) reboot = 1;
838                                rec_progress->fontcol2 = convertcol(tmpstr);
839                        }
840
841                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol1") == 0)
842                        {
843                                long oldepgcol1 = convertcol("epgcol1");
844                                tmpstr = screencolorpicker(getskinconfig("epgcol1", NULL), 0, 0, 0);
845                                if(tmpstr != NULL)
846                                        addskinconfigtmp("epgcol1", tmpstr);
847                                if(oldepgcol1 != convertcol("epgcol1")) reboot = 1;
848                                epgcol1->fontcol2 = convertcol(tmpstr);
849                        }                                               
850
851                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol2") == 0)
852                        {
853                                long oldepgcol2 = convertcol("epgcol2");
854                                tmpstr = screencolorpicker(getskinconfig("epgcol2", NULL), 0, 0, 0);
855                                if(tmpstr != NULL)
856                                        addskinconfigtmp("epgcol2", tmpstr);
857                                if(oldepgcol2 != convertcol("epgcol2")) reboot = 1;
858                                epgcol2->fontcol2 = convertcol(tmpstr);
859                        }
860
861                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol3") == 0)
862                        {
863                                long oldepgcol3 = convertcol("epgcol3");
864                                tmpstr = screencolorpicker(getskinconfig("epgcol3", NULL), 0, 0, 0);
865                                if(tmpstr != NULL)
866                                        addskinconfigtmp("epgcol3", tmpstr);
867                                if(oldepgcol3 != convertcol("epgcol3")) reboot = 1;
868                                epgcol3->fontcol2 = convertcol(tmpstr);
869                        }
870
871                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "emuaktivecol") == 0)
872                        {
873                                long oldemuaktivecol = convertcol("emuaktivecol");
874                                tmpstr = screencolorpicker(getskinconfig("emuaktivecol", NULL), 0, 0, 0);
875                                if(tmpstr != NULL)
876                                        addskinconfigtmp("emuaktivecol", tmpstr);
877                                if(oldemuaktivecol != convertcol("emuaktivecol")) reboot = 1;
878                                emuaktivecol->fontcol2 = convertcol(tmpstr);
879                        }
880
881                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "emurunningcol") == 0)
882                        {
883                                long oldemurunningcol = convertcol("emurunningcol");
884                                tmpstr = screencolorpicker(getskinconfig("emurunningcol", NULL), 0, 0, 0);
885                                if(tmpstr != NULL)
886                                        addskinconfigtmp("emurunningcol", tmpstr);
887                                if(oldemurunningcol != convertcol("emurunningcol")) reboot = 1;
888                                emurunningcol->fontcol2 = convertcol(tmpstr);
889                        }
890
891                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "favcol") == 0)
892                        {
893                                long oldfavcol = convertcol("favcol");
894                                tmpstr = screencolorpicker(getskinconfig("favcol", NULL), 0, 0, 0);
895                                if(tmpstr != NULL)
896                                        addskinconfigtmp("favcol", tmpstr);
897                                if(oldfavcol != convertcol("favcol")) reboot = 1;
898                                favcol->fontcol2 = convertcol(tmpstr);
899                        }
900                        setosdtransparent(getskinconfigint("osdtransparent", NULL));
901                        drawscreen(skinadjust, 0, 0);
902
903                        debug(10, "%s set %s", listbox->select->name, tmpstr);
904                        free(tmpstr), tmpstr = NULL;
905                        continue;
906                }
907
908                if(rcret == getrcconfigint("rcok", NULL))
909                {
910                        char* oldskinstyle_sel = getconfig("skinstyle", NULL);
911                        addconfigscreencheck("skinstyle", skinstyle_sel, "0");
912                        if(ostrcmp(oldskinstyle_sel,getconfig("skinstyle", NULL)) != 0)
913                        {
914                                writeconfigtmp();
915
916                                char* cmd = NULL;
917                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
918                                cmd = ostrcat(cmd, getconfig("skinpath", NULL), 1, 0);
919                                cmd = ostrcat(cmd, "/", 1, 0);
920                                cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
921                                cmd = ostrcat(cmd, " ", 1, 0); 
922                                cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
923                                printf("cmd: %s\n", cmd);       
924                                system(cmd);
925                                free(cmd); cmd = NULL;
926
927                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
928                                oshutdown(3, 0);
929                        }
930
931                        if(ostrcmp(minitv->ret, "1") == 0) resettvpic();
932                        int oldminitv = getskinconfigint("minitv", NULL);
933                        addskinconfigscreencheck("minitv", minitv, "0");
934                        if(oldminitv != getskinconfigint("minitv", NULL)) reboot = 1;
935
936                        int oldfontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
937                        addskinconfigscreencheck("fontsizeadjust", fontsizeadjust, "0");
938                        if(oldfontsizeadjust != getskinconfigint("fontsizeadjust", NULL)) reboot = 1;
939                        status.fontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
940
941                        addskinconfigscreencheck("listboxselecttype", listboxselecttype, "0");
942                        status.listboxselecttype = getskinconfigint("listboxselecttype", NULL);
943
944                        addskinconfigscreencheck("osdtransparent", osdtransparent, "0");
945                        setosdtransparent(getskinconfigint("osdtransparent", NULL));
946                        addconfigscreencheck("showrecfreesize", showrecfreesize, "0");
947                        status.showrecfreesize = getconfigint("showrecfreesize", NULL);
948
949                        char* oldinfobar_sel = getskinconfig("infobar_selection", NULL);
950                        addskinconfigscreencheck("infobar_selection", infobar_sel, "0");
951                        if(ostrcmp(oldinfobar_sel,getskinconfig("infobar_selection", NULL)) != 0) reboot = 1;
952                        //free(oldinfobar_sel); oldinfobar_sel=NULL;
953
954                        char* oldinfobar2_sel = getskinconfig("infobar2_selection", NULL);
955                        addskinconfigscreencheck("infobar2_selection", infobar2_sel, "0");
956                        if(ostrcmp(oldinfobar2_sel,getskinconfig("infobar2_selection", NULL)) != 0) reboot = 1;
957                        //free(oldinfobar2_sel); oldinfobar2_sel=NULL;
958
959                        char* oldchannellist_sel = getskinconfig("channellist_selection", NULL);
960                        addskinconfigscreencheck("channellist_selection", channellist_sel, "0");
961                        if(ostrcmp(oldchannellist_sel,getskinconfig("channellist_selection", NULL)) != 0) reboot = 1;
962                        //free(oldchannellist_sel); oldchannellist_sel=NULL;
963
964                        addconfig("skinblinkoff", blinkoff->ret);
965
966                        writeskinconfigtmp();
967
968                        if(reboot == 1)
969                        {
970                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
971                                oshutdown(3, 0);
972                        }
973
974                        break;
975                }
976        }
977
978        delskinconfigtmpall();
979        delownerrc(skinadjust);
980        clearscreen(skinadjust);
981}
982
983#endif
Note: See TracBrowser for help on using the repository browser.