summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-11-01 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-11-01 18:00:00 +0100
commit3038be2a6a849e726d6fe99236d5dc61b679198f (patch)
tree9901f3dd92799de71853ed18faf8665f17e5cc79 /interface.c
parent6f93a5f7819b3c7030a5b199e502bedd4eb7844c (diff)
downloadvdr-patch-lnbsharing-3038be2a6a849e726d6fe99236d5dc61b679198f.tar.gz
vdr-patch-lnbsharing-3038be2a6a849e726d6fe99236d5dc61b679198f.tar.bz2
Version 1.3.15vdr-1.3.15
- Fixed some typos in the Makefile's 'font' target (thanks to Uwe Hanke). - Added more checks and polling when getting frontend events (based on a patch from Werner Fink). - No longer explicitly waiting for a tuner lock when switching channels (apparently setting "live" PIDs before the tuner is locked doesn't hurt). Moved the wait into cDevice::AttachReceiver() instead. - Immediately displaying the new channel info when switching channel groups. - Moved the main program loop variables further up to allow compilation with older compiler versions (thanks to Marco Schlüßler for reporting this one). - Now calling pthread_cond_broadcast() in the destructor of cCondWait and cCondVar to make sure any sleepers will wake up (suggested by Werner Fink). Also using pthread_cond_broadcast() instead of pthread_cond_signal() in cCondWait, in case there is more than one sleeper. - Making sure that timers and channels are only saved together, in a consistent manner (thanks to Mirko Dölle for reporting a problem with inconsistent channel and timer lists). - Now handling the channel name, short name and provider separately. cChannel therefore has two new functions, ShortName() and Provider(). ShortName() can be used to display a short version of the name (in case such a version is available). The optional boolean parameter of ShortName() can be set to true to make it return the name, if no short name is available. The sequence of 'name' and 'short name' in the channels.conf file has been swapped (see man vdr(5)). - Added the 'portal name' to cChannels (thanks to Marco Schlüßler). - Fixed handling key codes that start with 0x1B in the KBD remote control code. - Now using qsort() to sort cListBase lists. For this, the virtual function cListObject::operator<() has been replaced with cListObject::Compare(). Plugins that implement derived cListObject classes may need to adjust their code. - The "Channels" menu can now be sorted "by number" (default), "by name" and "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).
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/interface.c b/interface.c
index 06ba331..3373743 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.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);
+ DisplayMenu->SetItem(tr("(press 'Up' to go back)"), 6, false, false);
else
- DisplayMenu->SetItem("", 5, false, false);
+ DisplayMenu->SetItem("", 6, false, false);
if (NewKey > kDown)
- DisplayMenu->SetItem(tr("(press 'Down' to end key definition)"), 6, false, false);
+ DisplayMenu->SetItem(tr("(press 'Down' to end key definition)"), 7, false, false);
else
- DisplayMenu->SetItem("", 6, false, false);
+ DisplayMenu->SetItem("", 7, false, false);
if (NewKey > kMenu)
- DisplayMenu->SetItem(tr("(press 'Menu' to skip this key)"), 7, false, false);
+ DisplayMenu->SetItem(tr("(press 'Menu' to skip this key)"), 8, false, false);
else
- DisplayMenu->SetItem("", 7, false, false);
+ 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) {