source: titan/titan/skinadjust.h @ 45021

Last change on this file since 45021 was 41783, checked in by obi, 6 years ago

add dm920 / wetek step 2

File size: 49.9 KB
Line 
1#ifndef SKINADJUST_H
2#define SKINADJUST_H
3
4void screenskinadjust()
5{
6        int rcret = 0, oleftoffset = 0, orightoffset = 0, otopoffset = 0, obottomoffset = 0, reboot = 0;
7        char* tmpstr = NULL;
8        struct skin* skinadjust = getscreen("skinadjust");
9        struct skin* listbox = getscreennode(skinadjust, "listbox");
10        struct skin* fontsizeadjust = getscreennode(skinadjust, "fontsizeadjust");
11        struct skin* listboxselecttype = getscreennode(skinadjust, "listboxselecttype");
12        struct skin* osdtransparent = getscreennode(skinadjust, "osdtransparent");
13        struct skin* blinkoff = getscreennode(skinadjust, "blinkoff");
14        struct skin* leftoffset = getscreennode(skinadjust, "leftoffset");
15        struct skin* rightoffset = getscreennode(skinadjust, "rightoffset");
16        struct skin* topoffset = getscreennode(skinadjust, "topoffset");
17        struct skin* bottomoffset = getscreennode(skinadjust, "bottomoffset");
18        struct skin* showrecfreesize = getscreennode(skinadjust, "showrecfreesize");
19        struct skin* listboxselect = getscreennode(skinadjust, "listboxselect");
20        struct skin* tithek_selectcol = getscreennode(skinadjust, "tithek_selectcol");
21        struct skin* filelistselect = getscreennode(skinadjust, "filelistselect");
22        struct skin* buttonbar_bgcol = getscreennode(skinadjust, "buttonbar_bgcol");
23        struct skin* buttonbar_bgcol2 = getscreennode(skinadjust, "buttonbar_bgcol2");
24        struct skin* buttonbar_bordercol = getscreennode(skinadjust, "buttonbar_bordercol");
25        struct skin* buttonbar_fontcol = getscreennode(skinadjust, "buttonbar_fontcol");
26        struct skin* titlebar_bgcol = getscreennode(skinadjust, "titlebar_bgcol");
27        struct skin* titlebar_bgcol2 = getscreennode(skinadjust, "titlebar_bgcol2");
28        struct skin* titlebar_bordercol = getscreennode(skinadjust, "titlebar_bordercol");
29        struct skin* titlebar_fontcol = getscreennode(skinadjust, "titlebar_fontcol");
30        struct skin* bgcol = getscreennode(skinadjust, "bgcol");
31        struct skin* bgcol2 = getscreennode(skinadjust, "bgcol2");
32        struct skin* 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)
570                {
571                        if(getconfig("av_mode3d", NULL) != NULL)
572                        {
573                                if(ostrcmp(getconfig("av_mode3d", NULL), "sbs") == 0 || ostrcmp(getconfig("av_mode3d", NULL), "tab") == 0) clearfball();
574                        }
575                        else
576                        {
577                                clearfball();
578                        }
579                }
580                drawscreen(skinadjust, 0, 0);
581
582#ifdef MIPSEL
583                if(checkbox("DM7020HD") == 0 && checkbox("DM7020HDV2") == 0 && checkbox("DM900") == 0 && checkbox("DM920") == 0 && checkbox("DM520") == 0 && checkbox("DM525") == 0)
584                        setfbosd();
585#endif
586
587                if(rcret == getrcconfigint("rcexit", NULL))
588                {
589                        addconfigint("fbleftoffset", oleftoffset);
590                        status.leftoffset = getconfigint("fbleftoffset", NULL);
591                        addconfigint("fbrightoffset", orightoffset);
592                        status.rightoffset = getconfigint("fbrightoffset", NULL);
593                        addconfigint("fbtopoffset", otopoffset);
594                        status.topoffset = getconfigint("fbtopoffset", NULL);
595                        addconfigint("fbbottomoffset", obottomoffset);
596                        status.bottomoffset = getconfigint("fbbottomoffset", NULL);
597                        clearfball();
598                        break;
599                }
600
601                if(rcret == getrcconfigint("rcred", NULL))
602                {
603                        if(textbox(_("Message"), _("Reset your Skin Settings ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0) == 1)
604                        {
605                                char* cmd = NULL;
606                                if(ostrcmp(getconfig("skinconfig", NULL), "/mnt/config/skinconfig") == 0)
607                                        cmd = ostrcat("cp -a /etc/titan.restore/mnt/config/skinconfig ", getconfig("skinconfig", NULL), 0, 0);
608                                else
609                                {
610                                        cmd = ostrcat(cmd, "cp -a ", 1, 0);
611                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
612                                        cmd = ostrcat(cmd, ".default ", 1, 0);
613                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
614                                }
615                                printf("cmd: %s\n", cmd);
616                                system(cmd);
617                                free(cmd); cmd = NULL;
618
619                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
620                                oshutdown(3, 0);
621                        }
622                        break;
623                }
624
625                if(rcret == getrcconfigint("rcgreen", NULL))
626                {
627                        if(textbox(_("Message"), _("Create new Skinstyle ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0) == 1)
628                        {
629                                char* search = NULL;
630                                search = textinputhist(_("Skinstyle Name"), " ", "searchhist");
631                                strstrip(search);
632                                if(search != NULL)
633                                {
634                                        drawscreen(load, 0, 0);
635                                        char* cmd = NULL;
636                                        cmd = ostrcat(cmd, "cp ", 1, 0);
637                                        cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
638                                        cmd = ostrcat(cmd, " \"", 1, 0);
639                                        cmd = ostrcat(cmd, skinpath, 1, 0);
640                                        cmd = ostrcat(cmd, "/skinconfig.", 1, 0);
641                                        cmd = ostrcat(cmd, search, 1, 0);
642                                        cmd = ostrcat(cmd, "\"", 1, 0);
643                                        printf("cmd: %s\n", cmd);
644                                        system(cmd);
645                                        free(cmd); cmd = NULL;
646
647                                        delskinconfigtmpall();
648                                        delownerrc(skinadjust);
649                                        clearscreen(skinadjust);
650
651                                        goto start;
652                                }
653                        }
654                        break;
655                }
656
657                if(rcret == getrcconfigint("rcyellow", NULL))
658                {
659                        if(ostrcmp(skinstyle_sel->ret, "skinconfig.default") != 0)
660                        {
661                                tmpstr = string_replace("skinconfig.", "", skinstyle_sel->ret, 0);
662                                char* msg = ostrcat(_("Remove Skinstyle"), NULL, 0, 0);
663                                msg = ostrcat(msg, " '", 1, 0);
664                                msg = ostrcat(msg, tmpstr, 1, 0);
665                                msg = ostrcat(msg, "' ?", 1, 0);
666                                free(tmpstr), tmpstr = NULL;
667
668                                if(textbox(_("Message"), msg, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 0, 0) == 1)
669                                {
670                                        char* cmd = NULL;
671                                        cmd = ostrcat(cmd, "rm \"", 1, 0);
672                                        cmd = ostrcat(cmd, skinpath, 1, 0);
673                                        cmd = ostrcat(cmd, "/", 1, 0);
674                                        cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
675                                        cmd = ostrcat(cmd, "\"", 1, 0);
676                                        printf("cmd: %s\n", cmd);
677                                        system(cmd);
678                                        free(cmd); cmd = NULL;
679
680//                                      delskinconfigtmpall();
681//                                      delownerrc(skinadjust);
682//                                      clearscreen(skinadjust);
683
684//                                      goto start;
685                                        textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
686                                        oshutdown(3, 0);
687                                }
688                                free(msg), msg = NULL;
689                        }
690                }
691
692                if(rcret == getrcconfigint("rcblue", NULL))
693                {
694                        setfbtransparent(255);
695                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "listboxselect") == 0)
696                        {
697                                long oldlistboxselectcol = convertcol("listboxselect");
698                                tmpstr = screencolorpicker(getskinconfig("listboxselect", NULL), 0, 0, 0);
699                                if(tmpstr != NULL)
700                                        addskinconfigtmp("listboxselect", tmpstr);
701                                if(oldlistboxselectcol != convertcol("listboxselect")) reboot = 1;
702                                listboxselect->fontcol2 = convertcol(tmpstr);
703                        }
704
705                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "tithek_selectcol") == 0)
706                        {
707                                long oldtithek_selectcol = convertcol("tithek_selectcol");
708                                tmpstr = screencolorpicker(getskinconfig("tithek_selectcol", NULL), 0, 0, 0);
709                                if(tmpstr != NULL)
710                                        addskinconfigtmp("tithek_selectcol", tmpstr);
711                                if(oldtithek_selectcol != convertcol("tithek_selectcol")) reboot = 1;
712                                tithek_selectcol->fontcol2 = convertcol(tmpstr);
713                        }
714
715                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "filelistselect") == 0)
716                        {
717                                long oldfilelistselect = convertcol("filelistselect");
718                                tmpstr = screencolorpicker(getskinconfig("filelistselect", NULL), 0, 0, 0);
719                                if(tmpstr != NULL)
720                                        addskinconfigtmp("filelistselect", tmpstr);
721                                if(oldfilelistselect != convertcol("filelistselect")) reboot = 1;
722                                filelistselect->fontcol2 = convertcol(tmpstr);
723                        }
724
725                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol") == 0)
726                        {
727                                long oldbuttonbar_bgcol = convertcol("buttonbar_bgcol");
728                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bgcol", NULL), 0, 0, 0);
729                                if(tmpstr != NULL)
730                                        addskinconfigtmp("buttonbar_bgcol", tmpstr);
731                                if(oldbuttonbar_bgcol != convertcol("buttonbar_bgcol")) reboot = 1;
732                                buttonbar_bgcol->fontcol2 = convertcol(tmpstr);
733                        }
734
735                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bgcol2") == 0)
736                        {
737                                long oldbuttonbar_bgcol2 = convertcol("buttonbar_bgcol2");
738                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bgcol2", NULL), 0, 0, 0);
739                                if(tmpstr != NULL)
740                                        addskinconfigtmp("buttonbar_bgcol2", tmpstr);
741                                if(oldbuttonbar_bgcol2 != convertcol("buttonbar_bgcol2")) reboot = 1;
742                                buttonbar_bgcol2->fontcol2 = convertcol(tmpstr);
743                        }
744
745                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_bordercol") == 0)
746                        {
747                                long oldbuttonbar_bordercol = convertcol("buttonbar_bordercol");
748                                tmpstr = screencolorpicker(getskinconfig("buttonbar_bordercol", NULL), 0, 0, 0);
749                                if(tmpstr != NULL)
750                                        addskinconfigtmp("buttonbar_bordercol", tmpstr);
751                                if(oldbuttonbar_bordercol != convertcol("buttonbar_bordercol")) reboot = 1;
752                                buttonbar_bordercol->fontcol2 = convertcol(tmpstr);
753                        }
754
755                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "buttonbar_fontcol") == 0)
756                        {
757                                long oldbuttonbar_fontcol = convertcol("buttonbar_fontcol");
758                                tmpstr = screencolorpicker(getskinconfig("buttonbar_fontcol", NULL), 0, 0, 0);
759                                if(tmpstr != NULL)
760                                        addskinconfigtmp("buttonbar_fontcol", tmpstr);
761                                if(oldbuttonbar_fontcol != convertcol("buttonbar_fontcol")) reboot = 1;
762                                buttonbar_fontcol->fontcol2 = convertcol(tmpstr);
763                        }
764
765                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol") == 0)
766                        {
767                                long oldtitlebar_bgcol = convertcol("titlebar_bgcol");
768                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol", NULL), 0, 0, 0);
769                                if(tmpstr != NULL)
770                                        addskinconfigtmp("titlebar_bgcol", tmpstr);
771                                if(oldtitlebar_bgcol != convertcol("titlebar_bgcol")) reboot = 1;
772                                titlebar_bgcol->fontcol2 = convertcol(tmpstr);
773                        }
774
775                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bgcol2") == 0)
776                        {
777                                long oldtitlebar_bgcol2 = convertcol("titlebar_bgcol2");
778                                tmpstr = screencolorpicker(getskinconfig("titlebar_bgcol2", NULL), 0, 0, 0);
779                                if(tmpstr != NULL)
780                                        addskinconfigtmp("titlebar_bgcol2", tmpstr);
781                                if(oldtitlebar_bgcol2 != convertcol("titlebar_bgcol2")) reboot = 1;
782                                titlebar_bgcol2->fontcol2 = convertcol(tmpstr);
783                        }
784
785                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_bordercol") == 0)
786                        {
787                                long oldtitlebar_bordercol = convertcol("titlebar_bordercol");
788                                tmpstr = screencolorpicker(getskinconfig("titlebar_bordercol", NULL), 0, 0, 0);
789                                if(tmpstr != NULL)
790                                        addskinconfigtmp("titlebar_bordercol", tmpstr);
791                                if(oldtitlebar_bordercol != convertcol("titlebar_bordercol")) reboot = 1;
792                                titlebar_bordercol->fontcol2 = convertcol(tmpstr);
793                        }
794
795                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebar_fontcol") == 0)
796                        {
797                                long oldtitlebar_fontcol = convertcol("titlebar_fontcol");
798                                tmpstr = screencolorpicker(getskinconfig("titlebar_fontcol", NULL), 0, 0, 0);
799                                if(tmpstr != NULL)
800                                        addskinconfigtmp("titlebar_fontcol", tmpstr);
801                                if(oldtitlebar_fontcol != convertcol("titlebar_fontcol")) reboot = 1;
802                                titlebar_fontcol->fontcol2 = convertcol(tmpstr);
803                        }
804
805                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "okcol") == 0)
806                        {
807                                long oldokcol = convertcol("okcol");
808                                tmpstr = screencolorpicker(getskinconfig("okcol", NULL), 0, 0, 0);
809                                if(tmpstr != NULL)
810                                        addskinconfigtmp("okcol", tmpstr);
811                                if(oldokcol != convertcol("okcol")) reboot = 1;
812                                okcol->fontcol2 = convertcol(tmpstr);
813                        }
814
815                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "exitcol") == 0)
816                        {
817                                long oldexitcol = convertcol("exitcol");
818                                tmpstr = screencolorpicker(getskinconfig("exitcol", NULL), 0, 0, 0);
819                                if(tmpstr != NULL)
820                                        addskinconfigtmp("exitcol", tmpstr);
821                                if(oldexitcol != convertcol("exitcol")) reboot = 1;
822                                okcol->fontcol2 = convertcol(tmpstr);
823                        }
824
825                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "deaktivcol") == 0)
826                        {
827                                long olddeaktivcol = convertcol("deaktivcol");
828                                tmpstr = screencolorpicker(getskinconfig("deaktivcol", NULL), 0, 0, 0);
829                                if(tmpstr != NULL)
830                                        addskinconfigtmp("deaktivcol", tmpstr);
831                                if(olddeaktivcol != convertcol("deaktivcol")) reboot = 1;
832                                deaktivcol->fontcol2 = convertcol(tmpstr);
833                        }
834
835                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol") == 0)
836                        {
837                                long oldbgcol = convertcol("bgcol");
838                                tmpstr = screencolorpicker(getskinconfig("bgcol", NULL), 0, 0, 0);
839                                if(tmpstr != NULL)
840                                        addskinconfigtmp("bgcol", tmpstr);
841                                if(oldbgcol != convertcol("bgcol")) reboot = 1;
842                                bgcol->fontcol2 = convertcol(tmpstr);
843                        }
844
845                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol2") == 0)
846                        {
847                                long oldbgcol2 = convertcol("bgcol2");
848                                tmpstr = screencolorpicker(getskinconfig("bgcol2", NULL), 0, 0, 0);
849                                if(tmpstr != NULL)
850                                        addskinconfigtmp("bgcol2", tmpstr);
851                                if(oldbgcol2 != convertcol("bgcol2")) reboot = 1;
852                                bgcol2->fontcol2 = convertcol(tmpstr);
853                        }
854
855                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bgcol3") == 0)
856                        {
857                                long oldbgcol3 = convertcol("bgcol3");
858                                tmpstr = screencolorpicker(getskinconfig("bgcol3", NULL), 0, 0, 0);
859                                if(tmpstr != NULL)
860                                        addskinconfigtmp("bgcol3", tmpstr);
861                                if(oldbgcol3 != convertcol("bgcol3")) reboot = 1;
862                                bgcol3->fontcol2 = convertcol(tmpstr);
863                        }
864
865                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "fontcol") == 0)
866                        {
867                                long oldfontcol = convertcol("fontcol");
868                                tmpstr = screencolorpicker(getskinconfig("fontcol", NULL), 0, 0, 0);
869                                if(tmpstr != NULL)
870                                        addskinconfigtmp("fontcol", tmpstr);
871                                if(oldfontcol != convertcol("fontcol")) reboot = 1;
872                                fontcol->fontcol2 = convertcol(tmpstr);
873                        }
874
875                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "fontcol2") == 0)
876                        {
877                                long oldfontcol2 = convertcol("fontcol2");
878                                tmpstr = screencolorpicker(getskinconfig("fontcol2", NULL), 0, 0, 0);
879                                if(tmpstr != NULL)
880                                        addskinconfigtmp("fontcol2", tmpstr);
881                                if(oldfontcol2 != convertcol("fontcol2")) reboot = 1;
882                                fontcol2->fontcol2 = convertcol(tmpstr);
883                        }
884
885                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "fontcol3") == 0)
886                        {
887                                long oldfontcol3 = convertcol("fontcol3");
888                                tmpstr = screencolorpicker(getskinconfig("fontcol3", NULL), 0, 0, 0);
889                                if(tmpstr != NULL)
890                                        addskinconfigtmp("fontcol3", tmpstr);
891                                if(oldfontcol3 != convertcol("fontcol3")) reboot = 1;
892                                fontcol3->fontcol2 = convertcol(tmpstr);
893                        }
894
895                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "bordercol") == 0)
896                        {
897                                long oldbordercol = convertcol("bordercol");
898                                tmpstr = screencolorpicker(getskinconfig("bordercol", NULL), 0, 0, 0);
899                                if(tmpstr != NULL)
900                                        addskinconfigtmp("bordercol", tmpstr);
901                                if(oldbordercol != convertcol("bordercol")) reboot = 1;
902                                bordercol->fontcol2 = convertcol(tmpstr);
903                        }
904
905                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "progresscol") == 0)
906                        {
907                                long oldprogresscol = convertcol("progresscol");
908                                tmpstr = screencolorpicker(getskinconfig("progresscol", NULL), 0, 0, 0);
909                                if(tmpstr != NULL)
910                                        addskinconfigtmp("progresscol", tmpstr);
911                                if(oldprogresscol != convertcol("progresscol")) reboot = 1;
912                                progresscol->fontcol2 = convertcol(tmpstr);
913                        }
914
915                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "titlebgcol") == 0)
916                        {
917                                long oldtitlebgcol = convertcol("titlebgcol");
918                                tmpstr = screencolorpicker(getskinconfig("titlebgcol", NULL), 0, 0, 0);
919                                if(tmpstr != NULL)
920                                        addskinconfigtmp("titlebgcol", tmpstr);
921                                if(oldtitlebgcol != convertcol("titlebgcol")) reboot = 1;
922                                titlebgcol->fontcol2 = convertcol(tmpstr);
923                        }
924
925                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "markcol") == 0)
926                        {
927                                long oldmarkcol = convertcol("markcol");
928                                tmpstr = screencolorpicker(getskinconfig("markcol", NULL), 0, 0, 0);
929                                if(tmpstr != NULL)
930                                        addskinconfigtmp("markcol", tmpstr);
931                                if(oldmarkcol != convertcol("markcol")) reboot = 1;
932                                markcol->fontcol2 = convertcol(tmpstr);
933                        }
934
935                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_bgcol") == 0)
936                        {
937                                long oldcpmode_bgcol = convertcol("cpmode_bgcol");
938                                tmpstr = screencolorpicker(getskinconfig("cpmode_bgcol", NULL), 0, 0, 0);
939                                if(tmpstr != NULL)
940                                        addskinconfigtmp("cpmode_bgcol", tmpstr);
941                                if(oldcpmode_bgcol != convertcol("cpmode_bgcol")) reboot = 1;
942                                cpmode_bgcol->fontcol2 = convertcol(tmpstr);
943                        }
944
945                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "cpmode_fontcol") == 0)
946                        {
947                                long oldcpmode_fontcol = convertcol("cpmode_fontcol");
948                                tmpstr = screencolorpicker(getskinconfig("cpmode_fontcol", NULL), 0, 0, 0);
949                                if(tmpstr != NULL)
950                                        addskinconfigtmp("cpmode_fontcol", tmpstr);
951                                if(oldcpmode_fontcol != convertcol("cpmode_fontcol")) reboot = 1;
952                                cpmode_fontcol->fontcol2 = convertcol(tmpstr);
953                        }
954
955                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_bgcol") == 0)
956                        {
957                                long oldeditmode_bgcol = convertcol("editmode_bgcol");
958                                tmpstr = screencolorpicker(getskinconfig("editmode_bgcol", NULL), 0, 0, 0);
959                                if(tmpstr != NULL)
960                                        addskinconfigtmp("editmode_bgcol", tmpstr);
961                                if(oldeditmode_bgcol != convertcol("editmode_bgcol")) reboot = 1;
962                                editmode_bgcol->fontcol2 = convertcol(tmpstr);
963                        }
964
965                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "editmode_fontcol") == 0)
966                        {
967                                long oldeditmode_fontcol = convertcol("editmode_fontcol");
968                                tmpstr = screencolorpicker(getskinconfig("editmode_fontcol", NULL), 0, 0, 0);
969                                if(tmpstr != NULL)
970                                        addskinconfigtmp("editmode_fontcol", tmpstr);
971                                if(oldeditmode_fontcol != convertcol("editmode_fontcol")) reboot = 1;
972                                editmode_fontcol->fontcol2 = convertcol(tmpstr);
973                        }
974
975                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_bgcol") == 0)
976                        {
977                                long oldmvmode_bgcol = convertcol("mvmode_bgcol");
978                                tmpstr = screencolorpicker(getskinconfig("mvmode_bgcol", NULL), 0, 0, 0);
979                                if(tmpstr != NULL)
980                                        addskinconfigtmp("mvmode_bgcol", tmpstr);
981                                if(oldmvmode_bgcol != convertcol("mvmode_bgcol")) reboot = 1;
982                                mvmode_bgcol->fontcol2 = convertcol(tmpstr);
983                        }
984
985                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "mvmode_fontcol") == 0)
986                        {
987                                long oldmvmode_fontcol = convertcol("mvmode_fontcol");
988                                tmpstr = screencolorpicker(getskinconfig("mvmode_fontcol", NULL), 0, 0, 0);
989                                if(tmpstr != NULL)
990                                        addskinconfigtmp("mvmode_fontcol", tmpstr);
991                                if(oldmvmode_fontcol != convertcol("mvmode_fontcol")) reboot = 1;
992                                mvmode_fontcol->fontcol2 = convertcol(tmpstr);
993                        }
994
995                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_bgcol") == 0)
996                        {
997                                long oldprotectmode_bgcol = convertcol("protectmode_bgcol");
998                                tmpstr = screencolorpicker(getskinconfig("protectmode_bgcol", NULL), 0, 0, 0);
999                                if(tmpstr != NULL)
1000                                        addskinconfigtmp("protectmode_bgcol", tmpstr);
1001                                if(oldprotectmode_bgcol != convertcol("protectmode_bgcol")) reboot = 1;
1002                                protectmode_bgcol->fontcol2 = convertcol(tmpstr);
1003                        }
1004
1005                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "protectmode_fontcol") == 0)
1006                        {
1007                                long oldprotectmode_fontcol = convertcol("protectmode_fontcol");
1008                                tmpstr = screencolorpicker(getskinconfig("protectmode_fontcol", NULL), 0, 0, 0);
1009                                if(tmpstr != NULL)
1010                                        addskinconfigtmp("protectmode_fontcol", tmpstr);
1011                                if(oldprotectmode_fontcol != convertcol("protectmode_fontcol")) reboot = 1;
1012                                protectmode_fontcol->fontcol2 = convertcol(tmpstr);
1013                        }
1014
1015                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "rec_progress") == 0)
1016                        {
1017                                long oldrec_progress = convertcol("rec_progress");
1018                                tmpstr = screencolorpicker(getskinconfig("rec_progress", NULL), 0, 0, 0);
1019                                if(tmpstr != NULL)
1020                                        addskinconfigtmp("rec_progress", tmpstr);
1021                                if(oldrec_progress != convertcol("rec_progress")) reboot = 1;
1022                                rec_progress->fontcol2 = convertcol(tmpstr);
1023                        }
1024
1025                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol1") == 0)
1026                        {
1027                                long oldepgcol1 = convertcol("epgcol1");
1028                                tmpstr = screencolorpicker(getskinconfig("epgcol1", NULL), 0, 0, 0);
1029                                if(tmpstr != NULL)
1030                                        addskinconfigtmp("epgcol1", tmpstr);
1031                                if(oldepgcol1 != convertcol("epgcol1")) reboot = 1;
1032                                epgcol1->fontcol2 = convertcol(tmpstr);
1033                        }
1034
1035                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol2") == 0)
1036                        {
1037                                long oldepgcol2 = convertcol("epgcol2");
1038                                tmpstr = screencolorpicker(getskinconfig("epgcol2", NULL), 0, 0, 0);
1039                                if(tmpstr != NULL)
1040                                        addskinconfigtmp("epgcol2", tmpstr);
1041                                if(oldepgcol2 != convertcol("epgcol2")) reboot = 1;
1042                                epgcol2->fontcol2 = convertcol(tmpstr);
1043                        }
1044
1045                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "epgcol3") == 0)
1046                        {
1047                                long oldepgcol3 = convertcol("epgcol3");
1048                                tmpstr = screencolorpicker(getskinconfig("epgcol3", NULL), 0, 0, 0);
1049                                if(tmpstr != NULL)
1050                                        addskinconfigtmp("epgcol3", tmpstr);
1051                                if(oldepgcol3 != convertcol("epgcol3")) reboot = 1;
1052                                epgcol3->fontcol2 = convertcol(tmpstr);
1053                        }
1054
1055                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "emuaktivecol") == 0)
1056                        {
1057                                long oldemuaktivecol = convertcol("emuaktivecol");
1058                                tmpstr = screencolorpicker(getskinconfig("emuaktivecol", NULL), 0, 0, 0);
1059                                if(tmpstr != NULL)
1060                                        addskinconfigtmp("emuaktivecol", tmpstr);
1061                                if(oldemuaktivecol != convertcol("emuaktivecol")) reboot = 1;
1062                                emuaktivecol->fontcol2 = convertcol(tmpstr);
1063                        }
1064
1065                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "emurunningcol") == 0)
1066                        {
1067                                long oldemurunningcol = convertcol("emurunningcol");
1068                                tmpstr = screencolorpicker(getskinconfig("emurunningcol", NULL), 0, 0, 0);
1069                                if(tmpstr != NULL)
1070                                        addskinconfigtmp("emurunningcol", tmpstr);
1071                                if(oldemurunningcol != convertcol("emurunningcol")) reboot = 1;
1072                                emurunningcol->fontcol2 = convertcol(tmpstr);
1073                        }
1074
1075                        if(listbox->select != NULL && ostrcmp(listbox->select->name, "favcol") == 0)
1076                        {
1077                                long oldfavcol = convertcol("favcol");
1078                                tmpstr = screencolorpicker(getskinconfig("favcol", NULL), 0, 0, 0);
1079                                if(tmpstr != NULL)
1080                                        addskinconfigtmp("favcol", tmpstr);
1081                                if(oldfavcol != convertcol("favcol")) reboot = 1;
1082                                favcol->fontcol2 = convertcol(tmpstr);
1083                        }
1084                        drawscreen(skinadjust, 0, 0);
1085
1086                        debug(10, "%s set %s", listbox->select->name, tmpstr);
1087                        free(tmpstr), tmpstr = NULL;
1088                        continue;
1089                }
1090
1091                if(rcret == getrcconfigint("rcok", NULL))
1092                {
1093                        char* oldskinstyle_sel = getconfig("skinstyle", NULL);
1094                        addconfigscreencheck("skinstyle", skinstyle_sel, "0");
1095                        if(ostrcmp(oldskinstyle_sel,getconfig("skinstyle", NULL)) != 0)
1096                        {
1097                                writeconfigtmp();
1098
1099                                char* cmd = NULL;
1100                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
1101                                cmd = ostrcat(cmd, skinpath, 1, 0);
1102                                cmd = ostrcat(cmd, "/", 1, 0);
1103                                cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
1104                                cmd = ostrcat(cmd, " ", 1, 0);
1105                                cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
1106                                printf("cmd: %s\n", cmd);
1107                                system(cmd);
1108                                free(cmd); cmd = NULL;
1109
1110                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
1111                                oshutdown(3, 0);
1112                        }
1113
1114                        if(ostrcmp(minitv->ret, "1") == 0) resettvpic();
1115                        int oldminitv = getskinconfigint("minitv", NULL);
1116                        addskinconfigscreencheck("minitv", minitv, "0");
1117                        if(oldminitv != getskinconfigint("minitv", NULL)) reboot = 1;
1118
1119                        int oldfontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
1120                        addskinconfigscreencheck("fontsizeadjust", fontsizeadjust, "0");
1121                        if(oldfontsizeadjust != getskinconfigint("fontsizeadjust", NULL)) reboot = 1;
1122                        status.fontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
1123
1124                        addskinconfigscreencheck("listboxselecttype", listboxselecttype, "0");
1125                        status.listboxselecttype = getskinconfigint("listboxselecttype", NULL);
1126
1127                        addskinconfigscreencheck("osdtransparent", osdtransparent, "0");
1128                        setosdtransparent(getskinconfigint("osdtransparent", NULL));
1129                        addconfigscreencheck("showrecfreesize", showrecfreesize, "0");
1130                        status.showrecfreesize = getconfigint("showrecfreesize", NULL);
1131
1132                        char* oldinfobar_sel = getskinconfig("infobar_selection", NULL);
1133                        addskinconfigscreencheck("infobar_selection", infobar_sel, "0");
1134                        if(ostrcmp(oldinfobar_sel,getskinconfig("infobar_selection", NULL)) != 0) reboot = 1;
1135                        //free(oldinfobar_sel); oldinfobar_sel=NULL;
1136
1137                        char* oldinfobar2_sel = getskinconfig("infobar2_selection", NULL);
1138                        addskinconfigscreencheck("infobar2_selection", infobar2_sel, "0");
1139                        if(ostrcmp(oldinfobar2_sel,getskinconfig("infobar2_selection", NULL)) != 0) reboot = 1;
1140                        //free(oldinfobar2_sel); oldinfobar2_sel=NULL;
1141
1142                        char* oldchannellist_sel = getskinconfig("channellist_selection", NULL);
1143                        addskinconfigscreencheck("channellist_selection", channellist_sel, "0");
1144                        if(ostrcmp(oldchannellist_sel,getskinconfig("channellist_selection", NULL)) != 0) reboot = 1;
1145                        //free(oldchannellist_sel); oldchannellist_sel=NULL;
1146
1147                        char* oldgmultiepg_sel = getskinconfig("gmultiepg_selection", NULL);
1148                        addskinconfigscreencheck("gmultiepg_selection", gmultiepg_sel, "0");
1149                        if(ostrcmp(oldgmultiepg_sel,getskinconfig("gmultiepg_selection", NULL)) != 0) reboot = 1;
1150                        //free(oldgmultiepg_sel); oldgmultiepg_sel=NULL;
1151
1152                        addconfig("skinblinkoff", blinkoff->ret);
1153
1154                        writeskinconfigtmp();
1155
1156                        if(ostrcmp(skinstyle_sel->ret, "skinconfig.default") != 0)
1157                        {
1158                                char* cmd = NULL;
1159                                cmd = ostrcat(cmd, "cp -a ", 1, 0);
1160                                cmd = ostrcat(cmd, getconfig("skinconfig", NULL), 1, 0);
1161                                cmd = ostrcat(cmd, " ", 1, 0);
1162                                cmd = ostrcat(cmd, skinpath, 1, 0);
1163                                cmd = ostrcat(cmd, "/", 1, 0);
1164                                cmd = ostrcat(cmd, skinstyle_sel->ret, 1, 0);
1165                                printf("cmd: %s\n", cmd);
1166                                system(cmd);
1167                                free(cmd); cmd = NULL;
1168                        }
1169
1170                        if(reboot == 1)
1171                        {
1172                                textbox(_("Message"), _("Titan will be restarted!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
1173                                oshutdown(3, 0);
1174                        }
1175
1176                        break;
1177                }
1178        }
1179
1180        setosdtransparent(getskinconfigint("osdtransparent", NULL));
1181
1182        delskinconfigtmpall();
1183        delownerrc(skinadjust);
1184        clearscreen(skinadjust);
1185}
1186
1187#endif
Note: See TracBrowser for help on using the repository browser.