Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: ProcessKey in submenues
Torsten Kunkel wrote:
>
> Hi,
>
> I try to add an submenue to an existing "main-"menue.
> The main-menue got this lines:
> [...]
> case k0:
> AddSubMenu(new cMenuNew());
Here you add a new submenu of type cMenuNew...
> break;
> [...]
>
> The submenu contains only one field and this method:
>
... but this is NOT cMenuNew:
> eOSState cMenuReadDVD::ProcessKey(eKeys Key)
> {
> char *cmd = NULL;
>
> eOSState state = cOsdMenuReadDVD::ProcessKey(Key);
>
> asprintf(&cmd, "%d-%d", Key,state);
> esyslog(cmd);
>
> if (state == osUnknown) {
> switch (Key) {
> case kYellow:
> case kGreen:
> case kBlue:
> case kOk:
> case k0:
> return osContinue;
> break;
>
> case kRed:
> return osEnd;
> default:
> break;
> }//switch;
> }//if
> return state;
> }
>
> But it doesn't work like I wish.
> I'm quite shure, the problem sits in front of the computer, but I hope
> you can help me.
> a) When pressing kOk my output gives me 3-0 (kOk and osUnknown),
> everythink looks like exected. But when pressing kRed the output gives
> 7-1 (kRed and osContinue). Why does he give osContinue?
This means that cOsdMenuReadDVD::ProcessKey() already does something when kRed
is pressed.
> When having the same method in the main-menue, it comes as osUnknown.
> I think this is because of cOsdMenuReadDVD::ProcessKey(Key), but why
> is there an difference between menu and submenu?
>
> b) When I remove the "deactivation" of kYellow...k0, this keys are
> send to the main-menu.
> Example:
> Pressing kOk starts an script in the main menu, pressing k0 opens the
> submenu. Pressing kOk in the submenue starts the script, although in
> the submenu there isn't any reference to the script or th mainmenu.
> Is there a way to deactivate this keypressdelivering?
First, please provide an example that really uses actual code.
I'm not sure if cMenuNew is really cMenuReadDVD.
And what does cOsdMenuReadDVD::ProcessKey() look like?
Klaus
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index