summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--menu.c27
-rw-r--r--menu.h3
3 files changed, 22 insertions, 9 deletions
diff --git a/HISTORY b/HISTORY
index 5a097c31..3d732af6 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3868,3 +3868,4 @@ Video Disk Recorder Revision History
Richter).
- Fixed setting current menu item if the first one is non-selectable.
- cOsdItem::cOsdItem() now has a 'Selectable' parameter.
+- Improved displaying 'sub-title' and 'bottom text' in the CAM menu.
diff --git a/menu.c b/menu.c
index bcc4e4b0..bb871ef7 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.364 2005/10/01 10:12:32 kls Exp $
+ * $Id: menu.c 1.365 2005/10/02 09:59:30 kls Exp $
*/
#include "menu.h"
@@ -1287,18 +1287,28 @@ eOSState cMenuCommands::ProcessKey(eKeys Key)
cMenuCam::cMenuCam(cCiMenu *CiMenu)
:cOsdMenu("")
{
+ dsyslog("CAM: Menu ------------------");
ciMenu = CiMenu;
selected = false;
+ offset = 0;
if (ciMenu->Selectable())
SetHasHotkeys();
- SetTitle(ciMenu->TitleText() ? ciMenu->TitleText() : "CAM");
- for (int i = 0; i < ciMenu->NumEntries(); i++)
+ SetTitle(*ciMenu->TitleText() ? ciMenu->TitleText() : "CAM");
+ dsyslog("CAM: %s", ciMenu->TitleText());
+ if (*ciMenu->SubTitleText()) {
+ Add(new cOsdItem(ciMenu->SubTitleText(), osUnknown, false));
+ offset = 1;
+ dsyslog("CAM: %s", ciMenu->SubTitleText());
+ }
+ for (int i = 0; i < ciMenu->NumEntries(); i++) {
Add(new cOsdItem(hk(ciMenu->Entry(i))));
- //XXX implement a clean way of displaying this:
- Add(new cOsdItem(ciMenu->SubTitleText()));
- Add(new cOsdItem(ciMenu->BottomText()));
+ dsyslog("CAM: %s", ciMenu->Entry(i));
+ }
+ if (*ciMenu->BottomText()) {
+ Add(new cOsdItem(ciMenu->BottomText(), osUnknown, false));
+ dsyslog("CAM: %s", ciMenu->BottomText());
+ }
Display();
- dsyslog("CAM: Menu - %s", ciMenu->TitleText());
}
cMenuCam::~cMenuCam()
@@ -1311,7 +1321,8 @@ cMenuCam::~cMenuCam()
eOSState cMenuCam::Select(void)
{
if (ciMenu->Selectable()) {
- ciMenu->Select(Current());
+ ciMenu->Select(Current() - offset);
+ dsyslog("CAM: select %d", Current() - offset);
selected = true;
}
return osEnd;
diff --git a/menu.h b/menu.h
index a122fa39..d217a159 100644
--- a/menu.h
+++ b/menu.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.h 1.74 2005/09/25 09:03:32 kls Exp $
+ * $Id: menu.h 1.75 2005/10/02 09:59:30 kls Exp $
*/
#ifndef __MENU_H
@@ -120,6 +120,7 @@ class cMenuCam : public cOsdMenu {
private:
cCiMenu *ciMenu;
bool selected;
+ int offset;
eOSState Select(void);
public:
cMenuCam(cCiMenu *CiMenu);