diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-06-19 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-06-19 18:00:00 +0200 |
commit | eb52e3004a829b73ddea535a881a0161ff19fa55 (patch) | |
tree | c4bf0ff08b4755f086dc079a0706267b53e04b32 /menu.c | |
parent | c281d01c089f4c9410a2756d3bcd99a56f702c86 (diff) | |
download | vdr-patch-lnbsharing-eb52e3004a829b73ddea535a881a0161ff19fa55.tar.gz vdr-patch-lnbsharing-eb52e3004a829b73ddea535a881a0161ff19fa55.tar.bz2 |
Version 1.3.11vdr-1.3.11
- In order to avoid problems on NPTL systems, VDR now checks for the presence
of NPTL at program start, and if it is, exits and tells the user to do
'export LD_ASSUME_KERNEL=2.4.1' before starting VDR.
- Revisited the "Fixed missing audio after replaying a DVD" change because it
introduced a sound disturbance when switching between channels on the same
transponder (thanks to Marco Schlüßler).
- In order to avoid problems on UTF-8 systems, VDR now checks for the presence
of UTF-8 at program start, and if it is, exits and tells the user to turn off
UTF-8 before starting VDR (thanks to Ludwig Nussel for pointing out a problem
with systems that are set to use UTF-8). There are also problems in case the
video partition is mounted with "iocharset=utf8" (thanks to Jörg Knitter for
reporting this one).
Please also read the "IMPORTANT NOTES" section in the INSTALL file!
- Some changes to the SPU decoder interface (thanks to Sven Goethel).
- Some improvements in cOsd creation (thanks to some suggestions by Jouni Karvo).
- Fixed calculating the OSD width and height (thanks to Olaf Henkel for reporting
a problem with long event texts in the "Classic VDR" skin).
- Fixed switching channels while an encrypted channel is being recorded, because the
channel was switched if the new channel was on the same transponder and was
a radio channel or an unencrypted channel (thanks to Martin Dauskardt for reporting
this one).
- No longer using the external 'find' command to scan the video directory for
recordings (based on a suggestion by Mirko Dölle).
- The list of recordings is now kept statically in memory to avoid long delays
when opening the "Recordings" menu. As a side effect, external modifications to
the video directory are no longer immediately reflected in the "Recordings" menu.
If a plugin manipulates the video directory in any way, it can call the function
Recordings.TriggerUpdate() to trigger an update of the list of recordings.
If some external tool manipulates the video directory, it can touch the file
'.update' in the video directory to trigger an update of the list of recordings.
- Fixed a memory leak in theme description handling (thanks to Sascha Volkenandt).
- Added cDevice::Flush() to make sure that all data in the video card's buffers
has been processed (thanks to Reinhard Nissl). Currently this is not yet actually
implemented for FF DVB cards.
- Fixed handling the color button texts in cMenuEditStrItem (thanks to Maynard
Cedric for reporting this one).
- Fixed the description of cRingBufferLinear (thanks to Ludwig Nussel for pointing
out this one).
- Fixed cRingBufferLinear::Get() in case the buffer wraps around (thanks to Ludwig
Nussel for reporting this one).
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 61 |
1 files changed, 28 insertions, 33 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.308 2004/06/06 15:06:28 kls Exp $ + * $Id: menu.c 1.309 2004/06/13 20:26:51 kls Exp $ */ #include "menu.h" @@ -1410,7 +1410,6 @@ void cMenuRecordingItem::IncrementCounter(bool New) // --- cMenuRecordings ------------------------------------------------------- -cRecordings cMenuRecordings::Recordings; int cMenuRecordings::helpKeys = -1; cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus) @@ -1419,40 +1418,35 @@ cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus) base = Base ? strdup(Base) : NULL; level = Setup.RecordingDirs ? Level : -1; Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay + const char *LastReplayed = cReplayControl::LastReplayed(); + cMenuRecordingItem *LastItem = NULL; + char *LastItemText = NULL; if (!Base) - Skins.Message(mtStatus, tr("scanning recordings...")); - bool Loaded = Base || Recordings.Load(); - if (!Base) - Skins.Message(mtStatus, NULL); - if (Loaded) { - const char *LastReplayed = cReplayControl::LastReplayed(); - cMenuRecordingItem *LastItem = NULL; - char *LastItemText = NULL; - for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) { - if (!Base || (strstr(recording->Name(), Base) == recording->Name() && recording->Name()[strlen(Base)] == '~')) { - cMenuRecordingItem *Item = new cMenuRecordingItem(recording, level); - if (*Item->Text() && (!LastItem || strcmp(Item->Text(), LastItemText) != 0)) { - Add(Item); - LastItem = Item; - free(LastItemText); - LastItemText = strdup(LastItem->Text()); // must use a copy because of the counters! - } - else - delete Item; - if (LastItem) { - if (LastReplayed && strcmp(LastReplayed, recording->FileName()) == 0) - SetCurrent(LastItem); - if (LastItem->IsDirectory()) - LastItem->IncrementCounter(recording->IsNew()); - } + Recordings.Sort(); + for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) { + if (!Base || (strstr(recording->Name(), Base) == recording->Name() && recording->Name()[strlen(Base)] == '~')) { + cMenuRecordingItem *Item = new cMenuRecordingItem(recording, level); + if (*Item->Text() && (!LastItem || strcmp(Item->Text(), LastItemText) != 0)) { + Add(Item); + LastItem = Item; + free(LastItemText); + LastItemText = strdup(LastItem->Text()); // must use a copy because of the counters! + } + else + delete Item; + if (LastItem) { + if (LastReplayed && strcmp(LastReplayed, recording->FileName()) == 0) + SetCurrent(LastItem); + if (LastItem->IsDirectory()) + LastItem->IncrementCounter(recording->IsNew()); } } - free(LastItemText); - if (Current() < 0) - SetCurrent(First()); - else if (OpenSubMenus && Open(true)) - return; - } + } + free(LastItemText); + if (Current() < 0) + SetCurrent(First()); + else if (OpenSubMenus && Open(true)) + return; SetHelpKeys(); } @@ -2780,6 +2774,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause) cStatus::MsgRecording(device, Recording.Name()); if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo() cReplayControl::SetRecording(fileName, Recording.Name()); + Recordings.AddByName(fileName); } else DELETENULL(recorder); |