source: titan/titan/skinadjust.h @ 38567

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

fix

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