summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-10 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-10 18:00:00 +0100
commita1da0e5c5de55009716e2c327dda16c61c1dae83 (patch)
tree73148d197061f65d2f6d29b56b55b77f9428c17d /menu.c
parentef0a53af7282b14bd40f2087de28fc12a94e672b (diff)
downloadvdr-patch-lnbsharing-a1da0e5c5de55009716e2c327dda16c61c1dae83.tar.gz
vdr-patch-lnbsharing-a1da0e5c5de55009716e2c327dda16c61c1dae83.tar.bz2
Version 0.99vdr-0.99
- 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). - Changed the estimated data rate for calculating the remaining disk capacity to 25.75 MB/min. - Only reporting the 'EPG bugfix statistics' if there really were any fixes. - Added Finnish language texts (thanks to Hannu Savolainen). - Reverted to the previous way of searching for the EPG record of the current recording in case of a periodic timer (i.e. taking the one that is in the 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). - Changed the default name for instant recordings to "TITLE EPISODE" (avoiding the '-'). - If Setup.ShowInfoOnChSwitch is set to "no", the box for the EPG display is no longer shown (thanks to Andy Grobb). - If compiled with VFAT=1, characters that can't be handled by a VFAT system are now encoded to '#XX'. - When the user presses the "Power" button and there is a timer about to start recording within Setup.MinEventTimeout minutes, there is now a confirmation prompt telling the user that there is an upcoming timer event. - If a recording has no episode title, the trailing '~' is no longer shown in the progress display.
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/menu.c b/menu.c
index 40ac185..a7a98ec 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.148 2002/02/03 15:42:38 kls Exp $
+ * $Id: menu.c 1.152 2002/02/10 11:52:34 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;
@@ -1944,13 +1954,14 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
// Title with disk usage:
-#define MB_PER_MINUTE 30 // this is just an estimate!
+#define MB_PER_MINUTE 25.75 // this is just an estimate!
char buffer[40];
int FreeMB;
int Percent = VideoDiskSpace(&FreeMB);
- int Hours = int(double(FreeMB) / MB_PER_MINUTE / 60);
- int Minutes = (FreeMB / MB_PER_MINUTE) % 60;
+ int Minutes = int(double(FreeMB) / MB_PER_MINUTE);
+ int Hours = Minutes / 60;
+ Minutes %= 60;
snprintf(buffer, sizeof(buffer), "%s - Disk %d%% - %2d:%02d %s", tr("Main"), Percent, Hours, Minutes, tr("free"));
SetTitle(buffer);
@@ -2113,10 +2124,11 @@ cDisplayChannel::cDisplayChannel(int Number, bool Switched)
{
group = -1;
withInfo = !Switched || Setup.ShowInfoOnChSwitch;
+ int EpgLines = withInfo ? 5 : 1;
lines = 0;
oldNumber = number = 0;
cChannel *channel = Channels.GetByNumber(Number);
- Interface->Open(Setup.OSDwidth, Setup.ChannelInfoPos ? 5 : -5);
+ Interface->Open(Setup.OSDwidth, Setup.ChannelInfoPos ? EpgLines : -EpgLines);
if (channel) {
DisplayChannel(channel);
DisplayInfo();
@@ -2131,7 +2143,8 @@ cDisplayChannel::cDisplayChannel(eKeys FirstKey)
oldNumber = cDvbApi::CurrentChannel();
number = 0;
lastTime = time_ms();
- Interface->Open(Setup.OSDwidth, Setup.ChannelInfoPos ? 5 : -5);
+ int EpgLines = Setup.ShowInfoOnChSwitch ? 5 : 1;
+ Interface->Open(Setup.OSDwidth, Setup.ChannelInfoPos ? EpgLines : -EpgLines);
ProcessKey(FirstKey);
}
@@ -2340,7 +2353,7 @@ cRecordControl::~cRecordControl()
bool cRecordControl::GetEventInfo(void)
{
cChannel *channel = Channels.GetByNumber(timer->channel);
- time_t Time = timer->StartTime() + ((Setup.MarginStart * 2) + 1) * 60;
+ time_t Time = timer->IsSingleEvent() ? timer->StartTime() + ((Setup.MarginStart * 2) + 1) * 60 : timer->StartTime() + (timer->StopTime() - timer->StartTime()) / 2;
for (int seconds = 0; seconds <= MAXWAIT4EPGINFO; seconds++) {
{
cThreadLock ThreadLock;