diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2006-05-28 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2006-05-28 18:00:00 +0200 |
commit | 177b875945e5898ebc07d79527e0ddc5e4e0f93d (patch) | |
tree | 2227730ee8d6e28c918b8fdb59f8c4a680ed12d0 /menu.c | |
parent | 5d8e3b18dc610e2696606092ba66e1477eccce88 (diff) | |
download | vdr-patch-lnbsharing-vdr-1.4.0-2.tar.gz vdr-patch-lnbsharing-vdr-1.4.0-2.tar.bz2 |
Version 1.4.0-2vdr-1.4.0-2
- Removed leftover LSMOD=... line from 'runvdr'.
- Modified the Makefile to copy additional libraries a plugin might provide (suggested
by Wayne Keer). See PLUGINS.html for details.
- Fixed handling Transfer Mode when replaying Dolby Digital audio and the option
'-a' was given (based on a patch from Werner Fink). To avoid having to increment
the API version, several #if checks have been introduced around this. These will
be removed once the API version actually needs to be incremented.
- Fixed deleting the 'skinDescriptions' in cMenuSetupOSD::~cMenuSetupOSD() (thanks
to Tobias Grimm).
- Fixed calculating the start time of repeated timers with "first day" (thanks to
Udo Richter).
- Now setting a timer's cached start time to 0 after a call to Skip() (thanks to
Udo Richter).
- Fixed handling the running status of EPG events in case the "Schedule" menu is
currently open (i.e. a write lock on the schedules data can't be achieved).
- Fixed handling VPS timers in case the EPG event hasn't been 'seen' in a while.
- Fixed calculating the cache size in cUnbufferedFile::Read() (thanks to Artur Skawina).
- Removed -fPIC from VDR's and libsi's Makefile (suggested by Prakash Punnoor).
- Modifed the device selection to better handle timer conflicts (reported by
Christian Wieninger).
- Avoiding a compiler warning in libsi's TypeLoop::operator[].
- Now processing the "frequency list descriptor" (based on a patch from Anssi Hannula).
- Improved the repeat function for LIRC remote controls (thanks to Joerg Riechardt).
- Fixed moving channels, which sometimes stopped the current replay session
(reported by Mirko Dölle).
- Fixed deleting channels in case the current channel's number changes (reported
by Mirko Dölle).
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 45 |
1 files changed, 41 insertions, 4 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.435 2006/04/28 12:48:01 kls Exp $ + * $Id: menu.c 1.438 2006/05/28 10:47:40 kls Exp $ */ #include "menu.h" @@ -499,6 +499,8 @@ eOSState cMenuChannels::New(void) eOSState cMenuChannels::Delete(void) { if (!HasSubMenu() && Count() > 0) { + int CurrentChannelNr = cDevice::CurrentChannel(); + cChannel *CurrentChannel = Channels.GetByNumber(CurrentChannelNr); int Index = Current(); cChannel *channel = GetChannel(Current()); int DeletedChannel = channel->Number(); @@ -508,10 +510,38 @@ eOSState cMenuChannels::Delete(void) return osContinue; } if (Interface->Confirm(tr("Delete channel?"))) { + if (CurrentChannel && channel == CurrentChannel) { + int n = Channels.GetNextNormal(CurrentChannel->Index()); +#if APIVERSNUM == 10400 + if (n < 0) { + int Idx = CurrentChannel->Index(); + cChannel *channel = Channels.Get(--Idx); + while (channel && channel->GroupSep()) + channel = Channels.Get(--Idx); + if (channel) + n = Idx; + } +#else +#warning ******* API version changed - remove old stuff + if (n < 0) + n = Channels.GetPrevNormal(CurrentChannel->Index()); +#endif + CurrentChannel = Channels.Get(n); + CurrentChannelNr = 0; // triggers channel switch below + } Channels.Del(channel); cOsdMenu::Del(Index); Propagate(); isyslog("channel %d deleted", DeletedChannel); + if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) { + if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) + Channels.SwitchTo(CurrentChannel->Number()); +#if APIVERSNUM != 10400 +#warning ******* API version changed - activate new code + else + cDevice::SetCurrentChannel(CurrentChannel); +#endif + } } } return osContinue; @@ -530,8 +560,15 @@ void cMenuChannels::Move(int From, int To) cOsdMenu::Move(From, To); Propagate(); isyslog("channel %d moved to %d", FromNumber, ToNumber); - if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) - Channels.SwitchTo(CurrentChannel->Number()); + if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) { + if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) + Channels.SwitchTo(CurrentChannel->Number()); +#if APIVERSNUM != 10400 +#warning ******* API version changed - activate new code + else + cDevice::SetCurrentChannel(CurrentChannel); +#endif + } } } @@ -2131,7 +2168,7 @@ cMenuSetupOSD::cMenuSetupOSD(void) cMenuSetupOSD::~cMenuSetupOSD() { cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]); - delete skinDescriptions; + delete[] skinDescriptions; } void cMenuSetupOSD::Set(void) |