1 | #ifndef GMULTIEPG_H |
---|
2 | #define GMULTIEPG_H |
---|
3 | |
---|
4 | void createtimeline(struct skin* gmultiepg, struct skin* timeline, time_t akttime, int zoom) |
---|
5 | { |
---|
6 | struct skin* node = NULL; |
---|
7 | struct tm *loctime = NULL; |
---|
8 | int posx = 0; |
---|
9 | char* buf = NULL; |
---|
10 | |
---|
11 | buf = malloc(6); |
---|
12 | if(buf == NULL) |
---|
13 | { |
---|
14 | err("no mem"); |
---|
15 | return; |
---|
16 | } |
---|
17 | |
---|
18 | delmarkedscreennodes(gmultiepg, 3); |
---|
19 | |
---|
20 | while(posx < timeline->iwidth) |
---|
21 | { |
---|
22 | node = addlistbox(gmultiepg, timeline, node, 3); |
---|
23 | if(node != NULL) |
---|
24 | { |
---|
25 | |
---|
26 | loctime = olocaltime(&akttime); |
---|
27 | if(loctime != NULL) |
---|
28 | strftime(buf, 6, "%H:%M", loctime); |
---|
29 | else |
---|
30 | snprintf(buf, 6, "00:00"); |
---|
31 | free(loctime); loctime = NULL; |
---|
32 | |
---|
33 | akttime += 30 * 60; |
---|
34 | changetext(node, buf); |
---|
35 | node->prozwidth = 0; |
---|
36 | node->posx = posx; |
---|
37 | node->width = 30 * zoom; //30 min * zoom pixel |
---|
38 | node->bordersize = 1; |
---|
39 | posx += node->width; |
---|
40 | if(posx > timeline->iwidth) |
---|
41 | node->width -= (posx - timeline->iwidth); |
---|
42 | } |
---|
43 | } |
---|
44 | |
---|
45 | free(buf); |
---|
46 | } |
---|
47 | |
---|
48 | int selectchannelgmepg(struct skin* listbox) |
---|
49 | { |
---|
50 | struct skin* node = listbox; |
---|
51 | struct channel* chnode = NULL; |
---|
52 | listbox->aktpage = -1; |
---|
53 | listbox->aktline = 1; |
---|
54 | |
---|
55 | listbox->select = NULL; |
---|
56 | |
---|
57 | if(status.servicetype == 0) |
---|
58 | chnode = getchannel(getconfigint("serviceid", NULL), getconfigint("transponderid", NULL)); |
---|
59 | else |
---|
60 | chnode = getchannel(getconfigint("rserviceid", NULL), getconfigint("rtransponderid", NULL)); |
---|
61 | |
---|
62 | if(chnode == NULL) |
---|
63 | { |
---|
64 | debug(1000, "out -> NULL detect"); |
---|
65 | return 1; |
---|
66 | } |
---|
67 | |
---|
68 | while(node != NULL) |
---|
69 | { |
---|
70 | if(node->deaktivcol > -1) |
---|
71 | { |
---|
72 | node = node->next; |
---|
73 | continue; |
---|
74 | } |
---|
75 | if(chnode == (struct channel*)node->handle) |
---|
76 | return 0; |
---|
77 | |
---|
78 | if(node->del == 1) listbox->aktline++; |
---|
79 | node = node->next; |
---|
80 | } |
---|
81 | listbox->aktline = 1; |
---|
82 | return 1; |
---|
83 | } |
---|
84 | |
---|
85 | |
---|
86 | int calcgmultiepg(struct channel* tmpchannel, struct skin* gmultiepg, struct skin* channellistbox, struct skin* listbox, int zoom, time_t akttime, struct channel* aktchannel, int linecol1, int linecol2, int* aktline, struct skin** pchnode, struct skin** pchnode1, int height) |
---|
87 | { |
---|
88 | int treffer = 0, gridbr = 0, aktcol = 0, nottuneable = 0; |
---|
89 | struct epg* epgnode = NULL; |
---|
90 | struct skin* chnode = NULL, *chnode1 = NULL; |
---|
91 | |
---|
92 | if(tmpchannel != NULL && tmpchannel->servicetype == status.servicetype) |
---|
93 | { |
---|
94 | if(channelnottunable(tmpchannel) == 1) nottuneable = 1; |
---|
95 | *pchnode = addlistbox(gmultiepg, channellistbox, *pchnode, 1); |
---|
96 | chnode = *pchnode; |
---|
97 | if(chnode != NULL) |
---|
98 | { |
---|
99 | chnode->height = height; |
---|
100 | changetext(chnode, tmpchannel->name); |
---|
101 | epgnode = getepgakt(tmpchannel); |
---|
102 | |
---|
103 | while(epgnode != NULL) |
---|
104 | { |
---|
105 | if(epgnode->endtime <= akttime) |
---|
106 | { |
---|
107 | epgnode = epgnode->next; |
---|
108 | continue; |
---|
109 | } |
---|
110 | if(epgnode->starttime >= akttime + ((listbox->iwidth * 60) / zoom)) |
---|
111 | break; |
---|
112 | |
---|
113 | *pchnode1 = addlistbox(gmultiepg, listbox, *pchnode1, 1); |
---|
114 | chnode1 = *pchnode1; |
---|
115 | if(chnode1 != NULL) |
---|
116 | { |
---|
117 | (*aktline)++; |
---|
118 | if(gridbr == 0) |
---|
119 | { |
---|
120 | chnode1->type = TEXTBOXGRIDBR; |
---|
121 | if(tmpchannel == aktchannel) |
---|
122 | { |
---|
123 | listbox->aktline = *aktline; |
---|
124 | listbox->gridcol = 0; |
---|
125 | } |
---|
126 | } |
---|
127 | else |
---|
128 | chnode1->type = TEXTBOX; |
---|
129 | chnode1->wrap = YES; |
---|
130 | gridbr = 1; |
---|
131 | treffer = 1; |
---|
132 | chnode1->height = height; |
---|
133 | chnode1->width = ((epgnode->endtime - epgnode->starttime) / 60) * zoom; |
---|
134 | chnode1->posx = ((epgnode->starttime - akttime) / 60) * zoom; |
---|
135 | if(chnode1->posx < 0) |
---|
136 | { |
---|
137 | chnode1->width += chnode1->posx; |
---|
138 | chnode1->posx = 0; |
---|
139 | } |
---|
140 | chnode1->prozwidth = 0; |
---|
141 | if(aktcol == linecol1) |
---|
142 | aktcol = linecol2; |
---|
143 | else |
---|
144 | aktcol = linecol1; |
---|
145 | chnode1->bgcol = aktcol; |
---|
146 | chnode1->bgspace = 1; |
---|
147 | chnode1->vspace = 2; |
---|
148 | chnode1->hspace = 2; |
---|
149 | if(nottuneable == 1) |
---|
150 | chnode1->deaktivcol = convertcol("deaktivcol"); |
---|
151 | |
---|
152 | //TODO: record timeline |
---|
153 | //chnode1->type = MULTIPROGRESSBAR; |
---|
154 | //chnode1->progresscol = listbox->progresscol; |
---|
155 | //chnode1->epgrecord = getepgrecord(tmpchannel, epgnode); |
---|
156 | |
---|
157 | changetext(chnode1, epgnode->title); |
---|
158 | chnode1->handle = (char*)tmpchannel; |
---|
159 | chnode1->handle1 = (char*)epgnode; |
---|
160 | if(chnode1->posx + chnode1->width >= listbox->iwidth) |
---|
161 | { |
---|
162 | chnode1->width = listbox->iwidth - chnode1->posx; |
---|
163 | break; |
---|
164 | } |
---|
165 | } |
---|
166 | epgnode = epgnode->next; |
---|
167 | } |
---|
168 | if(gridbr == 0) |
---|
169 | { |
---|
170 | *pchnode1 = addlistbox(gmultiepg, listbox, *pchnode1, 1); |
---|
171 | chnode1 = *pchnode1; |
---|
172 | if(chnode1 != NULL) |
---|
173 | { |
---|
174 | if(gridbr == 0) chnode1->type = GRIDBR; |
---|
175 | gridbr = 1; |
---|
176 | chnode1->height = height; |
---|
177 | chnode1->deaktivcol = 1; |
---|
178 | } |
---|
179 | } |
---|
180 | |
---|
181 | chnode->handle = (char*)tmpchannel; |
---|
182 | if(nottuneable == 1) |
---|
183 | chnode->deaktivcol = convertcol("deaktivcol"); |
---|
184 | } |
---|
185 | } |
---|
186 | return treffer; |
---|
187 | } |
---|
188 | |
---|
189 | int showallgmepgchannel(struct skin* gmultiepg, struct skin* channellistbox, struct skin* listbox, int zoom, time_t akttime, struct channel* aktchannel) |
---|
190 | { |
---|
191 | int treffer = 0, linecol1 = 0, linecol2 = 0, aktline = 0, height = 0; |
---|
192 | struct skin* chnode = NULL, *chnode1 = NULL; |
---|
193 | struct channel* tmpchannel = channel; |
---|
194 | |
---|
195 | linecol1 = convertcol("epgcol1"); |
---|
196 | linecol2 = convertcol("epgcol2"); |
---|
197 | height = getskinconfigint("epgheight", NULL); |
---|
198 | if(height == 0) height = 35; |
---|
199 | |
---|
200 | if(gmultiepg != NULL) delmarkedscreennodes(gmultiepg, 1); |
---|
201 | if(listbox != NULL) listbox->aktline = 1; |
---|
202 | |
---|
203 | while(tmpchannel != NULL) |
---|
204 | { |
---|
205 | if(calcgmultiepg(tmpchannel, gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel, linecol1, linecol2, &aktline, &chnode, &chnode1, height) == 1) |
---|
206 | treffer = 1; |
---|
207 | tmpchannel = tmpchannel->next; |
---|
208 | } |
---|
209 | return treffer; |
---|
210 | } |
---|
211 | |
---|
212 | int showbouquetgmepgchannel(struct skin* gmultiepg, struct skin* channellistbox, struct skin* listbox, struct bouquet* firstbouquet, int zoom, time_t akttime, struct channel* aktchannel) |
---|
213 | { |
---|
214 | int treffer = 0, linecol1 = 0, linecol2 = 0, aktline = 0, height = 0; |
---|
215 | struct skin* chnode = NULL, *chnode1 = NULL; |
---|
216 | struct bouquet* tmpbouquet = firstbouquet; |
---|
217 | |
---|
218 | linecol1 = convertcol("epgcol1"); |
---|
219 | linecol2 = convertcol("epgcol2"); |
---|
220 | height = getskinconfigint("epgheight", NULL); |
---|
221 | if(height == 0) height = 35; |
---|
222 | |
---|
223 | if(gmultiepg != NULL) delmarkedscreennodes(gmultiepg, 1); |
---|
224 | if(listbox != NULL) listbox->aktline = 1; |
---|
225 | |
---|
226 | while(tmpbouquet != NULL) |
---|
227 | { |
---|
228 | if(calcgmultiepg(tmpbouquet->channel, gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel, linecol1, linecol2, &aktline, &chnode, &chnode1, height) == 1) |
---|
229 | treffer = 1; |
---|
230 | tmpbouquet = tmpbouquet->next; |
---|
231 | } |
---|
232 | return treffer; |
---|
233 | } |
---|
234 | |
---|
235 | int showprovidergmepgchannel(struct skin* gmultiepg, struct skin* channellistbox, struct skin* listbox, struct provider* providernode, int zoom, time_t akttime, struct channel* aktchannel) |
---|
236 | { |
---|
237 | int treffer = 0, linecol1 = 0, linecol2 = 0, aktline = 0, height = 0; |
---|
238 | struct skin* chnode = NULL, *chnode1 = NULL; |
---|
239 | struct channel* tmpchannel = channel; |
---|
240 | |
---|
241 | linecol1 = convertcol("epgcol1"); |
---|
242 | linecol2 = convertcol("epgcol2"); |
---|
243 | height = getskinconfigint("epgheight", NULL); |
---|
244 | if(height == 0) height = 35; |
---|
245 | |
---|
246 | if(gmultiepg != NULL) delmarkedscreennodes(gmultiepg, 1); |
---|
247 | |
---|
248 | while(tmpchannel != NULL) |
---|
249 | { |
---|
250 | if(tmpchannel->provider == providernode) |
---|
251 | { |
---|
252 | if(calcgmultiepg(tmpchannel, gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel, linecol1, linecol2, &aktline, &chnode, &chnode1, height) == 1) |
---|
253 | treffer = 1; |
---|
254 | } |
---|
255 | tmpchannel = tmpchannel->next; |
---|
256 | } |
---|
257 | return treffer; |
---|
258 | } |
---|
259 | |
---|
260 | int showsatgmepgchannel(struct skin* gmultiepg, struct skin* channellistbox, struct skin* listbox, struct sat* satnode, int zoom, time_t akttime, struct channel* aktchannel) |
---|
261 | { |
---|
262 | int treffer = 0, linecol1 = 0, linecol2 = 0, aktline = 0, height = 0; |
---|
263 | struct skin* chnode = NULL, *chnode1 = NULL; |
---|
264 | struct channel* tmpchannel = channel; |
---|
265 | |
---|
266 | if(satnode == NULL) return 1; |
---|
267 | |
---|
268 | linecol1 = convertcol("epgcol1"); |
---|
269 | linecol2 = convertcol("epgcol2"); |
---|
270 | height = getskinconfigint("epgheight", NULL); |
---|
271 | if(height == 0) height = 35; |
---|
272 | |
---|
273 | if(gmultiepg != NULL) delmarkedscreennodes(gmultiepg, 1); |
---|
274 | |
---|
275 | while(tmpchannel != NULL) |
---|
276 | { |
---|
277 | if(tmpchannel->transponder != NULL && tmpchannel->transponder->orbitalpos == satnode->orbitalpos) |
---|
278 | { |
---|
279 | if(calcgmultiepg(tmpchannel, gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel, linecol1, linecol2, &aktline, &chnode, &chnode1, height) == 1) |
---|
280 | treffer = 1; |
---|
281 | } |
---|
282 | tmpchannel = tmpchannel->next; |
---|
283 | } |
---|
284 | return treffer; |
---|
285 | } |
---|
286 | |
---|
287 | int showazgmepgchannel(struct skin* gmultiepg, struct skin* channellistbox, struct skin* listbox, int character, int zoom, time_t akttime, struct channel* aktchannel) |
---|
288 | { |
---|
289 | int treffer = 0, linecol1 = 0, linecol2 = 0, aktline = 0, height = 0; |
---|
290 | struct skin* chnode = NULL, *chnode1 = NULL; |
---|
291 | struct channel* tmpchannel = channel; |
---|
292 | |
---|
293 | linecol1 = convertcol("epgcol1"); |
---|
294 | linecol2 = convertcol("epgcol2"); |
---|
295 | height = getskinconfigint("epgheight", NULL); |
---|
296 | if(height == 0) height = 35; |
---|
297 | |
---|
298 | if(gmultiepg != NULL) delmarkedscreennodes(gmultiepg, 1); |
---|
299 | |
---|
300 | while(tmpchannel != NULL) |
---|
301 | { |
---|
302 | if(tmpchannel->name != NULL && (tmpchannel->name[0] == character || tmpchannel->name[0] == character + 32)) |
---|
303 | { |
---|
304 | if(calcgmultiepg(tmpchannel, gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel, linecol1, linecol2, &aktline, &chnode, &chnode1, height) == 1) |
---|
305 | treffer = 1; |
---|
306 | } |
---|
307 | tmpchannel = tmpchannel->next; |
---|
308 | } |
---|
309 | return treffer; |
---|
310 | } |
---|
311 | |
---|
312 | void drawchannellistgmepg(struct skin* gmultiepg, int list, struct skin* listbox) |
---|
313 | { |
---|
314 | status.markedchannel = NULL; |
---|
315 | |
---|
316 | if(list == ALLCHANNEL || list == SATCHANNEL || list == PROVIDERCHANNEL || list == AZCHANNEL || list == BOUQUETCHANNEL) |
---|
317 | { |
---|
318 | if(listbox->select == NULL) |
---|
319 | { |
---|
320 | status.screencalc = 2; |
---|
321 | drawscreen(gmultiepg, 0); |
---|
322 | status.screencalc = 0; |
---|
323 | } |
---|
324 | if(listbox->select != NULL) |
---|
325 | status.markedchannel = (struct channel*)listbox->select->handle; |
---|
326 | } |
---|
327 | drawscreen(gmultiepg, 0); |
---|
328 | } |
---|
329 | |
---|
330 | void screengmultiepg(struct channel* chnode, struct epg* epgnode) |
---|
331 | { |
---|
332 | int rcret = 0, ret = 0, epgscreenconf = 0; |
---|
333 | struct skin* gmultiepg = getscreen("gmultiepg"); |
---|
334 | struct skin* listbox = getscreennode(gmultiepg, "listbox"); |
---|
335 | struct skin* channellistbox = getscreennode(gmultiepg, "channellistbox"); |
---|
336 | struct skin* timeline = getscreennode(gmultiepg, "timeline"); |
---|
337 | struct skin* b1 = getscreennode(gmultiepg, "b1"); |
---|
338 | struct skin* b2 = getscreennode(gmultiepg, "b2"); |
---|
339 | struct skin* b3 = getscreennode(gmultiepg, "b3"); |
---|
340 | |
---|
341 | int list = ALLCHANNEL; |
---|
342 | char* tmpstr = NULL, *tmpstr1 = NULL; |
---|
343 | void* aktlist = NULL; |
---|
344 | int character = 0; |
---|
345 | struct sat* satnode = NULL; |
---|
346 | struct provider* providernode = NULL; |
---|
347 | struct channel* aktchannel = NULL; |
---|
348 | #ifdef SIMULATE |
---|
349 | time_t akttime = 1315614900; |
---|
350 | akttime = 1317926400; |
---|
351 | #else |
---|
352 | time_t akttime = time(NULL); |
---|
353 | #endif |
---|
354 | int zoom = getconfigint("gmultiepgzoom", NULL); |
---|
355 | if(zoom < 1) zoom = 2; |
---|
356 | |
---|
357 | akttime -= (((akttime / 60) % 15) * 60); |
---|
358 | akttime -= (((akttime) % 60)); |
---|
359 | time_t starttime = akttime; |
---|
360 | |
---|
361 | //chalc screen, so we have all infos |
---|
362 | status.screencalc = 2; |
---|
363 | drawscreen(gmultiepg, 0); |
---|
364 | status.screencalc = 0; |
---|
365 | |
---|
366 | time_t addtime = (listbox->iwidth / zoom) * 60; |
---|
367 | addtime -= (((addtime / 60) % 15) * 60); |
---|
368 | addtime -= (((addtime) % 60)); |
---|
369 | epgscreenconf = getconfigint("epg_screen", NULL); |
---|
370 | |
---|
371 | if(status.servicetype == 0) |
---|
372 | { |
---|
373 | tmpstr = getconfig("channellist", NULL); |
---|
374 | aktchannel = getchannel(getconfigint("serviceid", NULL), getconfigint("transponderid", NULL)); |
---|
375 | } |
---|
376 | else |
---|
377 | { |
---|
378 | tmpstr = getconfig("rchannellist", NULL); |
---|
379 | aktchannel = getchannel(getconfigint("rserviceid", NULL), getconfigint("rtransponderid", NULL)); |
---|
380 | } |
---|
381 | |
---|
382 | if(ostrncmp("(BOUQUET)-", tmpstr, 10) == 0 && strlen(tmpstr) > 10) |
---|
383 | { |
---|
384 | struct mainbouquet* mainbouquetnode = NULL; |
---|
385 | mainbouquetnode = getmainbouquet(tmpstr + 10); |
---|
386 | if(mainbouquetnode != NULL && mainbouquetnode->bouquet != NULL) |
---|
387 | { |
---|
388 | tmpstr1 = ostrcat(tmpstr1, _("GRAPHIC MULTI EPG - Bouquets"), 0, 0); |
---|
389 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
390 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 10, 1, 0); |
---|
391 | changetitle(gmultiepg, tmpstr1); |
---|
392 | free(tmpstr1); tmpstr1 = NULL; |
---|
393 | list = BOUQUETCHANNEL; |
---|
394 | aktlist = (void*)mainbouquetnode; |
---|
395 | showbouquetgmepgchannel(gmultiepg, channellistbox, listbox, mainbouquetnode->bouquet, zoom, akttime, aktchannel); |
---|
396 | selectchannelgmepg(channellistbox); |
---|
397 | } |
---|
398 | } |
---|
399 | else if(ostrncmp("(A-Z)-", tmpstr, 6) == 0 && strlen(tmpstr) > 6) |
---|
400 | { |
---|
401 | tmpstr1 = ostrcat(tmpstr1, _("GRAPHIC MULTI EPG - Channel"), 0, 0); |
---|
402 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
403 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 6, 1, 0); |
---|
404 | changetitle(gmultiepg, tmpstr1); |
---|
405 | free(tmpstr1); tmpstr1 = NULL; |
---|
406 | list = AZCHANNEL; |
---|
407 | character = (int)tmpstr[6]; |
---|
408 | aktlist = (void*)(int)tmpstr[6]; |
---|
409 | showazgmepgchannel(gmultiepg, channellistbox, listbox, character, zoom, akttime, aktchannel); |
---|
410 | selectchannelgmepg(channellistbox); |
---|
411 | } |
---|
412 | else if(ostrncmp("(SAT)-", tmpstr, 6) == 0 && strlen(tmpstr) > 6) |
---|
413 | { |
---|
414 | tmpstr1 = ostrcat(tmpstr1, _("GRAPHIC MULTI EPG - Satellites"), 0, 0); |
---|
415 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
416 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 6, 1, 0); |
---|
417 | changetitle(gmultiepg, tmpstr1); |
---|
418 | free(tmpstr1); tmpstr1 = NULL; |
---|
419 | satnode = getsat(tmpstr + 6); |
---|
420 | list = SATCHANNEL; |
---|
421 | aktlist = (void*)satnode; |
---|
422 | showsatgmepgchannel(gmultiepg, channellistbox, listbox, satnode, zoom, akttime, aktchannel); |
---|
423 | selectchannelgmepg(channellistbox); |
---|
424 | } |
---|
425 | else if(ostrncmp("(PROVIDER)-", tmpstr, 11) == 0 && strlen(tmpstr) > 6) |
---|
426 | { |
---|
427 | tmpstr1 = ostrcat(tmpstr1, _("GRAPHIC MULTI EPG - Provider"), 0, 0); |
---|
428 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
429 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 11, 1, 0); |
---|
430 | changetitle(gmultiepg, tmpstr1); |
---|
431 | free(tmpstr1); tmpstr1 = NULL; |
---|
432 | providernode = getproviderbyname(tmpstr + 11); |
---|
433 | list = PROVIDERCHANNEL; |
---|
434 | aktlist = (void*)providernode; |
---|
435 | showprovidergmepgchannel(gmultiepg, channellistbox, listbox, providernode, zoom, akttime, aktchannel); |
---|
436 | selectchannelgmepg(channellistbox); |
---|
437 | } |
---|
438 | else |
---|
439 | { |
---|
440 | changetitle(gmultiepg, _("GRAPHIC MULTI EPG - All Channels")); |
---|
441 | list = ALLCHANNEL; |
---|
442 | showallgmepgchannel(gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel); |
---|
443 | selectchannelgmepg(channellistbox); |
---|
444 | } |
---|
445 | |
---|
446 | if(epgscreenconf != 3) |
---|
447 | { |
---|
448 | b1->hidden = YES; |
---|
449 | b2->hidden = YES; |
---|
450 | b3->hidden = YES; |
---|
451 | } |
---|
452 | else |
---|
453 | { |
---|
454 | b1->hidden = NO; |
---|
455 | b2->hidden = NO; |
---|
456 | b3->hidden = NO; |
---|
457 | } |
---|
458 | |
---|
459 | tmpstr = NULL; |
---|
460 | status.screencalc = 2; |
---|
461 | drawscreen(gmultiepg, 0); |
---|
462 | status.screencalc = 0; |
---|
463 | addscreenrc(gmultiepg, listbox); |
---|
464 | listbox->aktpage = channellistbox->aktpage; |
---|
465 | |
---|
466 | createtimeline(gmultiepg, timeline, akttime, zoom); |
---|
467 | |
---|
468 | drawchannellistgmepg(gmultiepg, list, listbox); |
---|
469 | |
---|
470 | while(1) |
---|
471 | { |
---|
472 | status.screencalc = 2; |
---|
473 | rcret = waitrc(gmultiepg, 0, 0); |
---|
474 | status.screencalc = 0; |
---|
475 | |
---|
476 | channellistbox->aktpage = listbox->aktpage; |
---|
477 | |
---|
478 | if((rcret == getrcconfigint("rcexit", NULL)) || (rcret == getrcconfigint("rcepg", NULL))) break; |
---|
479 | if(rcret == getrcconfigint("rcinfo", NULL)) break; |
---|
480 | if(rcret == getrcconfigint("rcok", NULL)) |
---|
481 | { |
---|
482 | servicecheckret(servicestart((struct channel*)listbox->select->handle, NULL, NULL, 0), 0); |
---|
483 | break; |
---|
484 | } |
---|
485 | |
---|
486 | if(epgscreenconf == 3 && rcret == getrcconfigint("rcred", NULL)) |
---|
487 | { |
---|
488 | if(listbox->select != NULL) |
---|
489 | { |
---|
490 | clearscreen(gmultiepg); |
---|
491 | screenepg((struct channel*)listbox->select->handle, (struct epg*)listbox->select->handle1); |
---|
492 | drawscreen(gmultiepg, 0); |
---|
493 | } |
---|
494 | } |
---|
495 | if(epgscreenconf == 3 && rcret == getrcconfigint("rcgreen", NULL)) |
---|
496 | { |
---|
497 | if(listbox->select != NULL) |
---|
498 | { |
---|
499 | clearscreen(gmultiepg); |
---|
500 | screensingleepg((struct channel*)listbox->select->handle, NULL); |
---|
501 | drawscreen(gmultiepg, 0); |
---|
502 | } |
---|
503 | } |
---|
504 | if(epgscreenconf == 3 && rcret == getrcconfigint("rcyellow", NULL)) |
---|
505 | { |
---|
506 | if(listbox->select != NULL) |
---|
507 | { |
---|
508 | clearscreen(gmultiepg); |
---|
509 | screenmultiepg((struct channel*)listbox->select->handle, NULL); |
---|
510 | drawscreen(gmultiepg, 0); |
---|
511 | } |
---|
512 | } |
---|
513 | |
---|
514 | if(rcret == getrcconfigint("rcff", NULL)) |
---|
515 | { |
---|
516 | akttime += addtime; |
---|
517 | |
---|
518 | if(list == BOUQUETCHANNEL) |
---|
519 | { |
---|
520 | if(showbouquetgmepgchannel(gmultiepg, channellistbox, listbox, ((struct mainbouquet*)aktlist)->bouquet, zoom, akttime, aktchannel) == 0) |
---|
521 | { |
---|
522 | akttime -= addtime; |
---|
523 | if(akttime < starttime) |
---|
524 | akttime = starttime; |
---|
525 | else |
---|
526 | showbouquetgmepgchannel(gmultiepg, channellistbox, listbox, ((struct mainbouquet*)aktlist)->bouquet, zoom, akttime, aktchannel); |
---|
527 | |
---|
528 | } |
---|
529 | } |
---|
530 | else if(list == ALLCHANNEL) |
---|
531 | { |
---|
532 | if(showallgmepgchannel(gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel) == 0) |
---|
533 | { |
---|
534 | akttime -= addtime; |
---|
535 | if(akttime < starttime) |
---|
536 | akttime = starttime; |
---|
537 | else |
---|
538 | showallgmepgchannel(gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel); |
---|
539 | } |
---|
540 | } |
---|
541 | else if(list == AZCHANNEL) |
---|
542 | { |
---|
543 | if(showazgmepgchannel(gmultiepg, channellistbox, listbox, character, zoom, akttime, aktchannel) == 0) |
---|
544 | { |
---|
545 | akttime -= addtime; |
---|
546 | if(akttime < starttime) |
---|
547 | akttime = starttime; |
---|
548 | else |
---|
549 | showazgmepgchannel(gmultiepg, channellistbox, listbox, character, zoom, akttime, aktchannel); |
---|
550 | } |
---|
551 | } |
---|
552 | else if(list == SATCHANNEL) |
---|
553 | { |
---|
554 | if(showsatgmepgchannel(gmultiepg, channellistbox, listbox, satnode, zoom, akttime, aktchannel) == 0) |
---|
555 | { |
---|
556 | akttime -= addtime; |
---|
557 | if(akttime < starttime) |
---|
558 | akttime = starttime; |
---|
559 | else |
---|
560 | showsatgmepgchannel(gmultiepg, channellistbox, listbox, satnode, zoom, akttime, aktchannel); |
---|
561 | } |
---|
562 | } |
---|
563 | else if(list == PROVIDERCHANNEL) |
---|
564 | { |
---|
565 | if(showprovidergmepgchannel(gmultiepg, channellistbox, listbox, providernode, zoom, akttime, aktchannel) == 0) |
---|
566 | { |
---|
567 | akttime -= addtime; |
---|
568 | if(akttime < starttime) |
---|
569 | akttime = starttime; |
---|
570 | else |
---|
571 | showprovidergmepgchannel(gmultiepg, channellistbox, listbox, providernode, zoom, akttime, aktchannel); |
---|
572 | } |
---|
573 | } |
---|
574 | createtimeline(gmultiepg, timeline, akttime, zoom); |
---|
575 | drawscreen(gmultiepg, 0); |
---|
576 | if(listbox->select != NULL) |
---|
577 | aktchannel = (struct channel*)listbox->select->handle; |
---|
578 | continue; |
---|
579 | } |
---|
580 | |
---|
581 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
582 | { |
---|
583 | akttime -= addtime; |
---|
584 | if(akttime < starttime) akttime = starttime; |
---|
585 | |
---|
586 | if(list == BOUQUETCHANNEL) |
---|
587 | showbouquetgmepgchannel(gmultiepg, channellistbox, listbox, ((struct mainbouquet*)aktlist)->bouquet, zoom, akttime, aktchannel); |
---|
588 | else if(list == ALLCHANNEL) |
---|
589 | showallgmepgchannel(gmultiepg, channellistbox, listbox, zoom, akttime, aktchannel); |
---|
590 | else if(list == AZCHANNEL) |
---|
591 | showazgmepgchannel(gmultiepg, channellistbox, listbox, character, zoom, akttime, aktchannel); |
---|
592 | else if(list == SATCHANNEL) |
---|
593 | showsatgmepgchannel(gmultiepg, channellistbox, listbox, satnode, zoom, akttime, aktchannel); |
---|
594 | else if(list == PROVIDERCHANNEL) |
---|
595 | showprovidergmepgchannel(gmultiepg, channellistbox, listbox, providernode, zoom, akttime, aktchannel); |
---|
596 | createtimeline(gmultiepg, timeline, akttime, zoom); |
---|
597 | drawscreen(gmultiepg, 0); |
---|
598 | if(listbox->select != NULL) |
---|
599 | aktchannel = (struct channel*)listbox->select->handle; |
---|
600 | continue; |
---|
601 | } |
---|
602 | |
---|
603 | if(rcret == getrcconfigint("rcblue", NULL) && listbox->select != NULL) |
---|
604 | { |
---|
605 | clearscreen(gmultiepg); |
---|
606 | ret = addrecepg((struct channel*)listbox->select->handle, (struct epg*)listbox->select->handle1, NULL); |
---|
607 | drawscreen(gmultiepg, 0); |
---|
608 | continue; |
---|
609 | } |
---|
610 | |
---|
611 | drawscreen(gmultiepg, 0); |
---|
612 | if(listbox->select != NULL) |
---|
613 | aktchannel = (struct channel*)listbox->select->handle; |
---|
614 | } |
---|
615 | |
---|
616 | status.markedchannel = NULL; |
---|
617 | status.markmodus = 0; |
---|
618 | status.screencalc = 0; |
---|
619 | delmarkedscreennodes(gmultiepg, 1); |
---|
620 | delmarkedscreennodes(gmultiepg, 3); |
---|
621 | delownerrc(gmultiepg); |
---|
622 | clearscreen(gmultiepg); |
---|
623 | } |
---|
624 | |
---|
625 | #endif |
---|