source: titan/titan/skinadjust.h @ 38577

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

fix

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