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

Fixed setting the help key display in the Recordings menu in case of several layers of subdirectories

This commit is contained in:
Klaus Schmidinger 2005-11-06 09:44:58 +01:00
parent 27ab07e80d
commit ff64419396
3 changed files with 8 additions and 7 deletions

View File

@ -3913,7 +3913,7 @@ Video Disk Recorder Revision History
- The new class cUnbufferedFile is used for the recording files to avoid - The new class cUnbufferedFile is used for the recording files to avoid
trashing the file system cache (based on a patch by Ralf Müller). trashing the file system cache (based on a patch by Ralf Müller).
2005-11-05: Version 1.3.36 2005-11-06: Version 1.3.36
- Fixed a NULL pointer access with the cUnbufferedFile when a replay session runs - Fixed a NULL pointer access with the cUnbufferedFile when a replay session runs
all the way until the end of the recording (thanks to Joachim Wilke). all the way until the end of the recording (thanks to Joachim Wilke).
@ -3936,3 +3936,5 @@ Video Disk Recorder Revision History
- Fixed a race condition in the SPU decoder (thanks to Marco Schlüßler). - Fixed a race condition in the SPU decoder (thanks to Marco Schlüßler).
- The EPG scan no longer disturbs players that have also set live PIDs - The EPG scan no longer disturbs players that have also set live PIDs
(reported by Stefan Huelswitt). (reported by Stefan Huelswitt).
- Fixed setting the help key display in the Recordings menu in case of several
layers of subdirectories.

7
menu.c
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: menu.c 1.375 2005/10/09 11:22:03 kls Exp $ * $Id: menu.c 1.376 2005/11/05 17:29:22 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -1546,14 +1546,13 @@ void cMenuRecordingItem::IncrementCounter(bool New)
// --- cMenuRecordings ------------------------------------------------------- // --- cMenuRecordings -------------------------------------------------------
int cMenuRecordings::helpKeys = -1;
cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus) cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus)
:cOsdMenu(Base ? Base : tr("Recordings"), 8, 6) :cOsdMenu(Base ? Base : tr("Recordings"), 8, 6)
{ {
base = Base ? strdup(Base) : NULL; base = Base ? strdup(Base) : NULL;
level = Setup.RecordingDirs ? Level : -1; level = Setup.RecordingDirs ? Level : -1;
Recordings.StateChanged(recordingsState); // just to get the current state Recordings.StateChanged(recordingsState); // just to get the current state
helpKeys = -1;
Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay
Set(); Set();
if (Current() < 0) if (Current() < 0)
@ -1573,7 +1572,7 @@ cMenuRecordings::~cMenuRecordings()
void cMenuRecordings::SetHelpKeys(void) void cMenuRecordings::SetHelpKeys(void)
{ {
cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current()); cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current());
int NewHelpKeys = helpKeys; int NewHelpKeys = 0;
if (ri) { if (ri) {
if (ri->IsDirectory()) if (ri->IsDirectory())
NewHelpKeys = 1; NewHelpKeys = 1;

4
menu.h
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: menu.h 1.76 2005/10/03 10:39:08 kls Exp $ * $Id: menu.h 1.77 2005/11/05 17:26:09 kls Exp $
*/ */
#ifndef __MENU_H #ifndef __MENU_H
@ -150,7 +150,7 @@ private:
char *base; char *base;
int level; int level;
int recordingsState; int recordingsState;
static int helpKeys; int helpKeys;
void SetHelpKeys(void); void SetHelpKeys(void);
void Set(bool Refresh = false); void Set(bool Refresh = false);
cRecording *GetRecording(cMenuRecordingItem *Item); cRecording *GetRecording(cMenuRecordingItem *Item);