1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed learning RC keys with more than one RC; displaying RC name when learning keys

This commit is contained in:
Klaus Schmidinger 2002-10-26 12:56:53 +02:00
parent 41320eca4d
commit bd66898c78
4 changed files with 45 additions and 41 deletions

View File

@ -422,6 +422,8 @@ Oliver Endriss <o.endriss@gmx.de>
having displayed it having displayed it
for helping to debug a crash when closing down with remote control plugins for helping to debug a crash when closing down with remote control plugins
for adding some satellites to 'sources.conf' 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 <rw.buchner@freenet.de> Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf' for adding some satellites to 'sources.conf'

View File

@ -1644,3 +1644,6 @@ Video Disk Recorder Revision History
encrypted channel (thanks to Stefan Huelswitt). encrypted channel (thanks to Stefan Huelswitt).
- Fixed blocking replaying in case an encrypted channel is being recorded on - Fixed blocking replaying in case an encrypted channel is being recorded on
the primary device. 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).

32
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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: * Translations provided by:
* *
@ -2385,21 +2385,21 @@ const tI18nPhrase Phrases[] = {
" aábcdeéfghijklmnoóöpqrstuúüvwxyz0123456789-.,#~", " aábcdeéfghijklmnoóöpqrstuúüvwxyz0123456789-.,#~",
}, },
// Learning keys: // Learning keys:
{ "Learning Remote Control Keys", { "Learning Remote Control Keys (%s)",
"Fernbedienungs-Codes lernen", "Fernbedienungs-Codes lernen (%s)",
"Ucim se kod upravljalca", "Ucim se kod upravljalca (%s)",
"Apprendimento tasti unita` remota", "Apprendimento tasti unita` remota (%s)",
"Leren toetsen afstandsbediening", "Leren toetsen afstandsbediening (%s)",
"Aprender as teclas do telecomando", "Aprender as teclas do telecomando (%s)",
"Apprentissage des codes de télécommande", "Apprentissage des codes de télécommande (%s)",
"Lære fjernkontrolltaster", "Lære fjernkontrolltaster (%s)",
"Kaukosäätimen näppäinten opettelu", "Kaukosäätimen näppäinten opettelu (%s)",
"Nauka kodu pilota", "Nauka kodu pilota (%s)",
"Aprendiendo teclas del telemando", "Aprendiendo teclas del telemando (%s)",
"Ekmathisi Remote Control", "Ekmathisi Remote Control (%s)",
"Inlärning av fjärrkontrollsknappar", "Inlärning av fjärrkontrollsknappar (%s)",
"Invatare taste telecomanda", "Invatare taste telecomanda (%s)",
"Távirányító betanítása", "Távirányító betanítása (%s)",
}, },
{ "Phase 1: Detecting RC code type", { "Phase 1: Detecting RC code type",
"Phase 1: FB Code feststellen", "Phase 1: FB Code feststellen",

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #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) 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, 3, tr("Phase 1: Detecting RC code type"));
WriteText(1, 5, tr("Press any key on the RC unit")); WriteText(1, 5, tr("Press any key on the RC unit"));
Flush(); Flush();
@ -416,13 +413,16 @@ void cInterface::LearnKeys(void)
dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys"); dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys");
if (!known) { if (!known) {
Open(); Open();
for (;;) { char Headline[Width()];
snprintf(Headline, sizeof(Headline), tr("Learning Remote Control Keys (%s)"), Remote->Name());
Clear(); Clear();
cRemote::Clear();
WriteText(1, 1, Headline);
cRemote::SetLearning(true); cRemote::SetLearning(true);
QueryKeys(Remote); QueryKeys(Remote);
cRemote::SetLearning(false); cRemote::SetLearning(false);
Clear(); Clear();
WriteText(1, 1, tr("Learning Remote Control Keys"));//XXX Remote->name()!!! WriteText(1, 1, Headline);
WriteText(1, 3, tr("Phase 3: Saving key codes")); WriteText(1, 3, tr("Phase 3: Saving key codes"));
WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel")); WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel"));
for (;;) { for (;;) {
@ -430,13 +430,12 @@ void cInterface::LearnKeys(void)
if (key == kUp) { if (key == kUp) {
Keys.Save(); Keys.Save();
Close(); Close();
return; break;
} }
else if (key == kDown) { else if (key == kDown) {
Keys.Load(); Keys.Load();
Close(); Close();
return; break;
}
} }
} }
} }