source: titan/titan/adjust.h @ 15345

Last change on this file since 15345 was 14320, checked in by nit, 12 years ago

[titan] increase rec over/forerun to 60min

File size: 9.7 KB
Line 
1#ifndef ADJUST_H
2#define ADJUST_H
3
4void screenadjust()
5{
6        int rcret = 0;
7        struct skin* adjust = getscreen("adjust");
8        struct skin* listbox = getscreennode(adjust, "listbox");
9        struct skin* volbartimeout = getscreennode(adjust, "volbartimeout");
10        struct skin* infobartimeout = getscreennode(adjust, "infobartimeout");
11        struct skin* infobarsleep = getscreennode(adjust, "infobarsleep");
12        struct skin* secondinfobar = getscreennode(adjust, "secondinfobar");
13        struct skin* spinnerspeed = getscreennode(adjust, "spinnerspeed");
14        struct skin* spinnertime = getscreennode(adjust, "spinnertime");
15        struct skin* hangtime = getscreennode(adjust, "hangtime");
16        struct skin* nozapclear = getscreennode(adjust, "nozapclear");
17        struct skin* fastzap = getscreennode(adjust, "fastzap");
18        struct skin* faststop = getscreennode(adjust, "faststop");
19        struct skin* dirsort = getscreennode(adjust, "dirsort");
20        struct skin* poweraktion = getscreennode(adjust, "poweraktion");
21        struct skin* virtualzap = getscreennode(adjust, "virtualzap");
22        struct skin* fasttextrender = getscreennode(adjust, "fasttextrender");
23        struct skin* recsplitsize = getscreennode(adjust, "recsplitsize");
24        struct skin* forerun = getscreennode(adjust, "recforerun");
25        struct skin* overrun = getscreennode(adjust, "recoverrun");
26        struct skin* skip13 = getscreennode(adjust, "skip13");
27        struct skin* skip46 = getscreennode(adjust, "skip46");
28        struct skin* skip79 = getscreennode(adjust, "skip79");
29        struct skin* playertype = getscreennode(adjust, "playertype");
30        struct skin* nocamsg = getscreennode(adjust, "nocamsg");
31        struct skin* autochangechannelname = getscreennode(adjust, "autochangechannelname");
32        struct skin* def_rectimer_after = getscreennode(adjust, "def_rectimer_after");
33        struct skin* deltimeshift = getscreennode(adjust, "deltimeshift");
34        struct skin* showchanneltimeline = getscreennode(adjust, "showchanneltimeline");
35        struct skin* screenanim = getscreennode(adjust, "screenanim");
36        struct skin* screenanimspeed = getscreennode(adjust, "screenanimspeed");
37       
38        struct skin* tmp = NULL;
39
40        changeinput(volbartimeout, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10");
41        setchoiceboxselection(volbartimeout, getconfig("volbartimeout", NULL));
42
43        changeinput(infobartimeout, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10");
44        setchoiceboxselection(infobartimeout, getconfig("infobartimeout", NULL));
45
46        changeinput(infobarsleep, "0\n1\n2\n3\n4\n5");
47        setchoiceboxselection(infobarsleep, getconfig("infobarsleep", NULL));
48       
49        addchoicebox(secondinfobar, "0", _("no"));
50        addchoicebox(secondinfobar, "1", _("infobar"));
51        addchoicebox(secondinfobar, "2", _("epg"));
52        setchoiceboxselection(secondinfobar, getconfig("secondinfobar", NULL));
53
54        changeinput(spinnerspeed, "1\n3\n9\n12\n15\n18\n21\n24\n27\n30");
55        setchoiceboxselection(spinnerspeed, getconfig("spinnerspeed", NULL));
56
57        changeinput(spinnertime, "1\n2\n3\n4\n5\n6\n7\n8\n10000");
58        setchoiceboxselection(spinnertime, getconfig("spinnertime", NULL));
59
60        changeinput(hangtime, "5\n10\n15\n30\n60\n120\n10000");
61        setchoiceboxselection(hangtime, getconfig("hangtime", NULL));
62
63        addchoicebox(nozapclear, "0", _("no"));
64        addchoicebox(nozapclear, "1", _("yes"));
65        setchoiceboxselection(nozapclear, getconfig("nozapclear", NULL));
66
67        addchoicebox(fastzap, "0", _("no"));
68        addchoicebox(fastzap, "2", _("medium"));
69        addchoicebox(fastzap, "1", _("fast"));
70        setchoiceboxselection(fastzap, getconfig("fastzap", NULL));
71
72        addchoicebox(faststop, "0", _("no"));
73        addchoicebox(faststop, "1", _("yes"));
74        setchoiceboxselection(faststop, getconfig("faststop", NULL));
75
76        addchoicebox(dirsort, "0", _("alpha"));
77        addchoicebox(dirsort, "1", _("reverse alpha"));
78        addchoicebox(dirsort, "2", _("size"));
79        addchoicebox(dirsort, "3", _("reverse size"));
80        addchoicebox(dirsort, "4", _("date"));
81        addchoicebox(dirsort, "5", _("reverse date"));
82        setchoiceboxselection(dirsort, getconfig("dirsort", NULL));
83
84        addchoicebox(poweraktion, "0", _("Power Menu"));
85        addchoicebox(poweraktion, "1", _("Power Off"));
86        addchoicebox(poweraktion, "2", _("Standby"));
87        addchoicebox(poweraktion, "3", _("Restart"));
88        addchoicebox(poweraktion, "4", _("Gui Restart"));
89        setchoiceboxselection(poweraktion, getconfig("poweraktion", NULL));
90       
91        addchoicebox(virtualzap, "0", _("deaktiv"));
92        addchoicebox(virtualzap, "1", _("1 sec"));
93        addchoicebox(virtualzap, "2", _("2 sec"));
94        addchoicebox(virtualzap, "9999", _("endless"));
95        setchoiceboxselection(virtualzap, getconfig("virtualzap", NULL));
96       
97        addchoicebox(fasttextrender, "0", _("no"));
98        addchoicebox(fasttextrender, "1", _("yes"));
99        setchoiceboxselection(fasttextrender, getconfig("fasttextrender", NULL));
100
101        addchoicebox(recsplitsize, "0", _("deaktiv"));
102        addchoicebox(recsplitsize, "1", _("1 GB"));
103        addchoicebox(recsplitsize, "2", _("2 GB"));
104        addchoicebox(recsplitsize, "3", _("3 GB"));
105        addchoicebox(recsplitsize, "4", _("4 GB"));
106        setchoiceboxselection(recsplitsize, getconfig("recsplitsize", NULL));
107
108        changeinput(forerun, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60");
109        setchoiceboxselection(forerun, getconfig("recforerun", NULL));
110
111        changeinput(overrun, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60");
112        setchoiceboxselection(overrun, getconfig("recoverrun", NULL));
113
114        changeinput(skip13, "15\n20\n30\n45\n60\n90\n120\n180\n300\n600\n900\n1200");
115        setchoiceboxselection(skip13, getconfig("skip13", NULL));
116
117        changeinput(skip46, "15\n20\n30\n45\n60\n90\n120\n180\n300\n600\n900\n1200");
118        setchoiceboxselection(skip46, getconfig("skip46", NULL));
119
120        changeinput(skip79, "15\n20\n30\n45\n60\n90\n120\n180\n300\n600\n900\n1200");
121        setchoiceboxselection(skip79, getconfig("skip79", NULL));
122       
123        addchoicebox(playertype, "0", _("extern"));
124        addchoicebox(playertype, "1", _("intern"));
125        setchoiceboxselection(playertype, getconfig("playertype", NULL));
126       
127        addchoicebox(nocamsg, "0", _("yes"));
128        addchoicebox(nocamsg, "1", _("no"));
129        setchoiceboxselection(nocamsg, getconfig("nocamsg", NULL));
130       
131        addchoicebox(autochangechannelname, "0", _("no"));
132        addchoicebox(autochangechannelname, "1", _("yes"));
133        setchoiceboxselection(autochangechannelname, getconfig("autochangechannelname", NULL));
134
135        addchoicebox(def_rectimer_after, "0", _("auto"));
136        addchoicebox(def_rectimer_after, "1", _("nothing"));
137        addchoicebox(def_rectimer_after, "2", _("standby"));
138        addchoicebox(def_rectimer_after, "3", _("power off"));
139        setchoiceboxselection(def_rectimer_after, getconfig("def_rectimer_after", NULL));
140       
141        addchoicebox(deltimeshift, "0", _("ask"));
142        addchoicebox(deltimeshift, "1", _("allways del file"));
143        addchoicebox(deltimeshift, "2", _("never del file"));
144        setchoiceboxselection(deltimeshift, getconfig("deltimeshift", NULL));
145       
146        addchoicebox(showchanneltimeline, "0", _("no"));
147        addchoicebox(showchanneltimeline, "1", _("yes"));
148        setchoiceboxselection(showchanneltimeline, getconfig("showchanneltimeline", NULL));
149       
150        addchoicebox(screenanim, "0", _("no"));
151        addchoicebox(screenanim, "1", _("anim. width"));
152        addchoicebox(screenanim, "2", _("anim. height"));
153        addchoicebox(screenanim, "3", _("anim. both"));
154        setchoiceboxselection(screenanim, getconfig("screenanim", NULL));
155       
156        addchoicebox(screenanimspeed, "1", _("very fast"));
157        addchoicebox(screenanimspeed, "5", _("fast"));
158        addchoicebox(screenanimspeed, "10", _("normal"));
159        addchoicebox(screenanimspeed, "15", _("slow"));
160        addchoicebox(screenanimspeed, "20", _("very slow"));
161        setchoiceboxselection(screenanimspeed, getconfig("screenanimspeed", NULL));
162
163        drawscreen(adjust, 0);
164        addscreenrc(adjust, listbox);
165
166        tmp = listbox->select;
167        while(1)
168        {
169                addscreenrc(adjust, tmp);
170                rcret = waitrc(adjust, 0, 0);
171                tmp = listbox->select;
172
173                if(rcret == getrcconfigint("rcexit", NULL)) break;
174                if(rcret == getrcconfigint("rcok", NULL))
175                {
176                        addconfigscreen("volbartimeout", volbartimeout);
177                        addconfigscreen("infobartimeout", infobartimeout);
178                        addconfigscreen("infobarsleep", infobarsleep);
179                        addconfigscreencheck("secondinfobar", secondinfobar, "0");             
180                        addconfigscreen("spinnerspeed", spinnerspeed);
181                        status.spinnerspeed = getconfigint("spinnerspeed", NULL);
182                        addconfigscreen("spinnertime", spinnertime);
183                        status.spinnertime = getconfigint("spinnertime", NULL);
184                        addconfigscreen("hangtime", hangtime);
185                        status.hangtime = getconfigint("hangtime", NULL);
186                        addconfigscreencheck("nozapclear", nozapclear, "0");
187                        addconfigscreencheck("fastzap", fastzap, "0");
188                        addconfigscreencheck("faststop", faststop, "0");
189                        addconfigscreencheck("dirsort", dirsort, "0");
190                        addconfigscreencheck("poweraktion", poweraktion, "0");
191                        addconfigscreencheck("recforerun", forerun, "0");
192                        addconfigscreencheck("recoverrun", overrun, "0");
193                        addconfigscreencheck("virtualzap", virtualzap, "0");
194                        if(fasttextrender->ret != NULL)
195                        {
196                                addconfigscreencheck("fasttextrender", fasttextrender, "0");
197                                status.fasttextrender = atoi(fasttextrender->ret);
198                        }
199                        if(recsplitsize->ret != NULL)
200                        {
201                                addconfigscreencheck("recsplitsize", recsplitsize, "0");
202                                status.recsplitsize = atoi(recsplitsize->ret);
203                                status.recsplitsize *= 1000 * 1000 * 1000;
204                        }
205                        addconfigscreen("skip13", skip13);
206                        addconfigscreen("skip46", skip46);
207                        addconfigscreen("skip79", skip79);
208                        addconfigscreencheck("playertype", playertype, "0");
209                        addconfigscreencheck("nocamsg", nocamsg, "0");
210                        addconfigscreencheck("autochangechannelname", autochangechannelname, "0");
211                        addconfigscreencheck("def_rectimer_after", def_rectimer_after, "0");
212                        addconfigscreencheck("deltimeshift", deltimeshift, "0");
213                        addconfigscreencheck("showchanneltimeline", showchanneltimeline, "0");
214                        status.showchanneltimeline = getconfigint("showchanneltimeline", NULL);
215                        addconfigscreencheck("screenanim", screenanim, "0");
216                        status.screenanim = getconfigint("screenanim", NULL);
217                        addconfigscreencheck("screenanimspeed", screenanimspeed, "1");
218                        status.screenanimspeed = getconfigint("screenanimspeed", NULL);
219
220                        break;
221                }
222        }
223
224        delownerrc(adjust);
225        clearscreen(adjust);
226}
227
228#endif
Note: See TracBrowser for help on using the repository browser.