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

Improved the CAM enquiry menu

This commit is contained in:
Klaus Schmidinger 2005-10-03 12:27:15 +02:00
parent adf99fb3e8
commit b724e950d8
2 changed files with 34 additions and 7 deletions

23
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.212 2005/10/02 14:36:11 kls Exp $
* $Id: i18n.c 1.213 2005/10/03 12:27:15 kls Exp $
*
* Translations provided by:
*
@ -2378,6 +2378,27 @@ const tI18nPhrase Phrases[] = {
"CAM mooduli taaskäivitus tehtud",
"CAM er blevet nulstillet",
},
{ "Please enter %d digits!",
"Bitte geben Sie %d Ziffern ein!",
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
"",//TODO
},
{ "No audio available!",
"Kein Audio verfügbar!",
"Zvok ni dosegljiv",

18
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 1.372 2005/10/03 10:41:26 kls Exp $
* $Id: menu.c 1.373 2005/10/03 12:24:34 kls Exp $
*/
#include "menu.h"
@ -1368,17 +1368,18 @@ eOSState cMenuCam::ProcessKey(eKeys Key)
// --- cMenuCamEnquiry -------------------------------------------------------
//XXX this is just quick and dirty - make this a separate display object
cMenuCamEnquiry::cMenuCamEnquiry(cCiEnquiry *CiEnquiry)
:cOsdMenu("", 10)
:cOsdMenu("", 1)
{
ciEnquiry = CiEnquiry;
int Length = ciEnquiry->ExpectedLength();
input = MALLOC(char, Length + 1);
*input = 0;
replied = false;
SetTitle(ciEnquiry->Text() ? ciEnquiry->Text() : "CAM");
Add(new cMenuEditNumItem("Input", input, Length, ciEnquiry->Blind()));
SetTitle("CAM");
Add(new cOsdItem(ciEnquiry->Text(), osUnknown, false));
Add(new cOsdItem("", osUnknown, false));
Add(new cMenuEditNumItem("", input, Length, ciEnquiry->Blind()));
Display();
}
@ -1392,7 +1393,12 @@ cMenuCamEnquiry::~cMenuCamEnquiry()
eOSState cMenuCamEnquiry::Reply(void)
{
//XXX check length???
if (ciEnquiry->ExpectedLength() < 0xFF && int(strlen(input)) != ciEnquiry->ExpectedLength()) {
char buffer[64];
snprintf(buffer, sizeof(buffer), tr("Please enter %d digits!"), ciEnquiry->ExpectedLength());
Skins.Message(mtError, buffer);
return osContinue;
}
ciEnquiry->Reply(input);
replied = true;
return osEnd;