1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The default cOsdObject::Show() now automatically calls cOsdMenu::Display() if this is a menu

This commit is contained in:
Klaus Schmidinger 2006-01-05 15:35:06 +01:00
parent 526c94f017
commit c0f1fc817e
4 changed files with 15 additions and 8 deletions

View File

@ -4102,3 +4102,5 @@ Video Disk Recorder Revision History
details). details).
- The "Mark/Move" function in the "Channels" menu now also works in the non-numeric - The "Mark/Move" function in the "Channels" menu now also works in the non-numeric
sort modes. sort modes.
- The default cOsdObject::Show() now automatically calls cOsdMenu::Display() if
this is a menu.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: osdbase.c 1.26 2006/01/05 13:26:00 kls Exp $ * $Id: osdbase.c 1.27 2006/01/05 15:35:06 kls Exp $
*/ */
#include "osdbase.h" #include "osdbase.h"
@ -59,6 +59,14 @@ eOSState cOsdItem::ProcessKey(eKeys Key)
return Key == kOk ? state : osUnknown; return Key == kOk ? state : osUnknown;
} }
// --- cOsdObject ------------------------------------------------------------
void cOsdObject::Show(void)
{
if (isMenu)
((cOsdMenu *)this)->Display();
}
// --- cOsdMenu -------------------------------------------------------------- // --- cOsdMenu --------------------------------------------------------------
cSkinDisplayMenu *cOsdMenu::displayMenu = NULL; cSkinDisplayMenu *cOsdMenu::displayMenu = NULL;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: osdbase.h 1.13 2006/01/05 12:42:11 kls Exp $ * $Id: osdbase.h 1.14 2006/01/05 15:35:06 kls Exp $
*/ */
#ifndef __OSDBASE_H #ifndef __OSDBASE_H
@ -77,7 +77,7 @@ public:
virtual ~cOsdObject() {} virtual ~cOsdObject() {}
bool NeedsFastResponse(void) { return needsFastResponse; } bool NeedsFastResponse(void) { return needsFastResponse; }
bool IsMenu(void) { return isMenu; } bool IsMenu(void) { return isMenu; }
virtual void Show(void) {} virtual void Show(void);
virtual eOSState ProcessKey(eKeys Key) { return osUnknown; } virtual eOSState ProcessKey(eKeys Key) { return osUnknown; }
}; };

7
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/vdr * The project's page is at http://www.cadsoft.de/vdr
* *
* $Id: vdr.c 1.228 2006/01/05 13:54:04 kls Exp $ * $Id: vdr.c 1.229 2006/01/05 15:35:06 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -812,11 +812,8 @@ int main(int argc, char *argv[])
cPlugin *plugin = cPluginManager::GetPlugin(cRemote::GetPlugin()); cPlugin *plugin = cPluginManager::GetPlugin(cRemote::GetPlugin());
if (plugin) { if (plugin) {
Menu = plugin->MainMenuAction(); Menu = plugin->MainMenuAction();
if (Menu) { if (Menu)
Menu->Show(); Menu->Show();
if (Menu->IsMenu())
((cOsdMenu*)Menu)->Display();
}
} }
else else
esyslog("ERROR: unknown plugin '%s'", cRemote::GetPlugin()); esyslog("ERROR: unknown plugin '%s'", cRemote::GetPlugin());