1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

A cOsdMenu can now handle skins that display different numbers of items in the various menu categories

This commit is contained in:
Klaus Schmidinger 2012-04-23 09:47:26 +02:00
parent 3d32b07862
commit 28685f9895
3 changed files with 7 additions and 5 deletions

View File

@ -7079,3 +7079,5 @@ Video Disk Recorder Revision History
compatibility, the default skins "Classic VDR", "ST:TNG Panels" and "Text mode" compatibility, the default skins "Classic VDR", "ST:TNG Panels" and "Text mode"
(i.e. curses) have been changed to behave like before. Other skins may want to (i.e. curses) have been changed to behave like before. Other skins may want to
display the disk usage in totally different ways. display the disk usage in totally different ways.
- A cOsdMenu can now handle skins that display different numbers of items in the
various menu categories.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: osdbase.c 2.5 2012/04/08 11:19:46 kls Exp $ * $Id: osdbase.c 2.6 2012/04/23 09:41:22 kls Exp $
*/ */
#include "osdbase.h" #include "osdbase.h"
@ -72,13 +72,13 @@ void cOsdObject::Show(void)
cSkinDisplayMenu *cOsdMenu::displayMenu = NULL; cSkinDisplayMenu *cOsdMenu::displayMenu = NULL;
int cOsdMenu::displayMenuCount = 0; int cOsdMenu::displayMenuCount = 0;
int cOsdMenu::displayMenuItems = 0;//XXX dynamic???
cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4) cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4)
{ {
isMenu = true; isMenu = true;
digit = 0; digit = 0;
hasHotkeys = false; hasHotkeys = false;
displayMenuItems = 0;
title = NULL; title = NULL;
menuCategory = mcUnknown; menuCategory = mcUnknown;
SetTitle(Title); SetTitle(Title);
@ -116,7 +116,6 @@ void cOsdMenu::SetDisplayMenu(void)
delete displayMenu; delete displayMenu;
} }
displayMenu = Skins.Current()->DisplayMenu(); displayMenu = Skins.Current()->DisplayMenu();
displayMenuItems = displayMenu->MaxItems();
} }
const char *cOsdMenu::hk(const char *s) const char *cOsdMenu::hk(const char *s)
@ -220,6 +219,7 @@ void cOsdMenu::Display(void)
cStatus::MsgOsdClear(); cStatus::MsgOsdClear();
if (menuCategory != displayMenu->MenuCategory()) if (menuCategory != displayMenu->MenuCategory())
displayMenu->SetMenuCategory(menuCategory); displayMenu->SetMenuCategory(menuCategory);
displayMenuItems = displayMenu->MaxItems();
displayMenu->SetTabs(cols[0], cols[1], cols[2], cols[3], cols[4]);//XXX displayMenu->SetTabs(cols[0], cols[1], cols[2], cols[3], cols[4]);//XXX
displayMenu->SetTitle(title); displayMenu->SetTitle(title);
cStatus::MsgOsdTitle(title); cStatus::MsgOsdTitle(title);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: osdbase.h 2.3 2012/04/08 11:18:38 kls Exp $ * $Id: osdbase.h 2.4 2012/04/23 09:40:07 kls Exp $
*/ */
#ifndef __OSDBASE_H #ifndef __OSDBASE_H
@ -86,7 +86,7 @@ class cOsdMenu : public cOsdObject, public cList<cOsdItem> {
private: private:
static cSkinDisplayMenu *displayMenu; static cSkinDisplayMenu *displayMenu;
static int displayMenuCount; static int displayMenuCount;
static int displayMenuItems; int displayMenuItems;
char *title; char *title;
int cols[cSkinDisplayMenu::MaxTabs]; int cols[cSkinDisplayMenu::MaxTabs];
int first, current, marked; int first, current, marked;