[vdr] [RFC] plugins replacing main menu entries 1-4

Udo Richter udo_richter at gmx.de
Fri Mar 3 14:07:56 CET 2006

Christian Wieninger wrote:
> A real replacement currently can only be done when patching VDR, so what 
> do you think about the following change of the MenuMain constructor in 
> menu.c? :
> ...
>  cPlugin *p = NULL;
>  switch (State) {
>    case osSchedule:         
>        p = CallFirstService("schedule");
>        AddSubMenu(p?(cOsdMenu *)p->MainMenuAction():new cMenuSchedule);
>        break;

The Service() interface is probably the wrong interface for such things. 
VDR shouldn't rely on this interface, its primarily for non-standard 

Also, your suggestion will call MainMenuAction for each menu entry, how 
should the plugin know which one was called?

On the other hand, the current menu scheme needs an overhaul anyway, as 
the main menu is flooded with plugin entries. Such a customized main 
menu could easily hide the schedule/channels/timers/recordings menu, or 
move the default entries somewhere else. Plugin main menu entries could 
take over their place.

What about this one: Add an interface that allows a plugin to catch this:

   Menu = new cMenuMain;

... and either create an own main menu, or modify the existing one. 
(several plugins should be able to do some modifications one after the 



More information about the vdr mailing list