diff options
-rw-r--r-- | CONTRIBUTORS | 4 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | menu.c | 12 |
3 files changed, 18 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 29b20c48..0d08f10b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -196,3 +196,7 @@ Hannu Savolainen <hannu@opensound.com> Jürgen Schmidt <ju@ct.heise.de> for fixing a problem with 'in_addr_t' on systems with glibc < 2.2. + +Uwe Freese <mail@uwe-freese.de> + for suggesting to automatically close an empty recordings page after deleting + an entry @@ -970,7 +970,7 @@ Video Disk Recorder Revision History - Fixed a problem with the ERR macro defined by ncurses.h (thanks to Artur Skawina). -2002-02-09: Version 0.99pre6 +2002-02-10: Version 0.99pre6 - Fixed a bug in moving timers or channels to the last position in the list (thanks to Matthias Schniedermeyer for helping to debug this one). @@ -983,3 +983,5 @@ Video Disk Recorder Revision History middle between start and end time). - Added a typedef for 'in_addr_t' to make it work with glibc < 2.2 (thanks to Jürgen Schmidt). +- When the last entry in a "Recordings" menu page is deleted, that page is now + automatically closed (suggested by Uwe Freese). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.150 2002/02/09 15:25:27 kls Exp $ + * $Id: menu.c 1.151 2002/02/10 11:25:07 kls Exp $ */ #include "menu.h" @@ -1680,6 +1680,8 @@ eOSState cMenuRecordings::Del(void) cOsdMenu::Del(Current()); Recordings.Del(recording); Display(); + if (!Count()) + return osBack; } else Interface->Error(tr("Error while deleting recording!")); @@ -1707,6 +1709,7 @@ eOSState cMenuRecordings::Summary(void) eOSState cMenuRecordings::ProcessKey(eKeys Key) { + bool HadSubMenu = HasSubMenu(); eOSState state = cOsdMenu::ProcessKey(Key); if (state == osUnknown) { @@ -1720,6 +1723,13 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key) default: break; } } + if (Key == kYellow && HadSubMenu && !HasSubMenu()) { + // the last recording in a subdirectory was deleted, so let's go back up + cOsdMenu::Del(Current()); + if (!Count()) + return osBack; + Display(); + } if (!HasSubMenu() && Key != kNone) SetHelpKeys(); return state; |