Am 17.06.2010 19:29, schrieb Udo Richter:
Am 17.06.2010 17:31, schrieb martinez:
Can any kind person write this patch?
I'll see if I can come up with something on the weekend.
As always, the more close you look on it, the more complicated it gets. In other words, it got a little more than 12 lines... ;)
The cMenuEvent can now switch through the list of events of the parent menu with the green and yellow buttons. Depending on the parent menu, the buttons either show channel names or event starting times. From timer menu (blue button), the green and yellow buttons stay empty.
To gain access to the list of events, I've added an abstract cEventSequence class that is implemented by cMenuWhatsOn and cMenuSchedule. That way these two and the cMenuScheduleItem can continue to be private to menu.c.
Since now the cMenuEvent can handle different events, a convenient shortcut had to be removed: Previously, the red and blue buttons were handled by the parent menu, not cMenuEvent itself. cMenuEvent now does this on its own. Also the constructor parameters CanSwitch and Buttons were dropped and replaced by dynamic code. By this change, the event info on blue key in timers menu gains the red and blue button for free.
cMenuEvent had its ProcessKey re-arranged, as the original version could not handle sub-menus. (the parent menu did.)
Timer menu got a bug fix to handle sub-sub-menus without overwriting the button bar.
The attached patch is against vdr-1.6, but also cleanly applies and compiles on vdr-1.7.15.
A little testing help and feedback is welcome. Check that the green and yellow buttons work in program, whats now, whats next and timer info menu, and keep an eye on button bar text in the event menu and the parent menu after exiting. Also, the t and T markers on events should change, and in the timer menu the '>' for active timers, if you change that. Try adding timers from the event menu for running and future events. Try whether the blue key switches to the right channel. And try whatever else you can imagine.
Cheers,
Udo