summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-12-01 10:48:08 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-12-01 10:48:08 +0100
commit816e6847aac13ad51bf7d569b90be5f7fbe5c027 (patch)
tree779f79053d895066de16044c73bff327a9209d4c /menu.c
parent125872e75f48af908bd008037226bbddb62666c1 (diff)
downloadvdr-816e6847aac13ad51bf7d569b90be5f7fbe5c027.tar.gz
vdr-816e6847aac13ad51bf7d569b90be5f7fbe5c027.tar.bz2
Macros in 'keymacros.conf' can now use "@plugin" to directly access the main menu function of a given plugin
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/menu.c b/menu.c
index 25795fb8..a1c136fa 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.227 2002/11/29 14:06:38 kls Exp $
+ * $Id: menu.c 1.228 2002/12/01 10:31:55 kls Exp $
*/
#include "menu.h"
@@ -2178,11 +2178,11 @@ cMenuPluginItem::cMenuPluginItem(const char *Name, int Index)
cOsdObject *cMenuMain::pluginOsdObject = NULL;
-cMenuMain::cMenuMain(bool Replaying, eOSState State)
+cMenuMain::cMenuMain(bool Replaying, eOSState State, const char *Plugin)
:cOsdMenu("")
{
replaying = Replaying;
- Set();
+ Set(Plugin);
// Initial submenus:
@@ -2193,6 +2193,7 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
case osSetup: AddSubMenu(new cMenuSetup); break;
case osCommands: AddSubMenu(new cMenuCommands(tr("Commands"), &Commands)); break;
+ case osPlugin: break; // the actual work is done in Set()
default: break;
}
}
@@ -2204,7 +2205,7 @@ cOsdObject *cMenuMain::PluginOsdObject(void)
return o;
}
-void cMenuMain::Set(void)
+void cMenuMain::Set(const char *Plugin)
{
Clear();
//SetTitle("VDR"); // this is done below, including disk usage
@@ -2237,7 +2238,7 @@ void cMenuMain::Set(void)
if (p) {
const char *item = p->MainMenuEntry();
if (item)
- Add(new cMenuPluginItem(hk(item), i));
+ Add(new cMenuPluginItem(hk(item), i), Plugin && strcmp(Plugin, p->Name()) == 0);
}
else
break;