summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-11-24 10:45:39 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-11-24 10:45:39 +0100
commit08e4f36ccdee163b6925f09f591fbc8ce8c2611b (patch)
tree89289f25cee0ef8cfa03f4bd24de96e302971875 /menu.c
parente3a8fb1065b3ee38ec722d8a58179cbac94aa2d8 (diff)
downloadvdr-08e4f36ccdee163b6925f09f591fbc8ce8c2611b.tar.gz
vdr-08e4f36ccdee163b6925f09f591fbc8ce8c2611b.tar.bz2
Plugins can now have their own raw OSD
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/menu.c b/menu.c
index 2e29b02c..663b2dc7 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.224 2002/11/10 16:05:15 kls Exp $
+ * $Id: menu.c 1.225 2002/11/23 14:51:24 kls Exp $
*/
#include "menu.h"
@@ -2176,6 +2176,8 @@ cMenuPluginItem::cMenuPluginItem(const char *Name, int Index)
#define STOP_RECORDING tr(" Stop recording ")
#define ON_PRIMARY_INTERFACE tr("on primary interface")
+cOsdObject *cMenuMain::pluginOsdObject = NULL;
+
cMenuMain::cMenuMain(bool Replaying, eOSState State)
:cOsdMenu("")
{
@@ -2195,6 +2197,13 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
}
}
+cOsdObject *cMenuMain::PluginOsdObject(void)
+{
+ cOsdObject *o = pluginOsdObject;
+ pluginOsdObject = NULL;
+ return o;
+}
+
void cMenuMain::Set(void)
{
Clear();
@@ -2308,9 +2317,15 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
if (item) {
cPlugin *p = cPluginManager::GetPlugin(item->PluginIndex());
if (p) {
- cOsdMenu *menu = p->MainMenuAction();
- if (menu)
- return AddSubMenu(menu);
+ cOsdObject *menu = p->MainMenuAction();
+ if (menu) {
+ if (menu->IsMenu())
+ return AddSubMenu((cOsdMenu *)menu);
+ else {
+ pluginOsdObject = menu;
+ return osPlugin;
+ }
+ }
}
}
state = osEnd;