summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-03 11:33:43 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-03 11:33:43 +0200
commit45a29e5b1614359d09aa3e69b8928fcfeebc84a2 (patch)
tree7e3532af8e53c32402b2980e02c9f4988a687031 /vdr.c
parent2a91de02abee737333cf650b32d13e5689443b76 (diff)
downloadvdr-45a29e5b1614359d09aa3e69b8928fcfeebc84a2.tar.gz
vdr-45a29e5b1614359d09aa3e69b8928fcfeebc84a2.tar.bz2
Key macros can now call plugins that don't have a main menu entry
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/vdr.c b/vdr.c
index c98ee0d6..02347fd6 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.211 2005/08/21 08:47:06 kls Exp $
+ * $Id: vdr.c 1.212 2005/09/03 11:26:27 kls Exp $
*/
#include <getopt.h>
@@ -695,7 +695,7 @@ int main(int argc, char *argv[])
Menu = new cMenuMain(cControl::Control());
Temp = NULL;
break;
- #define DirectMainFunction(function...)\
+ #define DirectMainFunction(function)\
DELETENULL(Menu);\
if (cControl::Control())\
cControl::Control()->Hide();\
@@ -709,7 +709,23 @@ int main(int argc, char *argv[])
case kSetup: DirectMainFunction(osSetup); break;
case kCommands: DirectMainFunction(osCommands); break;
case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break;
- case k_Plugin: DirectMainFunction(osPlugin, cRemote::GetPlugin()); break;
+ case k_Plugin: {
+ DELETENULL(Menu);
+ Temp = NULL;
+ if (cControl::Control())
+ cControl::Control()->Hide();
+ cPlugin *plugin = cPluginManager::GetPlugin(cRemote::GetPlugin());
+ if (plugin) {
+ Menu = Temp = plugin->MainMenuAction();
+ if (Menu) {
+ Menu->Show();
+ if (Menu->IsMenu())
+ ((cOsdMenu*)Menu)->Display();
+ }
+ }
+ key = kNone; // nobody else needs to see these keys
+ }
+ break;
// Channel up/down:
case kChanUp|k_Repeat:
case kChanUp: