Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Submenus in plugins
Jan Ekholm wrote:
>
> On Tue, 4 Feb 2003, Klaus Schmidinger wrote:
>
> >Jan Ekholm wrote:
> >>
> >> On Tue, 4 Feb 2003, Klaus Schmidinger wrote:
> >>
> >> >Why don't you just take a look at the existing VDR code to see how it is
> >> >done there? ;-)
> >> >
> >> >You should do something like this:
> >> >
> >> > return AddSubMenu(new cMyMenu(MyParameters...));
> >>
> >> Heh, I feel like a moron. I did try to find something, but I just searched
> >> for the wrong things. Would this also work for moving up the hierarchy,
> >> ie. activating a parent menu, or does VDR take care of that automagically
> >> once I use AddSubMenu() and I'd better leave it alone?
> >
> >Simply return osBack to go up one level.
>
> Hmm, does VDR assume ownership of menus it gets passed, ie. does it nuke
> them when it doesn't need them anymore?
Yes, once a menu's ProcessKey() returns osBack the menu gets deleted.
> That it should not do, but it's
> not too easy to find out what really happens. Should every menu added with
> AddSubMenu() be allocated on the fly?
Yes, that's how it's supposed to work. Look at the existing code to see how
this is done.
> Same goes with strings, VDR seems to assume ownership of a lot of strings,
> resulting in quite a few unnecessary core dumps.
What strings exactly are you referring to?
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index