summaryrefslogtreecommitdiff
path: root/osdbase.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-10-03 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-10-03 18:00:00 +0200
commit88d8d634089bae65bdfea8238a847b7883058072 (patch)
tree8d6143bb63258e7c8b918d664f69a5870d1e8983 /osdbase.c
parentc16bbf7422f37108580e559ca849e5aafbdac672 (diff)
downloadvdr-patch-lnbsharing-88d8d634089bae65bdfea8238a847b7883058072.tar.gz
vdr-patch-lnbsharing-88d8d634089bae65bdfea8238a847b7883058072.tar.bz2
Version 1.3.34vdr-1.3.34
- Fixed a leftover 'summary.vdr' in vdr.5 (thanks to Peter Bieringer for reporting this one). - Fixed opening recording folders in case the last replayed recording no longer exists (reported by Udo Richter). - Fixed an unjustified "Error while accessing recording!" after deleting a recording from a subfolder. - Fixed handling the '.update' file in case the video directory is not at the default location (reported by Jon Burgess). - Fixed a crash in cConfig::Load() when compiling on the PPC (thanks to Sascha Volkenandt). - Fixed the FATALERRNO macro to check for a non-zero errno value (reported by Marco Schlüßler). - Added a check against MAXOSDAREAS in cOsd::CanHandleAreas() (reported by Udo 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. - Added status message "Resetting CAM..." for an immediate feedback when the CAM reset has been triggered. - The CAM menu now automatically updates itself in case of a progress display (as used, for instance, when updating the firmware via satellite). - Now skipping some funny characters sent by some CAMs at the beginning of strings. - The CAM menu is now completely closed when pressing the Menu key while inside a sub menu. - Reduced MAX_CONNECT_RETRIES in ci.c to 2 (waiting too long made the whole thing appear hanging). - Added status message "Opening CAM menu..." for an immediate feedback when the CAM menu has been requested. - Speeded up initial opening of the CAM menu. - Fixed handling of menus with no selectable items. - The character 0x8A in CAM menu strings is now mapped to a real newline. - The 'sub-title' and 'bottom text' in the CAM menu can now consist of several lines. - Improved the CAM enquiry menu.
Diffstat (limited to 'osdbase.c')
-rw-r--r--osdbase.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/osdbase.c b/osdbase.c
index 98307cd..9646bcc 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.20 2005/06/18 10:30:51 kls Exp $
+ * $Id: osdbase.c 1.22 2005/10/02 15:00:40 kls Exp $
*/
#include "osdbase.h"
@@ -25,12 +25,12 @@ cOsdItem::cOsdItem(eOSState State)
fresh = true;
}
-cOsdItem::cOsdItem(const char *Text, eOSState State)
+cOsdItem::cOsdItem(const char *Text, eOSState State, bool Selectable)
{
text = NULL;
offset = -1;
state = State;
- selectable = true;
+ selectable = Selectable;
fresh = true;
SetText(Text);
}
@@ -196,8 +196,11 @@ void cOsdMenu::Display(void)
int count = Count();
if (count > 0) {
int ni = 0;
- for (cOsdItem *item = First(); item; item = Next(item))
+ for (cOsdItem *item = First(); item; item = Next(item)) {
cStatus::MsgOsdItem(item->Text(), ni++);
+ if (current < 0 && item->Selectable())
+ current = item->Index();
+ }
if (current < 0)
current = 0; // just for safety - there HAS to be a current item!
if (current - first >= displayMenuItems || current < first) {
@@ -210,8 +213,9 @@ void cOsdMenu::Display(void)
int i = first;
int n = 0;
for (cOsdItem *item = Get(first); item; item = Next(item)) {
- displayMenu->SetItem(item->Text(), i - first, i == current, item->Selectable());
- if (i == current)
+ bool CurrentSelectable = (i == current) && item->Selectable();
+ displayMenu->SetItem(item->Text(), i - first, CurrentSelectable, item->Selectable());
+ if (CurrentSelectable)
cStatus::MsgOsdCurrentItem(item->Text());
if (++n == displayMenuItems)
break;