Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] ProcessKey in submenues



Hi,

I try to add an submenue to an existing "main-"menue.
The main-menue got this lines:
    [...]
    case k0:
      AddSubMenu(new cMenuNew());
      break;
    [...]

The submenu contains only one field and this method:

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?
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?

Greetings

	Torsten



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index