diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-01-29 11:15:08 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-01-29 11:15:08 +0100 |
commit | f03ed68807b86529d20dffa6124527405ed75343 (patch) | |
tree | 93c547a0ffe58f854393858fc8b6baf5a488c056 /menu.c | |
parent | e93ff79da850d1fab15b1cb5c115bf3f5230a770 (diff) | |
download | vdr-f03ed68807b86529d20dffa6124527405ed75343.tar.gz vdr-f03ed68807b86529d20dffa6124527405ed75343.tar.bz2 |
Fixed displaying the current audio track in the channel display
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 14 |
1 files changed, 8 insertions, 6 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.405 2006/01/28 12:37:02 kls Exp $ + * $Id: menu.c 1.406 2006/01/29 11:13:51 kls Exp $ */ #include "menu.h" @@ -2956,13 +2956,13 @@ eOSState cMenuMain::ProcessKey(eKeys Key) // --- SetTrackDescriptions -------------------------------------------------- -static void SetTrackDescriptions(bool Live) +static void SetTrackDescriptions(int LiveChannel) { cDevice::PrimaryDevice()->ClrAvailableTracks(true); const cComponents *Components = NULL; cSchedulesLock SchedulesLock; - if (Live) { - cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel()); + if (LiveChannel) { + cChannel *Channel = Channels.GetByNumber(LiveChannel); if (Channel) { const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock); if (Schedules) { @@ -3061,7 +3061,7 @@ void cDisplayChannel::DisplayInfo(void) const cEvent *Present = Schedule->GetPresentEvent(true); const cEvent *Following = Schedule->GetFollowingEvent(true); if (Present != lastPresent || Following != lastFollowing) { - SetTrackDescriptions(true); + SetTrackDescriptions(channel->Number()); displayChannel->SetEvents(Present, Following); cStatus::MsgOsdProgramme(Present ? Present->StartTime() : 0, Present ? Present->Title() : NULL, Present ? Present->ShortText() : NULL, Following ? Following->StartTime() : 0, Following ? Following->Title() : NULL, Following ? Following->ShortText() : NULL); lastPresent = Present; @@ -3239,7 +3239,9 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key) DisplayInfo(); displayChannel->Flush(); if (NewChannel) { + SetTrackDescriptions(NewChannel->Number()); // to make them immediately visible in the channel display Channels.SwitchTo(NewChannel->Number()); + SetTrackDescriptions(NewChannel->Number()); // switching the channel has cleared them channel = NewChannel; } return osContinue; @@ -3324,7 +3326,7 @@ cDisplayTracks::cDisplayTracks(void) :cOsdObject(true) { cDevice::PrimaryDevice()->EnsureAudioTrack(); - SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice()); + SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice() ? cDevice::CurrentChannel() : 0); currentDisplayTracks = this; numTracks = track = 0; audioChannel = cDevice::PrimaryDevice()->GetAudioChannel(); |