From bd66898c7820a00a7bd78c7c974f5be47f407468 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 26 Oct 2002 12:56:53 +0200 Subject: Fixed learning RC keys with more than one RC; displaying RC name when learning keys --- CONTRIBUTORS | 2 ++ HISTORY | 3 +++ i18n.c | 32 ++++++++++++++++---------------- interface.c | 49 ++++++++++++++++++++++++------------------------- 4 files changed, 45 insertions(+), 41 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index da16f2a5..6df0e93b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -422,6 +422,8 @@ Oliver Endriss having displayed it for helping to debug a crash when closing down with remote control plugins for adding some satellites to 'sources.conf' + for reporting a bug in learning remote control keys in case there is more than + one remote control Reinhard Walter Buchner for adding some satellites to 'sources.conf' diff --git a/HISTORY b/HISTORY index 429da3b4..9e511fc1 100644 --- a/HISTORY +++ b/HISTORY @@ -1644,3 +1644,6 @@ Video Disk Recorder Revision History encrypted channel (thanks to Stefan Huelswitt). - Fixed blocking replaying in case an encrypted channel is being recorded on the primary device. +- Now the name of the remote control is displayed when learning the keys. +- Fixed learning remote control keys in case there is more than one remote + control (thanks to Oliver Endriss for reporting this one). diff --git a/i18n.c b/i18n.c index 2835cf92..53369be9 100644 --- a/i18n.c +++ b/i18n.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: i18n.c 1.97 2002/10/19 09:36:51 kls Exp $ + * $Id: i18n.c 1.98 2002/10/26 12:04:20 kls Exp $ * * Translations provided by: * @@ -2385,21 +2385,21 @@ const tI18nPhrase Phrases[] = { " aábcdeéfghijklmnoóöpqrstuúüvwxyz0123456789-.,#~", }, // Learning keys: - { "Learning Remote Control Keys", - "Fernbedienungs-Codes lernen", - "Ucim se kod upravljalca", - "Apprendimento tasti unita` remota", - "Leren toetsen afstandsbediening", - "Aprender as teclas do telecomando", - "Apprentissage des codes de télécommande", - "Lćre fjernkontrolltaster", - "Kaukosäätimen näppäinten opettelu", - "Nauka kodu pilota", - "Aprendiendo teclas del telemando", - "Ekmathisi Remote Control", - "Inlärning av fjärrkontrollsknappar", - "Invatare taste telecomanda", - "Távirányító betanítása", + { "Learning Remote Control Keys (%s)", + "Fernbedienungs-Codes lernen (%s)", + "Ucim se kod upravljalca (%s)", + "Apprendimento tasti unita` remota (%s)", + "Leren toetsen afstandsbediening (%s)", + "Aprender as teclas do telecomando (%s)", + "Apprentissage des codes de télécommande (%s)", + "Lćre fjernkontrolltaster (%s)", + "Kaukosäätimen näppäinten opettelu (%s)", + "Nauka kodu pilota (%s)", + "Aprendiendo teclas del telemando (%s)", + "Ekmathisi Remote Control (%s)", + "Inlärning av fjärrkontrollsknappar (%s)", + "Invatare taste telecomanda (%s)", + "Távirányító betanítása (%s)", }, { "Phase 1: Detecting RC code type", "Phase 1: FB Code feststellen", diff --git a/interface.c b/interface.c index 54c282d3..0f4b6151 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.57 2002/10/20 12:45:35 kls Exp $ + * $Id: interface.c 1.58 2002/10/26 12:22:18 kls Exp $ */ #include "interface.h" @@ -328,9 +328,6 @@ void cInterface::Help(const char *Red, const char *Green, const char *Yellow, co void cInterface::QueryKeys(cRemote *Remote) { - cRemote::Clear(); - Clear(); - WriteText(1, 1, tr("Learning Remote Control Keys"));//XXX Remote->name()!!! WriteText(1, 3, tr("Phase 1: Detecting RC code type")); WriteText(1, 5, tr("Press any key on the RC unit")); Flush(); @@ -416,28 +413,30 @@ void cInterface::LearnKeys(void) dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys"); if (!known) { Open(); + char Headline[Width()]; + snprintf(Headline, sizeof(Headline), tr("Learning Remote Control Keys (%s)"), Remote->Name()); + Clear(); + cRemote::Clear(); + WriteText(1, 1, Headline); + cRemote::SetLearning(true); + QueryKeys(Remote); + cRemote::SetLearning(false); + Clear(); + WriteText(1, 1, Headline); + WriteText(1, 3, tr("Phase 3: Saving key codes")); + WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel")); for (;;) { - Clear(); - cRemote::SetLearning(true); - QueryKeys(Remote); - cRemote::SetLearning(false); - Clear(); - WriteText(1, 1, tr("Learning Remote Control Keys"));//XXX Remote->name()!!! - WriteText(1, 3, tr("Phase 3: Saving key codes")); - WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel")); - for (;;) { - eKeys key = GetKey(); - if (key == kUp) { - Keys.Save(); - Close(); - return; - } - else if (key == kDown) { - Keys.Load(); - Close(); - return; - } - } + eKeys key = GetKey(); + if (key == kUp) { + Keys.Save(); + Close(); + break; + } + else if (key == kDown) { + Keys.Load(); + Close(); + break; + } } } } -- cgit v1.2.3