source: titan/titan/skinadjust.h @ 39020

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

skinadjust add fontcol2/3

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