source: titan/titan/skinadjust.h @ 39538

Last change on this file since 39538 was 39435, checked in by gost, 7 years ago

[titan] arm.. dm900 add some function

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