source: titan/titan/skinadjust.h @ 38796

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

fix

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