source: titan/titan/skinadjust.h @ 38715

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

fix

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