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

Now displaying the name of the remote control for which the keys are being learned inside the menu

This commit is contained in:
Klaus Schmidinger 2004-11-01 14:27:43 +01:00
parent 5abadbf1a8
commit 6304820a0e
4 changed files with 49 additions and 42 deletions

View File

@ -534,6 +534,8 @@ Oliver Endriss <o.endriss@gmx.de>
for reporting some missing cStatus::MsgOsdTextItem() calls
for reporting a missing "Editing process finished" message with skins
for adding a sample setup for 'DisiCon-4 Single Cable Network' to 'diseqc.conf'
for reporting a problem with the name of the remote control for which the keys are
being learned overwriting the date/time in the 'classic' skin
Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf'

View File

@ -3113,3 +3113,6 @@ Video Disk Recorder Revision History
"by provider". While in the "Channels" menu, pressing the '0' key switches
through these modes.
- Fixed the buffer size in cRecording::SortName().
- Now displaying the name of the remote control for which the keys are being
learned inside the menu to avoid overwriting the date/time in the 'classic'
skin (thanks to Oliver Endriss for reporting this one).

40
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: i18n.c 1.160 2004/10/23 13:57:38 kls Exp $
* $Id: i18n.c 1.161 2004/11/01 14:18:48 kls Exp $
*
* Translations provided by:
*
@ -3652,25 +3652,25 @@ const tI18nPhrase Phrases[] = {
" abcdefghijklmnopqrsðzþtuvwõäöüxyå0123456789-.#~",
},
// Learning keys:
{ "Learning Remote Control Keys (%s)",
"Fernbedienungs-Codes lernen (%s)",
"Ucenje 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 opettaminen (%s)",
"Nauka kodu pilota (%s)",
"Aprendiendo teclas del telemando (%s)",
"ÅêìÜèçóç ðëÞêôñùí ôçëå÷åéñéóìïý (%s)",
"Inlärning av fjärrkontrollsknappar (%s)",
"Învãþare taste telecomandã (%s)",
"Távirányító betanítása (%s)",
"Aprenent les tecles del comandament a distància (%s)",
"²ÒÞÔ ÚÞÔÞÒ ÚÝÞßÞÚ ßãÛìâÐ (%s)",
"Uèenje kôda daljinskog upravljaèa (%s)",
"Kaugjuhtimispuldi õpetamine (%s)",
{ "Learning Remote Control Keys",
"Fernbedienungs-Codes lernen",
"Ucenje 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 opettaminen",
"Nauka kodu pilota",
"Aprendiendo teclas del telemando",
"ÅêìÜèçóç ðëÞêôñùí ôçëå÷åéñéóìïý",
"Inlärning av fjärrkontrollsknappar",
"Învãþare taste telecomandã",
"Távirányító betanítása",
"Aprenent les tecles del comandament a distància",
"²ÒÞÔ ÚÞÔÞÒ ÚÝÞßÞÚ ßãÛìâÐ",
"Uèenje kôda daljinskog upravljaèa",
"Kaugjuhtimispuldi õpetamine",
},
{ "Phase 1: Detecting RC code type",
"Phase 1: FB Code feststellen",

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: interface.c 1.67 2004/05/02 10:57:06 kls Exp $
* $Id: interface.c 1.68 2004/11/01 14:23:28 kls Exp $
*/
#include "interface.h"
@ -76,23 +76,23 @@ bool cInterface::Confirm(const char *s, int Seconds, bool WaitForTimeout)
bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
{
DisplayMenu->SetItem(tr("Phase 1: Detecting RC code type"), 1, false, false);
DisplayMenu->SetItem(tr("Press any key on the RC unit"), 3, false, false);
DisplayMenu->SetItem(tr("Phase 1: Detecting RC code type"), 2, false, false);
DisplayMenu->SetItem(tr("Press any key on the RC unit"), 4, false, false);
DisplayMenu->Flush();
if (Remote->Initialize()) {
DisplayMenu->SetItem(tr("RC code detected!"), 3, false, false);
DisplayMenu->SetItem(tr("Do not press any key..."), 4, false, false);
DisplayMenu->SetItem(tr("RC code detected!"), 4, false, false);
DisplayMenu->SetItem(tr("Do not press any key..."), 5, false, false);
DisplayMenu->Flush();
sleep(3);
DisplayMenu->SetItem("", 3, false, false);
DisplayMenu->SetItem("", 4, false, false);
DisplayMenu->SetItem("", 5, false, false);
DisplayMenu->SetItem(tr("Phase 2: Learning specific key codes"), 1, false, false);
DisplayMenu->SetItem(tr("Phase 2: Learning specific key codes"), 2, false, false);
eKeys NewKey = kUp;
while (NewKey != kNone) {
char *Prompt;
asprintf(&Prompt, tr("Press key for '%s'"), tr(cKey::ToString(NewKey)));
DisplayMenu->SetItem(Prompt, 3, false, false);
DisplayMenu->SetItem(Prompt, 4, false, false);
free(Prompt);
cRemote::Clear();
DisplayMenu->Flush();
@ -107,11 +107,11 @@ bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
Keys.Del(last);
}
break;
case kDown: DisplayMenu->SetItem(tr("Press 'Up' to confirm"), 3, false, false);
DisplayMenu->SetItem(tr("Press 'Down' to continue"), 4, false, false);
DisplayMenu->SetItem("", 5, false, false);
case kDown: DisplayMenu->SetItem(tr("Press 'Up' to confirm"), 4, false, false);
DisplayMenu->SetItem(tr("Press 'Down' to continue"), 5, false, false);
DisplayMenu->SetItem("", 6, false, false);
DisplayMenu->SetItem("", 7, false, false);
DisplayMenu->SetItem("", 8, false, false);
DisplayMenu->Flush();
for (;;) {
Key = cRemote::Get(100);
@ -120,7 +120,7 @@ bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
return true;
}
else if (Key == kDown) {
DisplayMenu->SetItem("", 4, false, false);
DisplayMenu->SetItem("", 5, false, false);
k = kNone; // breaks the outer for() loop
break;
}
@ -139,17 +139,17 @@ bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
}
}
if (NewKey > kUp)
DisplayMenu->SetItem(tr("(press 'Up' to go back)"), 5, false, false);
else
DisplayMenu->SetItem("", 5, false, false);
if (NewKey > kDown)
DisplayMenu->SetItem(tr("(press 'Down' to end key definition)"), 6, false, false);
DisplayMenu->SetItem(tr("(press 'Up' to go back)"), 6, false, false);
else
DisplayMenu->SetItem("", 6, false, false);
if (NewKey > kMenu)
DisplayMenu->SetItem(tr("(press 'Menu' to skip this key)"), 7, false, false);
if (NewKey > kDown)
DisplayMenu->SetItem(tr("(press 'Down' to end key definition)"), 7, false, false);
else
DisplayMenu->SetItem("", 7, false, false);
if (NewKey > kMenu)
DisplayMenu->SetItem(tr("(press 'Menu' to skip this key)"), 8, false, false);
else
DisplayMenu->SetItem("", 8, false, false);
}
return true;
}
@ -168,9 +168,10 @@ void cInterface::LearnKeys(void)
if (!known) {
cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu();
char Headline[256];
snprintf(Headline, sizeof(Headline), tr("Learning Remote Control Keys (%s)"), Remote->Name());
snprintf(Headline, sizeof(Headline), tr("Learning Remote Control Keys"));
cRemote::Clear();
DisplayMenu->SetTitle(Headline);
DisplayMenu->SetItem(Remote->Name(), 0, false, false);
cRemote::SetLearning(Remote);
bool rc = QueryKeys(Remote, DisplayMenu);
cRemote::SetLearning(NULL);
@ -179,8 +180,9 @@ void cInterface::LearnKeys(void)
delete DisplayMenu;
continue;
}
DisplayMenu->SetItem(tr("Phase 3: Saving key codes"), 1, false, false);
DisplayMenu->SetItem(tr("Press 'Up' to save, 'Down' to cancel"), 3, false, false);
DisplayMenu->SetItem(Remote->Name(), 0, false, false);
DisplayMenu->SetItem(tr("Phase 3: Saving key codes"), 2, false, false);
DisplayMenu->SetItem(tr("Press 'Up' to save, 'Down' to cancel"), 4, false, false);
for (;;) {
eKeys key = GetKey();
if (key == kUp) {