source: titan/titan/adjust.h @ 37139

Last change on this file since 37139 was 37139, checked in by gost, 8 years ago

fix

File size: 23.9 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#ifdef MIPSEL
176        addchoicebox(screenanim, "4", _("left to right"));
177        addchoicebox(screenanim, "5", _("top to bottom"));
178        if(checkbox("DM7020HD") == 1 || checkbox("DM7020HDV2") == 1)
179        {
180                addchoicebox(screenanim, "11", _("slide from left"));
181                addchoicebox(screenanim, "12", _("slide from bottom"));
182        }
183#endif
184        setchoiceboxselection(screenanim, getconfig("screenanim", NULL));
185       
186        addchoicebox(screenanimspeed, "1", _("very fast"));
187        addchoicebox(screenanimspeed, "5", _("fast"));
188        addchoicebox(screenanimspeed, "10", _("normal"));
189        addchoicebox(screenanimspeed, "15", _("slow"));
190        addchoicebox(screenanimspeed, "20", _("very slow"));
191        setchoiceboxselection(screenanimspeed, getconfig("screenanimspeed", NULL));
192
193        addchoicebox(channellistview, "0", _("hidden"));
194        addchoicebox(channellistview, "1", _("show"));
195        setchoiceboxselection(channellistview, getconfig("channellistview", NULL));
196
197        addchoicebox(showlastpos, "0", _("no"));       
198        addchoicebox(showlastpos, "1", _("yes"));
199        setchoiceboxselection(showlastpos, getconfig("showlastpos", NULL));
200
201        addchoicebox(recsync, "0", _("no"));   
202        addchoicebox(recsync, "1", _("yes"));
203        setchoiceboxselection(recsync, getconfig("recsync", NULL));
204
205        addchoicebox(recordnamefmt, "0", _("channel-movie"));
206        addchoicebox(recordnamefmt, "1", _("movie-channel"));
207        setchoiceboxselection(recordnamefmt, getconfig("recordnamefmt", NULL));
208
209        addchoicebox(newsletter, "0", _("no"));
210        addchoicebox(newsletter, "1", _("yes"));
211        setchoiceboxselection(newsletter, getconfig("newsletter", NULL));
212
213        addchoicebox(showhiddenfiles, "0", _("no"));
214        addchoicebox(showhiddenfiles, "1", _("yes"));
215        setchoiceboxselection(showhiddenfiles, getconfig("showhiddenfiles", NULL));
216
217        addchoicebox(expertmodus, "0", _("no"));
218        addchoicebox(expertmodus, "10", _("yes"));
219        if(getconfigint("expertmodus", NULL) == 11)
220                addchoicebox(expertmodus, "11", _("expert (11)"));
221        setchoiceboxselection(expertmodus, getconfig("expertmodus", NULL));
222
223        addchoicebox(infobarprogram, "0", _("no"));
224        addchoicebox(infobarprogram, "1", _("yes"));
225        setchoiceboxselection(infobarprogram, getconfig("infobarprogram", NULL));
226
227        addchoicebox(crosscontrol, "0", _("no"));
228        addchoicebox(crosscontrol, "1", _("yes"));
229        addchoicebox(crosscontrol, "2", _("yes / vzap 1 sec"));
230        addchoicebox(crosscontrol, "3", _("yes / vzap 2 sec"));
231        addchoicebox(crosscontrol, "9999", _("yes / vzap endless"));
232        setchoiceboxselection(crosscontrol, getconfig("crosscontrol", NULL));
233
234        addchoicebox(emucontrol, "0", _("no"));
235        addchoicebox(emucontrol, "1", _("yes"));
236        setchoiceboxselection(emucontrol, getconfig("emucontrol", NULL));
237
238        addchoicebox(minitv, "0", _("no"));
239        addchoicebox(minitv, "1", _("yes"));
240        setchoiceboxselection(minitv, getconfig("minitv", NULL));
241
242        addchoicebox(usecec, "0", _("no"));
243        addchoicebox(usecec, "1", _("yes"));
244        setchoiceboxselection(usecec, getconfig("usecec", NULL));
245
246        if(!file_exist("/mnt/config/dualboot"))
247        {
248                addchoicebox(dualboot, "0", _("no"));
249                addchoicebox(dualboot, "1", _("yes"));
250        }
251        else
252        {
253                addchoicebox(dualboot, "1", _("yes"));
254                addchoicebox(dualboot, "0", _("no"));
255        }
256        setchoiceboxselection(dualboot, getconfig("dualboot", NULL));
257
258        changemask(community_user, "****");
259        if(getconfig("community_user", NULL) == NULL)
260                changeinput(community_user, getconfig("community_user", NULL));
261        else
262                changeinput(community_pass, "****");
263               
264        changemask(community_pass, "****");
265        if(getconfig("community_pass", NULL) == NULL)
266                changeinput(community_pass, getconfig("community_pass", NULL));
267        else
268                changeinput(community_pass, "****");
269       
270
271// setdebuglevel
272#ifndef BETA
273        debuglevel->hidden = YES;
274#else
275        tmpstr = ostrcat("10 - ", _("Minimal"), 0, 0); 
276        addchoicebox(debuglevel, "10", tmpstr);
277        free(tmpstr), tmpstr = NULL;
278       
279        tmpstr = ostrcat("40 - ", _("MTD Operation/System Update"), 0, 0);     
280        addchoicebox(debuglevel, "40", tmpstr);
281        free(tmpstr), tmpstr = NULL;
282       
283        tmpstr = ostrcat("50 - ", _("MediaCenter"), 0, 0);     
284        addchoicebox(debuglevel, "50", tmpstr);
285        free(tmpstr), tmpstr = NULL;
286       
287        tmpstr = ostrcat("55 - ", _("Network Interface"), 0, 0);       
288        addchoicebox(debuglevel, "55", tmpstr);
289        free(tmpstr), tmpstr = NULL;
290       
291        tmpstr = ostrcat("60 - ", _("Key Actions"), 0, 0);     
292        addchoicebox(debuglevel, "60", tmpstr);
293        free(tmpstr), tmpstr = NULL;
294       
295        tmpstr = ostrcat("70 - ", _("Networkbrowser"), 0, 0);   
296        addchoicebox(debuglevel, "70", tmpstr);
297        free(tmpstr), tmpstr = NULL;
298       
299        tmpstr = ostrcat("77 - ", _("Web Adjust"), 0, 0);       
300        addchoicebox(debuglevel, "77", tmpstr);
301        free(tmpstr), tmpstr = NULL;
302       
303        tmpstr = ostrcat("80 - ", _("Harddisk"), 0, 0);
304        addchoicebox(debuglevel, "80", tmpstr);
305        free(tmpstr), tmpstr = NULL;
306       
307        tmpstr = ostrcat("81 - ", _("MultiImage"), 0, 0);       
308        addchoicebox(debuglevel, "81", tmpstr);
309        free(tmpstr), tmpstr = NULL;
310       
311        tmpstr = ostrcat("90 - ", _("Screensaver"), 0, 0);     
312        addchoicebox(debuglevel, "90", tmpstr);
313        free(tmpstr), tmpstr = NULL;
314       
315        tmpstr = ostrcat("99 - ", _("Tithek/HTTP Header/Community"), 0, 0);     
316        addchoicebox(debuglevel, "99", tmpstr);
317        free(tmpstr), tmpstr = NULL;
318       
319        tmpstr = ostrcat("100 - ", _("Global"), 0, 0); 
320        addchoicebox(debuglevel, "100", tmpstr);
321        free(tmpstr), tmpstr = NULL;
322       
323        tmpstr = ostrcat("110 - ", _("Stringconvert"), 0, 0);   
324        addchoicebox(debuglevel, "110", tmpstr);
325        free(tmpstr), tmpstr = NULL;
326       
327        tmpstr = ostrcat("130 - ", _("TPK"), 0, 0);     
328        addchoicebox(debuglevel, "130", tmpstr);
329        free(tmpstr), tmpstr = NULL;
330       
331        tmpstr = ostrcat("133 - ", _("MediaDB/IMDb/TMDb"), 0, 0);       
332        addchoicebox(debuglevel, "133", tmpstr);
333        free(tmpstr), tmpstr = NULL;
334       
335        tmpstr = ostrcat("150 - ", _("ePlayer"), 0, 0);
336        addchoicebox(debuglevel, "150", tmpstr);
337        free(tmpstr), tmpstr = NULL;
338       
339        tmpstr = ostrcat("200 - ", _("DVB Devices"), 0, 0);     
340        addchoicebox(debuglevel, "200", tmpstr);
341        free(tmpstr), tmpstr = NULL;
342       
343        tmpstr = ostrcat("201 - ", _("CA Device"), 0, 0);       
344        addchoicebox(debuglevel, "201", tmpstr);
345        free(tmpstr), tmpstr = NULL;
346       
347        tmpstr = ostrcat("250 - ", _("HTTP Server/Stream/Record"), 0, 0);       
348        addchoicebox(debuglevel, "250", tmpstr);
349        free(tmpstr), tmpstr = NULL;
350       
351        tmpstr = ostrcat("270 - ", _("Radiotext"), 0, 0);       
352        addchoicebox(debuglevel, "270", tmpstr);
353        free(tmpstr), tmpstr = NULL;
354       
355        tmpstr = ostrcat("278 - ", _("ID3"), 0, 0);     
356        addchoicebox(debuglevel, "278", tmpstr);
357        free(tmpstr), tmpstr = NULL;
358       
359        tmpstr = ostrcat("300 - ", _("Subtitle"), 0, 0);       
360        addchoicebox(debuglevel, "300", tmpstr);
361        free(tmpstr), tmpstr = NULL;
362       
363        tmpstr = ostrcat("307 - ", _("Thumbnails"), 0, 0);     
364        addchoicebox(debuglevel, "307", tmpstr);
365        free(tmpstr), tmpstr = NULL;
366       
367        tmpstr = ostrcat("333 - ", _("DVD Player"), 0, 0);     
368        addchoicebox(debuglevel, "333", tmpstr);
369        free(tmpstr), tmpstr = NULL;
370/*     
371        tmpstr = ostrcat("369 - ", _("Facebook"), 0, 0);       
372        addchoicebox(debuglevel, "369", tmpstr);
373        free(tmpstr), tmpstr = NULL;
374*/     
375        tmpstr = ostrcat("400 - ", _("EPG Task"), 0, 0);       
376        addchoicebox(debuglevel, "400", tmpstr);
377        free(tmpstr), tmpstr = NULL;
378       
379       
380        tmpstr = ostrcat("401 - ", _("Old Entry"), 0, 0);       
381        addchoicebox(debuglevel, "401", tmpstr);
382        free(tmpstr), tmpstr = NULL;
383       
384        tmpstr = ostrcat("427 - ", _("Newsletter"), 0, 0);     
385        addchoicebox(debuglevel, "427", tmpstr);
386        free(tmpstr), tmpstr = NULL;
387       
388        tmpstr = ostrcat("444 - ", _("Framebuffer"), 0, 0);     
389        addchoicebox(debuglevel, "444", tmpstr);
390        free(tmpstr), tmpstr = NULL;
391       
392        tmpstr = ostrcat("500 - ", _("Channel Scan"), 0, 0);   
393        addchoicebox(debuglevel, "500", tmpstr);
394        free(tmpstr), tmpstr = NULL;
395       
396        tmpstr = ostrcat("555 - ", _("Draw Screen"), 0, 0);     
397        addchoicebox(debuglevel, "555", tmpstr);
398        free(tmpstr), tmpstr = NULL;
399       
400        tmpstr = ostrcat("620 - ", _("CA"), 0, 0);     
401        addchoicebox(debuglevel, "620", tmpstr);
402        free(tmpstr), tmpstr = NULL;
403       
404        tmpstr = ostrcat("777 - ", _("MediaDB"), 0, 0);
405        addchoicebox(debuglevel, "777", tmpstr);
406        free(tmpstr), tmpstr = NULL;
407/*     
408        tmpstr = ostrcat("788 - ", _("HbbTV"), 0, 0);   
409        addchoicebox(debuglevel, "788", tmpstr);
410        free(tmpstr), tmpstr = NULL;
411*/     
412        tmpstr = ostrcat("900 - ", _("Mutex"), 0, 0);   
413        addchoicebox(debuglevel, "900", tmpstr);
414        free(tmpstr), tmpstr = NULL;
415       
416        tmpstr = ostrcat("913 - ", _("File Operation"), 0, 0); 
417        addchoicebox(debuglevel, "913", tmpstr);
418        free(tmpstr), tmpstr = NULL;
419       
420        tmpstr = ostrcat("975 - ", _("SMTP"), 0, 0);   
421        addchoicebox(debuglevel, "975", tmpstr);
422        free(tmpstr), tmpstr = NULL;
423       
424        tmpstr = ostrcat("4440 - ", _("PiP"), 0, 0);   
425        addchoicebox(debuglevel, "4440", tmpstr);
426        free(tmpstr), tmpstr = NULL;
427       
428        setchoiceboxselection(debuglevel, getconfig("debuglevel", NULL));
429#endif
430
431
432#ifdef MIPSEL
433        dualboot->hidden = NO;
434        frontpoweraktion->hidden = NO;
435#else
436        dualboot->hidden = YES;
437        frontpoweraktion->hidden = YES;
438#endif
439
440        if(!file_exist("/usr/bin/enigma2"))
441                dualboot->hidden = YES;
442
443        if(status.security == 0 || checkemu() == 0)
444                emucontrol->hidden = YES;
445        else
446                emucontrol->hidden = NO;
447        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)
448                usecec->hidden = NO;
449        else
450                usecec->hidden = YES;
451
452        if(checkbox("ATEMIO7600") == 1)
453        {
454                sataswitch->hidden = NO;
455                addchoicebox(sataswitch, "0", _("extern"));
456                addchoicebox(sataswitch, "1", _("intern"));
457                tmpstr = getsataswitch();
458                setchoiceboxselection(sataswitch, tmpstr);
459                free(tmpstr); tmpstr = NULL;
460        }
461        else
462                sataswitch->hidden = YES;
463       
464        addchoicebox(playerbuffersize, "0", _("no"));
465        addchoicebox(playerbuffersize, "524288", "512KB");
466        addchoicebox(playerbuffersize, "1048576", "1MB");
467        addchoicebox(playerbuffersize, "1572864", "1,5MB");
468        addchoicebox(playerbuffersize, "2097152", "2MB");
469        addchoicebox(playerbuffersize, "2621440", "2,5MB");
470        addchoicebox(playerbuffersize, "3145728", "3MB");
471        addchoicebox(playerbuffersize, "3670016", "3,5MB");
472        addchoicebox(playerbuffersize, "4194304", "4MB");
473        addchoicebox(playerbuffersize, "4718592", "4,5MB");
474        addchoicebox(playerbuffersize, "5242880", "5MB");
475        setchoiceboxselection(playerbuffersize, getconfig("playerbuffersize", NULL));
476       
477        addchoicebox(playerbufferseektime, "0", "0");
478        addchoicebox(playerbufferseektime, "1", "1");
479        addchoicebox(playerbufferseektime, "2", "2");
480        addchoicebox(playerbufferseektime, "3", "3");
481        addchoicebox(playerbufferseektime, "4", "4");
482        addchoicebox(playerbufferseektime, "5", "5");
483        addchoicebox(playerbufferseektime, "6", "6");
484        addchoicebox(playerbufferseektime, "7", "7");
485        addchoicebox(playerbufferseektime, "8", "8");
486        addchoicebox(playerbufferseektime, "9", "9");
487        addchoicebox(playerbufferseektime, "10", "10");
488        setchoiceboxselection(playerbufferseektime, getconfig("playerbufferseektime", NULL));
489
490        drawscreen(adjust, 0, 0);
491        addscreenrc(adjust, listbox);
492
493        tmp = listbox->select;
494        while(1)
495        {
496                addscreenrc(adjust, tmp);
497                rcret = waitrc(adjust, 0, 0);
498                tmp = listbox->select;
499
500                if(rcret == getrcconfigint("rcexit", NULL)) break;
501                if(rcret == getrcconfigint("rcok", NULL))
502                {
503                        addconfigscreen("volbartimeout", volbartimeout);
504                        addconfigscreen("infobartimeout", infobartimeout);
505                        addconfigscreen("infobarsleep", infobarsleep);
506                        addconfigscreencheck("secondinfobar", secondinfobar, "0");             
507                        addconfigscreen("spinnerspeed", spinnerspeed);
508                        status.spinnerspeed = getconfigint("spinnerspeed", NULL);
509                        addconfigscreen("spinnertime", spinnertime);
510                        status.spinnertime = getconfigint("spinnertime", NULL);
511                        addconfigscreen("hangtime", hangtime);
512                        status.hangtime = getconfigint("hangtime", NULL);
513                        addconfigscreencheck("nozapclear", nozapclear, "0");
514                        addconfigscreencheck("fastzap", fastzap, "0");
515                        addconfigscreencheck("faststop", faststop, "0");
516                        addconfigscreencheck("dirsort", dirsort, "0");
517                        addconfigscreencheck("poweraktion", poweraktion, "0");
518                        addconfigscreencheck("frontpoweraktion", frontpoweraktion, "0");
519                        addconfigscreencheck("recforerun", recforerun, "0");
520                        addconfigscreencheck("recoverrun", recoverrun, "0");
521                        addconfigscreencheck("virtualzap", virtualzap, "0");
522                        status.virtualzap = getconfigint("virtualzap", NULL);
523                        if(fasttextrender->ret != NULL)
524                        {
525                                addconfigscreencheck("fasttextrender", fasttextrender, "0");
526                                status.fasttextrender = atoi(fasttextrender->ret);
527                        }
528                        if(recsplitsize->ret != NULL)
529                        {
530                                addconfigscreencheck("recsplitsize", recsplitsize, "0");
531                                status.recsplitsize = atoi(recsplitsize->ret);
532                                status.recsplitsize *= 1000 * 1000 * 1000;
533                        }
534                        addconfigscreen("skip13", skip13);
535                        addconfigscreen("skip46", skip46);
536                        addconfigscreen("skip79", skip79);
537                        addconfigscreencheck("playertype", playertype, "1");
538                        addconfigscreencheck("autochangechannelname", autochangechannelname, "0");
539                        status.autochangechannelname = getconfigint("autochangechannelname", NULL);
540                        addconfigscreencheck("def_rectimer_after", def_rectimer_after, "0");
541                        addconfigscreencheck("showchanneltimeline", showchanneltimeline, "0");
542                        status.showchanneltimeline = getconfigint("showchanneltimeline", NULL);
543                        addconfigscreencheck("screenanim", screenanim, "0");
544                        status.screenanim = getconfigint("screenanim", NULL);
545                        addconfigscreencheck("screenanimspeed", screenanimspeed, "1");
546                        status.screenanimspeed = getconfigint("screenanimspeed", NULL);
547                        addconfigscreencheck("channellistview", channellistview, "0");
548                        status.channellistview = getconfigint("channellistview", NULL);
549                        addconfigscreencheck("showlastpos", showlastpos, "0");
550                        addconfigscreencheck("recsync", recsync, "0");
551                        addconfigscreencheck("recordnamefmt", recordnamefmt, "0");
552
553                        addconfigscreen("newsletter", newsletter);
554                        if(newsletter->ret != NULL && ostrcmp(newsletter->ret, "0") == 0)
555                                startnewsletter(0);
556                        else
557                                startnewsletter(1);
558
559                        addconfigscreen("showhiddenfiles", showhiddenfiles);
560                        status.showhiddenfiles = getconfigint("showhiddenfiles", NULL);
561                        addconfigscreencheck("expertmodus", expertmodus, "0");
562                        status.expertmodus = getconfigint("expertmodus", NULL);                                 
563                        addconfigscreencheck("infobarprogram", infobarprogram, "0");
564                        status.infobarprogram = getconfigint("infobarprogram", NULL);
565                        addconfigscreen("crosscontrol", crosscontrol);
566                        //addconfigscreencheck("crosscontrol", crosscontrol, "0");
567                        status.crosscontrol = getconfigint("crosscontrol", NULL);
568                        addconfigscreencheck("emucontrol", emucontrol, "0");
569
570                        if(ostrcmp(minitv->ret, "1") == 0) resettvpic();
571                        addconfigscreencheck("minitv", minitv, "0");
572
573                        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)
574                                addconfigscreencheck("usecec", usecec, "0");
575
576                        if(checkbox("ATEMIO7600") == 1)
577                        {
578                                addconfigscreencheck("usecec", usecec, "0");
579                                if(sataswitch->ret != NULL)
580                                {
581                                        addownconfig("sataswitch", sataswitch->ret);
582                                        setsataswitch(sataswitch->ret);
583                                }
584                        }
585
586#ifdef MIPSEL
587                        addconfigscreen("dualboot", dualboot);
588                        if(dualboot->ret != NULL && ostrcmp(dualboot->ret, "0") == 0)
589                                unlink("/mnt/config/dualboot");
590                        else
591                                system("touch /mnt/config/dualboot");
592#endif
593                        addconfigscreen("playerbuffersize", playerbuffersize);
594                        addconfigscreen("playerbufferseektime", playerbufferseektime);
595
596#ifdef BETA
597                        addconfigscreencheck("debuglevel", debuglevel, "0");
598                        setdebuglevel();
599#endif
600                        if(community_user->ret != NULL && ostrcmp(community_user->ret, "****") != 0)
601                        {
602                                debug(99, "community_user: write");
603                                debug(99, "community_user: %s", community_user->ret);
604                                addconfigscreen("community_user", community_user);
605                        }
606                        else
607                        {
608                                debug(99, "community_user: skipped");
609                        }
610                        if(community_pass->ret != NULL && ostrcmp(community_pass->ret, "****") != 0)
611                        {
612                                debug(99, "community_pass: write");
613                                debug(99, "community_pass: %s", community_pass->ret);
614                                addconfigscreen("community_pass", community_pass);
615                        }
616                        else
617                        {
618                                debug(99, "community_pass: skipped");
619                        }
620                        writeallconfig(1);
621
622                        debug(99, "community_user read: %s", getconfig("community_user", NULL));
623                        debug(99, "community_pass read: %s", getconfig("community_pass", NULL));
624
625                        break;
626                }
627        }
628        delownerrc(adjust);
629        clearscreen(adjust);
630}
631
632#endif
Note: See TracBrowser for help on using the repository browser.