source: titan/titan/adjust.h @ 35769

Last change on this file since 35769 was 35367, checked in by obi, 9 years ago

fix community hid

File size: 23.6 KB
Line 
1#ifndef ADJUST_H
2#define ADJUST_H
3
4void screenadjust()
5{
6        int rcret = 0;
7        char* tmpstr = NULL;
8       
9        struct skin* adjust = getscreen("adjust");
10        struct skin* listbox = getscreennode(adjust, "listbox");
11        struct skin* volbartimeout = getscreennode(adjust, "volbartimeout");
12        struct skin* infobartimeout = getscreennode(adjust, "infobartimeout");
13        struct skin* infobarsleep = getscreennode(adjust, "infobarsleep");
14        struct skin* secondinfobar = getscreennode(adjust, "secondinfobar");
15        struct skin* spinnerspeed = getscreennode(adjust, "spinnerspeed");
16        struct skin* spinnertime = getscreennode(adjust, "spinnertime");
17        struct skin* hangtime = getscreennode(adjust, "hangtime");
18        struct skin* nozapclear = getscreennode(adjust, "nozapclear");
19        struct skin* fastzap = getscreennode(adjust, "fastzap");
20        struct skin* faststop = getscreennode(adjust, "faststop");
21        struct skin* dirsort = getscreennode(adjust, "dirsort");
22        struct skin* poweraktion = getscreennode(adjust, "poweraktion");
23        struct skin* frontpoweraktion = getscreennode(adjust, "frontpoweraktion");
24        struct skin* virtualzap = getscreennode(adjust, "virtualzap");
25        struct skin* fasttextrender = getscreennode(adjust, "fasttextrender");
26        struct skin* recsplitsize = getscreennode(adjust, "recsplitsize");
27        struct skin* recforerun = getscreennode(adjust, "recforerun");
28        struct skin* recoverrun = getscreennode(adjust, "recoverrun");
29        struct skin* skip13 = getscreennode(adjust, "skip13");
30        struct skin* skip46 = getscreennode(adjust, "skip46");
31        struct skin* skip79 = getscreennode(adjust, "skip79");
32        struct skin* playertype = getscreennode(adjust, "playertype");
33        struct skin* autochangechannelname = getscreennode(adjust, "autochangechannelname");
34        struct skin* def_rectimer_after = getscreennode(adjust, "def_rectimer_after");
35        struct skin* showchanneltimeline = getscreennode(adjust, "showchanneltimeline");
36        struct skin* screenanim = getscreennode(adjust, "screenanim");
37        struct skin* screenanimspeed = getscreennode(adjust, "screenanimspeed");
38        struct skin* channellistview = getscreennode(adjust, "channellistview");
39        struct skin* showlastpos = getscreennode(adjust, "showlastpos");
40        struct skin* recsync = getscreennode(adjust, "recsync");
41        struct skin* recordnamefmt = getscreennode(adjust, "recordnamefmt");
42        struct skin* newsletter = getscreennode(adjust, "newsletter");
43        struct skin* showhiddenfiles = getscreennode(adjust, "showhiddenfiles");
44        struct skin* expertmodus = getscreennode(adjust, "expertmodus");
45        struct skin* infobarprogram = getscreennode(adjust, "infobarprogram");
46        struct skin* crosscontrol = getscreennode(adjust, "crosscontrol");
47        struct skin* emucontrol = getscreennode(adjust, "emucontrol");
48        struct skin* minitv = getscreennode(adjust, "choiceminitv");
49        struct skin* usecec = getscreennode(adjust, "usecec");
50        struct skin* playerbuffersize = getscreennode(adjust, "playerbuffersize");
51        struct skin* playerbufferseektime = getscreennode(adjust, "playerbufferseektime");
52        struct skin* sataswitch = getscreennode(adjust, "sataswitch");
53        struct skin* dualboot = getscreennode(adjust, "dualboot");
54        struct skin* community_user = getscreennode(adjust, "community_user");
55        struct skin* community_pass = getscreennode(adjust, "community_pass");
56        struct skin* debuglevel = getscreennode(adjust, "debuglevel");
57
58        struct skin* tmp = NULL;
59
60        changeinput(volbartimeout, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10");
61        setchoiceboxselection(volbartimeout, getconfig("volbartimeout", NULL));
62
63        changeinput(infobartimeout, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n20\n30\n60\n10000");
64        setchoiceboxselection(infobartimeout, getconfig("infobartimeout", NULL));
65
66        changeinput(infobarsleep, "0\n1\n2\n3\n4\n5");
67        setchoiceboxselection(infobarsleep, getconfig("infobarsleep", NULL));
68
69        addchoicebox(secondinfobar, "0", _("no"));
70        addchoicebox(secondinfobar, "1", _("infobar"));
71        addchoicebox(secondinfobar, "2", _("EPG"));
72        addchoicebox(secondinfobar, "3", _("Channel EPG"));
73        setchoiceboxselection(secondinfobar, getconfig("secondinfobar", NULL));
74
75        changeinput(spinnerspeed, "1\n3\n9\n12\n15\n18\n21\n24\n27\n30");
76        setchoiceboxselection(spinnerspeed, getconfig("spinnerspeed", NULL));
77
78        changeinput(spinnertime, "1\n2\n3\n4\n5\n6\n7\n8\n10000");
79        setchoiceboxselection(spinnertime, getconfig("spinnertime", NULL));
80
81        changeinput(hangtime, "5\n10\n15\n30\n60\n120\n10000");
82        setchoiceboxselection(hangtime, getconfig("hangtime", NULL));
83
84        addchoicebox(nozapclear, "0", _("no"));
85        addchoicebox(nozapclear, "1", _("yes"));
86        setchoiceboxselection(nozapclear, getconfig("nozapclear", NULL));
87
88        if(checkbox("ATEMIO7600") == 1)
89                fastzap->hidden = YES;
90        else
91                fastzap->hidden = NO;
92       
93        addchoicebox(fastzap, "0", _("no"));
94        addchoicebox(fastzap, "2", _("medium"));
95        addchoicebox(fastzap, "1", _("fast"));
96        setchoiceboxselection(fastzap, getconfig("fastzap", NULL));
97
98        addchoicebox(faststop, "0", _("no"));
99        addchoicebox(faststop, "1", _("yes"));
100        setchoiceboxselection(faststop, getconfig("faststop", NULL));
101
102        addchoicebox(dirsort, "0", _("alpha"));
103        addchoicebox(dirsort, "1", _("reverse alpha"));
104        addchoicebox(dirsort, "2", _("size"));
105        addchoicebox(dirsort, "3", _("reverse size"));
106        addchoicebox(dirsort, "4", _("date"));
107        addchoicebox(dirsort, "5", _("reverse date"));
108        setchoiceboxselection(dirsort, getconfig("dirsort", NULL));
109
110        addchoicebox(poweraktion, "0", _("Power Menu"));
111        addchoicebox(poweraktion, "1", _("Power Off"));
112        addchoicebox(poweraktion, "2", _("Standby"));
113        addchoicebox(poweraktion, "3", _("Restart"));
114        addchoicebox(poweraktion, "4", _("GUI Restart"));
115        setchoiceboxselection(poweraktion, getconfig("poweraktion", NULL));
116
117        addchoicebox(frontpoweraktion, "1", _("Power Off"));
118        addchoicebox(frontpoweraktion, "2", _("Standby"));
119        setchoiceboxselection(frontpoweraktion, getconfig("frontpoweraktion", NULL));
120
121        addchoicebox(virtualzap, "0", _("deaktiv"));
122        addchoicebox(virtualzap, "1", _("1 sec"));
123        addchoicebox(virtualzap, "2", _("2 sec"));
124        addchoicebox(virtualzap, "9999", _("endless"));
125        setchoiceboxselection(virtualzap, getconfig("virtualzap", NULL));
126       
127        addchoicebox(fasttextrender, "0", _("no"));
128        addchoicebox(fasttextrender, "1", _("yes"));
129        setchoiceboxselection(fasttextrender, getconfig("fasttextrender", NULL));
130
131        addchoicebox(recsplitsize, "0", _("deaktiv"));
132        addchoicebox(recsplitsize, "1", _("1 GB"));
133        addchoicebox(recsplitsize, "2", _("2 GB"));
134        addchoicebox(recsplitsize, "3", _("3 GB"));
135        addchoicebox(recsplitsize, "4", _("4 GB"));
136        setchoiceboxselection(recsplitsize, getconfig("recsplitsize", NULL));
137
138        changeinput(recforerun, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60");
139        setchoiceboxselection(recforerun, getconfig("recforerun", NULL));
140
141        changeinput(recoverrun, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60");
142        setchoiceboxselection(recoverrun, getconfig("recoverrun", NULL));
143
144        changeinput(skip13, "15\n20\n30\n45\n60\n90\n120\n180\n300\n600\n900\n1200");
145        setchoiceboxselection(skip13, getconfig("skip13", NULL));
146
147        changeinput(skip46, "15\n20\n30\n45\n60\n90\n120\n180\n300\n600\n900\n1200");
148        setchoiceboxselection(skip46, getconfig("skip46", NULL));
149
150        changeinput(skip79, "15\n20\n30\n45\n60\n90\n120\n180\n300\n600\n900\n1200");
151        setchoiceboxselection(skip79, getconfig("skip79", NULL));
152       
153        addchoicebox(playertype, "0", _("extern"));
154        addchoicebox(playertype, "1", _("intern"));
155        setchoiceboxselection(playertype, getconfig("playertype", NULL));
156       
157        addchoicebox(autochangechannelname, "0", _("no"));
158        addchoicebox(autochangechannelname, "1", _("yes"));
159        setchoiceboxselection(autochangechannelname, getconfig("autochangechannelname", NULL));
160
161        addchoicebox(def_rectimer_after, "0", _("auto"));
162        addchoicebox(def_rectimer_after, "1", _("nothing"));
163        addchoicebox(def_rectimer_after, "2", _("standby"));
164        addchoicebox(def_rectimer_after, "3", _("power off"));
165        setchoiceboxselection(def_rectimer_after, getconfig("def_rectimer_after", NULL));
166       
167        addchoicebox(showchanneltimeline, "0", _("no"));
168        addchoicebox(showchanneltimeline, "1", _("yes"));
169        setchoiceboxselection(showchanneltimeline, getconfig("showchanneltimeline", NULL));
170       
171        addchoicebox(screenanim, "0", _("no"));
172        addchoicebox(screenanim, "1", _("anim. width"));
173        addchoicebox(screenanim, "2", _("anim. height"));
174        addchoicebox(screenanim, "3", _("anim. both"));
175        setchoiceboxselection(screenanim, getconfig("screenanim", NULL));
176       
177        addchoicebox(screenanimspeed, "1", _("very fast"));
178        addchoicebox(screenanimspeed, "5", _("fast"));
179        addchoicebox(screenanimspeed, "10", _("normal"));
180        addchoicebox(screenanimspeed, "15", _("slow"));
181        addchoicebox(screenanimspeed, "20", _("very slow"));
182        setchoiceboxselection(screenanimspeed, getconfig("screenanimspeed", NULL));
183
184        addchoicebox(channellistview, "0", _("hidden"));
185        addchoicebox(channellistview, "1", _("deaktiv"));
186        setchoiceboxselection(channellistview, getconfig("channellistview", NULL));
187
188        addchoicebox(showlastpos, "0", _("no"));       
189        addchoicebox(showlastpos, "1", _("yes"));
190        setchoiceboxselection(showlastpos, getconfig("showlastpos", NULL));
191
192        addchoicebox(recsync, "0", _("no"));   
193        addchoicebox(recsync, "1", _("yes"));
194        setchoiceboxselection(recsync, getconfig("recsync", NULL));
195
196        addchoicebox(recordnamefmt, "0", _("channel-movie"));
197        addchoicebox(recordnamefmt, "1", _("movie-channel"));
198        setchoiceboxselection(recordnamefmt, getconfig("recordnamefmt", NULL));
199
200        addchoicebox(newsletter, "0", _("no"));
201        addchoicebox(newsletter, "1", _("yes"));
202        setchoiceboxselection(newsletter, getconfig("newsletter", NULL));
203
204        addchoicebox(showhiddenfiles, "0", _("no"));
205        addchoicebox(showhiddenfiles, "1", _("yes"));
206        setchoiceboxselection(showhiddenfiles, getconfig("showhiddenfiles", NULL));
207
208        addchoicebox(expertmodus, "0", _("no"));
209        addchoicebox(expertmodus, "10", _("yes"));
210        if(getconfigint("expertmodus", NULL) == 11)
211                addchoicebox(expertmodus, "11", _("expert (11)"));
212        setchoiceboxselection(expertmodus, getconfig("expertmodus", NULL));
213
214        addchoicebox(infobarprogram, "0", _("no"));
215        addchoicebox(infobarprogram, "1", _("yes"));
216        setchoiceboxselection(infobarprogram, getconfig("infobarprogram", NULL));
217
218        addchoicebox(crosscontrol, "0", _("no"));
219        addchoicebox(crosscontrol, "1", _("yes"));
220        addchoicebox(crosscontrol, "2", _("yes / vzap 1 sec"));
221        addchoicebox(crosscontrol, "3", _("yes / vzap 2 sec"));
222        addchoicebox(crosscontrol, "9999", _("yes / vzap endless"));
223        setchoiceboxselection(crosscontrol, getconfig("crosscontrol", NULL));
224
225        addchoicebox(emucontrol, "0", _("no"));
226        addchoicebox(emucontrol, "1", _("yes"));
227        setchoiceboxselection(emucontrol, getconfig("emucontrol", NULL));
228
229        addchoicebox(minitv, "0", _("no"));
230        addchoicebox(minitv, "1", _("yes"));
231        setchoiceboxselection(minitv, getconfig("minitv", NULL));
232
233        addchoicebox(usecec, "0", _("no"));
234        addchoicebox(usecec, "1", _("yes"));
235        setchoiceboxselection(usecec, getconfig("usecec", NULL));
236
237        if(!file_exist("/mnt/config/dualboot"))
238        {
239                addchoicebox(dualboot, "0", _("no"));
240                addchoicebox(dualboot, "1", _("yes"));
241        }
242        else
243        {
244                addchoicebox(dualboot, "1", _("yes"));
245                addchoicebox(dualboot, "0", _("no"));
246        }
247        setchoiceboxselection(dualboot, getconfig("dualboot", NULL));
248
249        changemask(community_user, "****");
250        if(getconfig("community_user", NULL) == NULL)
251                changeinput(community_user, getconfig("community_user", NULL));
252        else
253                changeinput(community_pass, "****");
254               
255        changemask(community_pass, "****");
256        if(getconfig("community_pass", NULL) == NULL)
257                changeinput(community_pass, getconfig("community_pass", NULL));
258        else
259                changeinput(community_pass, "****");
260       
261
262// setdebuglevel
263#ifndef BETA
264        debuglevel->hidden = YES;
265#else
266        tmpstr = ostrcat("10 - ", _("Minimal"), 0, 0); 
267        addchoicebox(debuglevel, "10", tmpstr);
268        free(tmpstr), tmpstr = NULL;
269       
270        tmpstr = ostrcat("40 - ", _("MTD Operation/System Update"), 0, 0);     
271        addchoicebox(debuglevel, "40", tmpstr);
272        free(tmpstr), tmpstr = NULL;
273       
274        tmpstr = ostrcat("50 - ", _("MediaCenter"), 0, 0);     
275        addchoicebox(debuglevel, "50", tmpstr);
276        free(tmpstr), tmpstr = NULL;
277       
278        tmpstr = ostrcat("55 - ", _("Network Interface"), 0, 0);       
279        addchoicebox(debuglevel, "55", tmpstr);
280        free(tmpstr), tmpstr = NULL;
281       
282        tmpstr = ostrcat("60 - ", _("Key Actions"), 0, 0);     
283        addchoicebox(debuglevel, "60", tmpstr);
284        free(tmpstr), tmpstr = NULL;
285       
286        tmpstr = ostrcat("70 - ", _("Networkbrowser"), 0, 0);   
287        addchoicebox(debuglevel, "70", tmpstr);
288        free(tmpstr), tmpstr = NULL;
289       
290        tmpstr = ostrcat("77 - ", _("Web Adjust"), 0, 0);       
291        addchoicebox(debuglevel, "77", tmpstr);
292        free(tmpstr), tmpstr = NULL;
293       
294        tmpstr = ostrcat("80 - ", _("Harddisk"), 0, 0);
295        addchoicebox(debuglevel, "80", tmpstr);
296        free(tmpstr), tmpstr = NULL;
297       
298        tmpstr = ostrcat("81 - ", _("MultiImage"), 0, 0);       
299        addchoicebox(debuglevel, "81", tmpstr);
300        free(tmpstr), tmpstr = NULL;
301       
302        tmpstr = ostrcat("90 - ", _("Screensaver"), 0, 0);     
303        addchoicebox(debuglevel, "90", tmpstr);
304        free(tmpstr), tmpstr = NULL;
305       
306        tmpstr = ostrcat("99 - ", _("Tithek/HTTP Header/Community"), 0, 0);     
307        addchoicebox(debuglevel, "99", tmpstr);
308        free(tmpstr), tmpstr = NULL;
309       
310        tmpstr = ostrcat("100 - ", _("Global"), 0, 0); 
311        addchoicebox(debuglevel, "100", tmpstr);
312        free(tmpstr), tmpstr = NULL;
313       
314        tmpstr = ostrcat("110 - ", _("Stringconvert"), 0, 0);   
315        addchoicebox(debuglevel, "110", tmpstr);
316        free(tmpstr), tmpstr = NULL;
317       
318        tmpstr = ostrcat("130 - ", _("TPK"), 0, 0);     
319        addchoicebox(debuglevel, "130", tmpstr);
320        free(tmpstr), tmpstr = NULL;
321       
322        tmpstr = ostrcat("133 - ", _("MediaDB/IMDb/TMDb"), 0, 0);       
323        addchoicebox(debuglevel, "133", tmpstr);
324        free(tmpstr), tmpstr = NULL;
325       
326        tmpstr = ostrcat("150 - ", _("ePlayer"), 0, 0);
327        addchoicebox(debuglevel, "150", tmpstr);
328        free(tmpstr), tmpstr = NULL;
329       
330        tmpstr = ostrcat("200 - ", _("DVB Devices"), 0, 0);     
331        addchoicebox(debuglevel, "200", tmpstr);
332        free(tmpstr), tmpstr = NULL;
333       
334        tmpstr = ostrcat("201 - ", _("CA Device"), 0, 0);       
335        addchoicebox(debuglevel, "201", tmpstr);
336        free(tmpstr), tmpstr = NULL;
337       
338        tmpstr = ostrcat("250 - ", _("HTTP Server/Stream/Record"), 0, 0);       
339        addchoicebox(debuglevel, "250", tmpstr);
340        free(tmpstr), tmpstr = NULL;
341       
342        tmpstr = ostrcat("270 - ", _("Radiotext"), 0, 0);       
343        addchoicebox(debuglevel, "270", tmpstr);
344        free(tmpstr), tmpstr = NULL;
345       
346        tmpstr = ostrcat("278 - ", _("ID3"), 0, 0);     
347        addchoicebox(debuglevel, "278", tmpstr);
348        free(tmpstr), tmpstr = NULL;
349       
350        tmpstr = ostrcat("300 - ", _("Subtitle"), 0, 0);       
351        addchoicebox(debuglevel, "300", tmpstr);
352        free(tmpstr), tmpstr = NULL;
353       
354        tmpstr = ostrcat("307 - ", _("Thumbnails"), 0, 0);     
355        addchoicebox(debuglevel, "307", tmpstr);
356        free(tmpstr), tmpstr = NULL;
357       
358        tmpstr = ostrcat("333 - ", _("DVD Player"), 0, 0);     
359        addchoicebox(debuglevel, "333", tmpstr);
360        free(tmpstr), tmpstr = NULL;
361/*     
362        tmpstr = ostrcat("369 - ", _("Facebook"), 0, 0);       
363        addchoicebox(debuglevel, "369", tmpstr);
364        free(tmpstr), tmpstr = NULL;
365*/     
366        tmpstr = ostrcat("400 - ", _("EPG Task"), 0, 0);       
367        addchoicebox(debuglevel, "400", tmpstr);
368        free(tmpstr), tmpstr = NULL;
369       
370       
371        tmpstr = ostrcat("401 - ", _("Old Entry"), 0, 0);       
372        addchoicebox(debuglevel, "401", tmpstr);
373        free(tmpstr), tmpstr = NULL;
374       
375        tmpstr = ostrcat("427 - ", _("Newsletter"), 0, 0);     
376        addchoicebox(debuglevel, "427", tmpstr);
377        free(tmpstr), tmpstr = NULL;
378       
379        tmpstr = ostrcat("444 - ", _("Framebuffer"), 0, 0);     
380        addchoicebox(debuglevel, "444", tmpstr);
381        free(tmpstr), tmpstr = NULL;
382       
383        tmpstr = ostrcat("500 - ", _("Channel Scan"), 0, 0);   
384        addchoicebox(debuglevel, "500", tmpstr);
385        free(tmpstr), tmpstr = NULL;
386       
387        tmpstr = ostrcat("555 - ", _("Draw Screen"), 0, 0);     
388        addchoicebox(debuglevel, "555", tmpstr);
389        free(tmpstr), tmpstr = NULL;
390       
391        tmpstr = ostrcat("620 - ", _("CA"), 0, 0);     
392        addchoicebox(debuglevel, "620", tmpstr);
393        free(tmpstr), tmpstr = NULL;
394       
395        tmpstr = ostrcat("777 - ", _("MediaDB"), 0, 0);
396        addchoicebox(debuglevel, "777", tmpstr);
397        free(tmpstr), tmpstr = NULL;
398/*     
399        tmpstr = ostrcat("788 - ", _("HbbTV"), 0, 0);   
400        addchoicebox(debuglevel, "788", tmpstr);
401        free(tmpstr), tmpstr = NULL;
402*/     
403        tmpstr = ostrcat("900 - ", _("Mutex"), 0, 0);   
404        addchoicebox(debuglevel, "900", tmpstr);
405        free(tmpstr), tmpstr = NULL;
406       
407        tmpstr = ostrcat("913 - ", _("File Operation"), 0, 0); 
408        addchoicebox(debuglevel, "913", tmpstr);
409        free(tmpstr), tmpstr = NULL;
410       
411        tmpstr = ostrcat("975 - ", _("SMTP"), 0, 0);   
412        addchoicebox(debuglevel, "975", tmpstr);
413        free(tmpstr), tmpstr = NULL;
414       
415        tmpstr = ostrcat("4440 - ", _("PiP"), 0, 0);   
416        addchoicebox(debuglevel, "4440", tmpstr);
417        free(tmpstr), tmpstr = NULL;
418       
419        setchoiceboxselection(debuglevel, getconfig("debuglevel", NULL));
420#endif
421
422
423#ifdef MIPSEL
424        dualboot->hidden = NO;
425        frontpoweraktion->hidden = NO;
426#else
427        dualboot->hidden = YES;
428        frontpoweraktion->hidden = YES;
429#endif
430
431        if(!file_exist("/usr/bin/enigma2"))
432                dualboot->hidden = YES;
433
434        if(status.security == 0 || checkemu() == 0)
435                emucontrol->hidden = YES;
436        else
437                emucontrol->hidden = NO;
438        if(checkbox("ATEMIO510") == 1 || checkbox("UFS912") == 1 || checkbox("UFS913") == 1 || checkbox("ATEMIO7600") == 1 || checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1 || checkbox("SPARK") == 1 || checkbox("SPARK7162") == 1)
439                usecec->hidden = NO;
440        else
441                usecec->hidden = YES;
442
443        if(checkbox("ATEMIO7600") == 1)
444        {
445                sataswitch->hidden = NO;
446                addchoicebox(sataswitch, "0", _("extern"));
447                addchoicebox(sataswitch, "1", _("intern"));
448                tmpstr = getsataswitch();
449                setchoiceboxselection(sataswitch, tmpstr);
450                free(tmpstr); tmpstr = NULL;
451        }
452        else
453                sataswitch->hidden = YES;
454       
455        addchoicebox(playerbuffersize, "0", _("no"));
456        addchoicebox(playerbuffersize, "524288", "512KB");
457        addchoicebox(playerbuffersize, "1048576", "1MB");
458        addchoicebox(playerbuffersize, "1572864", "1,5MB");
459        addchoicebox(playerbuffersize, "2097152", "2MB");
460        addchoicebox(playerbuffersize, "2621440", "2,5MB");
461        addchoicebox(playerbuffersize, "3145728", "3MB");
462        addchoicebox(playerbuffersize, "3670016", "3,5MB");
463        addchoicebox(playerbuffersize, "4194304", "4MB");
464        addchoicebox(playerbuffersize, "4718592", "4,5MB");
465        addchoicebox(playerbuffersize, "5242880", "5MB");
466        setchoiceboxselection(playerbuffersize, getconfig("playerbuffersize", NULL));
467       
468        addchoicebox(playerbufferseektime, "0", "0");
469        addchoicebox(playerbufferseektime, "1", "1");
470        addchoicebox(playerbufferseektime, "2", "2");
471        addchoicebox(playerbufferseektime, "3", "3");
472        addchoicebox(playerbufferseektime, "4", "4");
473        addchoicebox(playerbufferseektime, "5", "5");
474        addchoicebox(playerbufferseektime, "6", "6");
475        addchoicebox(playerbufferseektime, "7", "7");
476        addchoicebox(playerbufferseektime, "8", "8");
477        addchoicebox(playerbufferseektime, "9", "9");
478        addchoicebox(playerbufferseektime, "10", "10");
479        setchoiceboxselection(playerbufferseektime, getconfig("playerbufferseektime", NULL));
480
481        drawscreen(adjust, 0, 0);
482        addscreenrc(adjust, listbox);
483
484        tmp = listbox->select;
485        while(1)
486        {
487                addscreenrc(adjust, tmp);
488                rcret = waitrc(adjust, 0, 0);
489                tmp = listbox->select;
490
491                if(rcret == getrcconfigint("rcexit", NULL)) break;
492                if(rcret == getrcconfigint("rcok", NULL))
493                {
494                        addconfigscreen("volbartimeout", volbartimeout);
495                        addconfigscreen("infobartimeout", infobartimeout);
496                        addconfigscreen("infobarsleep", infobarsleep);
497                        addconfigscreencheck("secondinfobar", secondinfobar, "0");             
498                        addconfigscreen("spinnerspeed", spinnerspeed);
499                        status.spinnerspeed = getconfigint("spinnerspeed", NULL);
500                        addconfigscreen("spinnertime", spinnertime);
501                        status.spinnertime = getconfigint("spinnertime", NULL);
502                        addconfigscreen("hangtime", hangtime);
503                        status.hangtime = getconfigint("hangtime", NULL);
504                        addconfigscreencheck("nozapclear", nozapclear, "0");
505                        addconfigscreencheck("fastzap", fastzap, "0");
506                        addconfigscreencheck("faststop", faststop, "0");
507                        addconfigscreencheck("dirsort", dirsort, "0");
508                        addconfigscreencheck("poweraktion", poweraktion, "0");
509                        addconfigscreencheck("frontpoweraktion", frontpoweraktion, "0");
510                        addconfigscreencheck("recforerun", recforerun, "0");
511                        addconfigscreencheck("recoverrun", recoverrun, "0");
512                        addconfigscreencheck("virtualzap", virtualzap, "0");
513                        status.virtualzap = getconfigint("virtualzap", NULL);
514                        if(fasttextrender->ret != NULL)
515                        {
516                                addconfigscreencheck("fasttextrender", fasttextrender, "0");
517                                status.fasttextrender = atoi(fasttextrender->ret);
518                        }
519                        if(recsplitsize->ret != NULL)
520                        {
521                                addconfigscreencheck("recsplitsize", recsplitsize, "0");
522                                status.recsplitsize = atoi(recsplitsize->ret);
523                                status.recsplitsize *= 1000 * 1000 * 1000;
524                        }
525                        addconfigscreen("skip13", skip13);
526                        addconfigscreen("skip46", skip46);
527                        addconfigscreen("skip79", skip79);
528                        addconfigscreencheck("playertype", playertype, "1");
529                        addconfigscreencheck("autochangechannelname", autochangechannelname, "0");
530                        status.autochangechannelname = getconfigint("autochangechannelname", NULL);
531                        addconfigscreencheck("def_rectimer_after", def_rectimer_after, "0");
532                        addconfigscreencheck("showchanneltimeline", showchanneltimeline, "0");
533                        status.showchanneltimeline = getconfigint("showchanneltimeline", NULL);
534                        addconfigscreencheck("screenanim", screenanim, "0");
535                        status.screenanim = getconfigint("screenanim", NULL);
536                        addconfigscreencheck("screenanimspeed", screenanimspeed, "1");
537                        status.screenanimspeed = getconfigint("screenanimspeed", NULL);
538                        addconfigscreencheck("channellistview", channellistview, "0");
539                        status.channellistview = getconfigint("channellistview", NULL);
540                        addconfigscreencheck("showlastpos", showlastpos, "0");
541                        addconfigscreencheck("recsync", recsync, "0");
542                        addconfigscreencheck("recordnamefmt", recordnamefmt, "0");
543
544                        addconfigscreen("newsletter", newsletter);
545                        if(newsletter->ret != NULL && ostrcmp(newsletter->ret, "0") == 0)
546                                startnewsletter(0);
547                        else
548                                startnewsletter(1);
549
550                        addconfigscreen("showhiddenfiles", showhiddenfiles);
551                        status.showhiddenfiles = getconfigint("showhiddenfiles", NULL);
552                        addconfigscreencheck("expertmodus", expertmodus, "0");
553                        status.expertmodus = getconfigint("expertmodus", NULL);                                 
554                        addconfigscreencheck("infobarprogram", infobarprogram, "0");
555                        status.infobarprogram = getconfigint("infobarprogram", NULL);
556                        addconfigscreen("crosscontrol", crosscontrol);
557                        //addconfigscreencheck("crosscontrol", crosscontrol, "0");
558                        status.crosscontrol = getconfigint("crosscontrol", NULL);
559                        addconfigscreencheck("emucontrol", emucontrol, "0");
560
561                        if(ostrcmp(minitv->ret, "1") == 0) resettvpic();
562                        addconfigscreencheck("minitv", minitv, "0");
563
564                        if(checkbox("ATEMIO510") == 1 || checkbox("ATEMIO520") == 1 || checkbox("ATEMIO530") == 1 || checkbox("ATEMIO7600") == 1 || checkbox("UFS912") == 1 || checkbox("UFS913") == 1 || checkbox("SPARK") == 1 || checkbox("SPARK7162") == 1)
565                                addconfigscreencheck("usecec", usecec, "0");
566
567                        if(checkbox("ATEMIO7600") == 1)
568                        {
569                                addconfigscreencheck("usecec", usecec, "0");
570                                if(sataswitch->ret != NULL)
571                                {
572                                        addownconfig("sataswitch", sataswitch->ret);
573                                        setsataswitch(sataswitch->ret);
574                                }
575                        }
576
577#ifdef MIPSEL
578                        addconfigscreen("dualboot", dualboot);
579                        if(dualboot->ret != NULL && ostrcmp(dualboot->ret, "0") == 0)
580                                unlink("/mnt/config/dualboot");
581                        else
582                                system("touch /mnt/config/dualboot");
583#endif
584                        addconfigscreen("playerbuffersize", playerbuffersize);
585                        addconfigscreen("playerbufferseektime", playerbufferseektime);
586
587#ifdef BETA
588                        addconfigscreencheck("debuglevel", debuglevel, "0");
589                        setdebuglevel();
590#endif
591                        if(community_user->ret != NULL && ostrcmp(community_user->ret, "****") != 0)
592                        {
593                                debug(99, "community_user: write");
594                                debug(99, "community_user: %s", community_user->ret);
595                                addconfigscreen("community_user", community_user);
596                        }
597                        else
598                        {
599                                debug(99, "community_user: skipped");
600                        }
601                        if(community_pass->ret != NULL && ostrcmp(community_pass->ret, "****") != 0)
602                        {
603                                debug(99, "community_pass: write");
604                                debug(99, "community_pass: %s", community_pass->ret);
605                                addconfigscreen("community_pass", community_pass);
606                        }
607                        else
608                        {
609                                debug(99, "community_pass: skipped");
610                        }
611                        writeallconfig(1);
612
613                        debug(99, "community_user read: %s", getconfig("community_user", NULL));
614                        debug(99, "community_pass read: %s", getconfig("community_pass", NULL));
615
616                        break;
617                }
618        }
619        delownerrc(adjust);
620        clearscreen(adjust);
621}
622
623#endif
Note: See TracBrowser for help on using the repository browser.