mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling of menus with no selectable items
This commit is contained in:
parent
d808293a06
commit
2cc029066b
1
HISTORY
1
HISTORY
@ -3881,3 +3881,4 @@ Video Disk Recorder Revision History
|
|||||||
- Added status message "Opening CAM menu..." for an immediate feedback when the CAM
|
- Added status message "Opening CAM menu..." for an immediate feedback when the CAM
|
||||||
menu has been requested.
|
menu has been requested.
|
||||||
- Speeded up initial opening of the CAM menu.
|
- Speeded up initial opening of the CAM menu.
|
||||||
|
- Fixed handling of menus with no selectable items.
|
||||||
|
4
menu.c
4
menu.c
@ -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: menu.c 1.370 2005/10/02 14:50:44 kls Exp $
|
* $Id: menu.c 1.371 2005/10/02 14:53:48 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -1302,7 +1302,7 @@ cMenuCam::cMenuCam(cCiMenu *CiMenu)
|
|||||||
dsyslog("CAM: '%s'", ciMenu->SubTitleText());
|
dsyslog("CAM: '%s'", ciMenu->SubTitleText());
|
||||||
}
|
}
|
||||||
for (int i = 0; i < ciMenu->NumEntries(); i++) {
|
for (int i = 0; i < ciMenu->NumEntries(); i++) {
|
||||||
Add(new cOsdItem(hk(ciMenu->Entry(i))));
|
Add(new cOsdItem(hk(ciMenu->Entry(i)), osUnknown, ciMenu->Selectable()));
|
||||||
dsyslog("CAM: '%s'", ciMenu->Entry(i));
|
dsyslog("CAM: '%s'", ciMenu->Entry(i));
|
||||||
}
|
}
|
||||||
if (*ciMenu->BottomText()) {
|
if (*ciMenu->BottomText()) {
|
||||||
|
@ -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 1.21 2005/10/02 09:23:10 kls Exp $
|
* $Id: osdbase.c 1.22 2005/10/02 15:00:40 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osdbase.h"
|
#include "osdbase.h"
|
||||||
@ -213,8 +213,9 @@ void cOsdMenu::Display(void)
|
|||||||
int i = first;
|
int i = first;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (cOsdItem *item = Get(first); item; item = Next(item)) {
|
for (cOsdItem *item = Get(first); item; item = Next(item)) {
|
||||||
displayMenu->SetItem(item->Text(), i - first, i == current, item->Selectable());
|
bool CurrentSelectable = (i == current) && item->Selectable();
|
||||||
if (i == current)
|
displayMenu->SetItem(item->Text(), i - first, CurrentSelectable, item->Selectable());
|
||||||
|
if (CurrentSelectable)
|
||||||
cStatus::MsgOsdCurrentItem(item->Text());
|
cStatus::MsgOsdCurrentItem(item->Text());
|
||||||
if (++n == displayMenuItems)
|
if (++n == displayMenuItems)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user