source: titan/titan/skinadjust.h @ 38518

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

add create style function

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