In the "Timers" menu the '0' key now toggles between showing all timers and only the active ones

This commit is contained in:
Klaus Schmidinger
2025-06-27 09:05:20 +02:00
parent 6ed8db5ecd
commit c86481f74a
4 changed files with 20 additions and 4 deletions

View File

@@ -3464,6 +3464,8 @@ Matthias Senzel <matthias.senzel@t-online.de>
for reporting a bug in handling cSkinDisplayMenu::GetTextAreaFont()
for reporting characters being cut off while editing in the LCARS skin
for fixing updating the index when cutting a recording again
for making the '0' key in the "Timers" menu toggle between showing all timers and only
the active ones
Marek Nazarko <mnazarko@gmail.com>
for translating OSD texts to the Polish language

View File

@@ -10143,3 +10143,5 @@ Video Disk Recorder Revision History
- Fixed cPoller::Poll() to allow negative timeout values again.
- When regenerating the index of a recording, PID changes are now taken into account
(reported by Christoph Haubrich).
- In the "Timers" menu the '0' key now toggles between showing all timers and only
the active ones (thanks to Matthias Senzel).

2
MANUAL
View File

@@ -93,6 +93,8 @@ Version 2.7
(3) In the "Edit timer" menu, when on the "Day" item, the '0' key toggles between
a single shot and a repeating timer. If "Day" indicates a repeating timer,
the keys '1'...'7' can be used to toggle the individual days ('1' is Monday).
In the "Timers" menu the '0' key toggles between showing all timers and only
the active ones.
* Navigating through the On Screen Menus

18
menu.c
View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 5.29 2025/06/20 14:02:57 kls Exp $
* $Id: menu.c 5.30 2025/06/27 09:05:20 kls Exp $
*/
#include "menu.h"
@@ -1305,6 +1305,7 @@ class cMenuTimers : public cOsdMenu {
private:
cStateKey timersStateKey;
int helpKeys;
bool showAllTimers;
void Set(void);
eOSState Edit(void);
eOSState New(void);
@@ -1324,6 +1325,7 @@ cMenuTimers::cMenuTimers(void)
{
SetMenuCategory(mcTimer);
helpKeys = -1;
showAllTimers = true;
cMenuEditTimer::AddedTimer(); // to clear any leftovers
Set();
}
@@ -1342,9 +1344,11 @@ void cMenuTimers::Set(void)
LOCK_SCHEDULES_READ;
for (const cTimer *Timer = Timers->First(); Timer; Timer = Timers->Next(Timer)) {
cMenuTimerItem *Item = new cMenuTimerItem(Timer);
Add(Item);
if (CurrentTimer && Timer->Id() == CurrentTimer->Id() && (!Timer->Remote() && !CurrentTimer->Remote() || Timer->Remote() && CurrentTimer->Remote() && strcmp(Timer->Remote(), CurrentTimer->Remote()) == 0))
CurrentItem = Item;
if (showAllTimers || Timer->HasFlags(tfActive)) {
Add(Item);
if (CurrentTimer && Timer->Id() == CurrentTimer->Id() && (!Timer->Remote() && !CurrentTimer->Remote() || Timer->Remote() && CurrentTimer->Remote() && strcmp(Timer->Remote(), CurrentTimer->Remote()) == 0))
CurrentItem = Item;
}
}
}
Sort();
@@ -1473,8 +1477,10 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
if (!HasSubMenu())
Set();
eOSState state = cOsdMenu::ProcessKey(Key);
bool oldShowAllTimers = showAllTimers;
if (state == osUnknown) {
switch (Key) {
case k0: showAllTimers = !showAllTimers; break;
case kOk: return Edit();
case kRed: state = OnOff(); break; // must go through SetHelpKeys()!
case kGreen: return New();
@@ -1495,6 +1501,10 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
SetHelpKeys();
Display();
}
if (showAllTimers != oldShowAllTimers) {
timersStateKey.Reset();
Set();
}
if (Key != kNone)
SetHelpKeys();
return state;