summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-05 15:35:06 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-05 15:35:06 +0100
commitc0f1fc817ea9e3bbe64b4a9ebbff5ba13c0dd3c9 (patch)
tree2eb5b0de091be2fc672bebd4cec1dc9890f90f48
parent526c94f017e2f484abf447d59b8fd2f2c3ab3c00 (diff)
downloadvdr-c0f1fc817ea9e3bbe64b4a9ebbff5ba13c0dd3c9.tar.gz
vdr-c0f1fc817ea9e3bbe64b4a9ebbff5ba13c0dd3c9.tar.bz2
The default cOsdObject::Show() now automatically calls cOsdMenu::Display() if this is a menu
-rw-r--r--HISTORY2
-rw-r--r--osdbase.c10
-rw-r--r--osdbase.h4
-rw-r--r--vdr.c7
4 files changed, 15 insertions, 8 deletions
diff --git a/HISTORY b/HISTORY
index 7448910d..35c383b2 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4102,3 +4102,5 @@ Video Disk Recorder Revision History
details).
- The "Mark/Move" function in the "Channels" menu now also works in the non-numeric
sort modes.
+- The default cOsdObject::Show() now automatically calls cOsdMenu::Display() if
+ this is a menu.
diff --git a/osdbase.c b/osdbase.c
index ecd124d2..996dac9b 100644
--- a/osdbase.c
+++ b/osdbase.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@@ -59,6 +59,14 @@ eOSState cOsdItem::ProcessKey(eKeys Key)
return Key == kOk ? state : osUnknown;
}
+// --- cOsdObject ------------------------------------------------------------
+
+void cOsdObject::Show(void)
+{
+ if (isMenu)
+ ((cOsdMenu *)this)->Display();
+}
+
// --- cOsdMenu --------------------------------------------------------------
cSkinDisplayMenu *cOsdMenu::displayMenu = NULL;
diff --git a/osdbase.h b/osdbase.h
index 4f329f59..0a94f4a8 100644
--- a/osdbase.h
+++ b/osdbase.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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
@@ -77,7 +77,7 @@ public:
virtual ~cOsdObject() {}
bool NeedsFastResponse(void) { return needsFastResponse; }
bool IsMenu(void) { return isMenu; }
- virtual void Show(void) {}
+ virtual void Show(void);
virtual eOSState ProcessKey(eKeys Key) { return osUnknown; }
};
diff --git a/vdr.c b/vdr.c
index 8f63f006..96e775a2 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.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>
@@ -812,11 +812,8 @@ int main(int argc, char *argv[])
cPlugin *plugin = cPluginManager::GetPlugin(cRemote::GetPlugin());
if (plugin) {
Menu = plugin->MainMenuAction();
- if (Menu) {
+ if (Menu)
Menu->Show();
- if (Menu->IsMenu())
- ((cOsdMenu*)Menu)->Display();
- }
}
else
esyslog("ERROR: unknown plugin '%s'", cRemote::GetPlugin());