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 some missing cStatus::MsgOsdTextItem() calls
for reporting a missing "Editing process finished" message with skins 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 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> Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf' 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 "by provider". While in the "Channels" menu, pressing the '0' key switches
through these modes. through these modes.
- Fixed the buffer size in cRecording::SortName(). - 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 * 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.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: * Translations provided by:
* *
@ -3652,25 +3652,25 @@ const tI18nPhrase Phrases[] = {
" abcdefghijklmnopqrsðzþtuvwõäöüxyå0123456789-.#~", " abcdefghijklmnopqrsðzþtuvwõäöüxyå0123456789-.#~",
}, },
// Learning keys: // Learning keys:
{ "Learning Remote Control Keys (%s)", { "Learning Remote Control Keys",
"Fernbedienungs-Codes lernen (%s)", "Fernbedienungs-Codes lernen",
"Ucenje kod upravljalca (%s)", "Ucenje kod upravljalca",
"Apprendimento tasti unita` remota (%s)", "Apprendimento tasti unita` remota",
"Leren toetsen afstandsbediening (%s)", "Leren toetsen afstandsbediening",
"Aprender as teclas do telecomando (%s)", "Aprender as teclas do telecomando",
"Apprentissage des codes de télécommande (%s)", "Apprentissage des codes de télécommande",
"Lære fjernkontrolltaster (%s)", "Lære fjernkontrolltaster",
"Kaukosäätimen opettaminen (%s)", "Kaukosäätimen opettaminen",
"Nauka kodu pilota (%s)", "Nauka kodu pilota",
"Aprendiendo teclas del telemando (%s)", "Aprendiendo teclas del telemando",
"ÅêìÜèçóç ðëÞêôñùí ôçëå÷åéñéóìïý (%s)", "ÅêìÜèçóç ðëÞêôñùí ôçëå÷åéñéóìïý",
"Inlärning av fjärrkontrollsknappar (%s)", "Inlärning av fjärrkontrollsknappar",
"Învãþare taste telecomandã (%s)", "Învãþare taste telecomandã",
"Távirányító betanítása (%s)", "Távirányító betanítása",
"Aprenent les tecles del comandament a distància (%s)", "Aprenent les tecles del comandament a distància",
"²ÒÞÔ ÚÞÔÞÒ ÚÝÞßÞÚ ßãÛìâÐ (%s)", "²ÒÞÔ ÚÞÔÞÒ ÚÝÞßÞÚ ßãÛìâÐ",
"Uèenje kôda daljinskog upravljaèa (%s)", "Uèenje kôda daljinskog upravljaèa",
"Kaugjuhtimispuldi õpetamine (%s)", "Kaugjuhtimispuldi õpetamine",
}, },
{ "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.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" #include "interface.h"
@ -76,23 +76,23 @@ bool cInterface::Confirm(const char *s, int Seconds, bool WaitForTimeout)
bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu) bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
{ {
DisplayMenu->SetItem(tr("Phase 1: Detecting RC code type"), 1, false, false); DisplayMenu->SetItem(tr("Phase 1: Detecting RC code type"), 2, false, false);
DisplayMenu->SetItem(tr("Press any key on the RC unit"), 3, false, false); DisplayMenu->SetItem(tr("Press any key on the RC unit"), 4, false, false);
DisplayMenu->Flush(); DisplayMenu->Flush();
if (Remote->Initialize()) { if (Remote->Initialize()) {
DisplayMenu->SetItem(tr("RC code detected!"), 3, false, false); DisplayMenu->SetItem(tr("RC code detected!"), 4, false, false);
DisplayMenu->SetItem(tr("Do not press any key..."), 4, false, false); DisplayMenu->SetItem(tr("Do not press any key..."), 5, false, false);
DisplayMenu->Flush(); DisplayMenu->Flush();
sleep(3); sleep(3);
DisplayMenu->SetItem("", 3, false, false);
DisplayMenu->SetItem("", 4, 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; eKeys NewKey = kUp;
while (NewKey != kNone) { while (NewKey != kNone) {
char *Prompt; char *Prompt;
asprintf(&Prompt, tr("Press key for '%s'"), tr(cKey::ToString(NewKey))); 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); free(Prompt);
cRemote::Clear(); cRemote::Clear();
DisplayMenu->Flush(); DisplayMenu->Flush();
@ -107,11 +107,11 @@ bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
Keys.Del(last); Keys.Del(last);
} }
break; break;
case kDown: DisplayMenu->SetItem(tr("Press 'Up' to confirm"), 3, false, false); case kDown: DisplayMenu->SetItem(tr("Press 'Up' to confirm"), 4, false, false);
DisplayMenu->SetItem(tr("Press 'Down' to continue"), 4, false, false); DisplayMenu->SetItem(tr("Press 'Down' to continue"), 5, false, false);
DisplayMenu->SetItem("", 5, false, false);
DisplayMenu->SetItem("", 6, false, false); DisplayMenu->SetItem("", 6, false, false);
DisplayMenu->SetItem("", 7, false, false); DisplayMenu->SetItem("", 7, false, false);
DisplayMenu->SetItem("", 8, false, false);
DisplayMenu->Flush(); DisplayMenu->Flush();
for (;;) { for (;;) {
Key = cRemote::Get(100); Key = cRemote::Get(100);
@ -120,7 +120,7 @@ bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
return true; return true;
} }
else if (Key == kDown) { else if (Key == kDown) {
DisplayMenu->SetItem("", 4, false, false); DisplayMenu->SetItem("", 5, false, false);
k = kNone; // breaks the outer for() loop k = kNone; // breaks the outer for() loop
break; break;
} }
@ -139,17 +139,17 @@ bool cInterface::QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu)
} }
} }
if (NewKey > kUp) if (NewKey > kUp)
DisplayMenu->SetItem(tr("(press 'Up' to go back)"), 5, false, false); DisplayMenu->SetItem(tr("(press 'Up' to go back)"), 6, false, false);
else
DisplayMenu->SetItem("", 5, false, false);
if (NewKey > kDown)
DisplayMenu->SetItem(tr("(press 'Down' to end key definition)"), 6, false, false);
else else
DisplayMenu->SetItem("", 6, false, false); DisplayMenu->SetItem("", 6, false, false);
if (NewKey > kMenu) if (NewKey > kDown)
DisplayMenu->SetItem(tr("(press 'Menu' to skip this key)"), 7, false, false); DisplayMenu->SetItem(tr("(press 'Down' to end key definition)"), 7, false, false);
else else
DisplayMenu->SetItem("", 7, false, false); 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; return true;
} }
@ -168,9 +168,10 @@ void cInterface::LearnKeys(void)
if (!known) { if (!known) {
cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu(); cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu();
char Headline[256]; 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(); cRemote::Clear();
DisplayMenu->SetTitle(Headline); DisplayMenu->SetTitle(Headline);
DisplayMenu->SetItem(Remote->Name(), 0, false, false);
cRemote::SetLearning(Remote); cRemote::SetLearning(Remote);
bool rc = QueryKeys(Remote, DisplayMenu); bool rc = QueryKeys(Remote, DisplayMenu);
cRemote::SetLearning(NULL); cRemote::SetLearning(NULL);
@ -179,8 +180,9 @@ void cInterface::LearnKeys(void)
delete DisplayMenu; delete DisplayMenu;
continue; continue;
} }
DisplayMenu->SetItem(tr("Phase 3: Saving key codes"), 1, false, false); DisplayMenu->SetItem(Remote->Name(), 0, false, false);
DisplayMenu->SetItem(tr("Press 'Up' to save, 'Down' to cancel"), 3, 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 (;;) { for (;;) {
eKeys key = GetKey(); eKeys key = GetKey();
if (key == kUp) { if (key == kUp) {