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

Implemented setup option "OSD/Channel info time"

This commit is contained in:
Klaus Schmidinger 2005-02-05 11:40:04 +01:00
parent 0f8bdb31b6
commit d067302bb6
7 changed files with 38 additions and 6 deletions

View File

@ -808,6 +808,7 @@ Andreas Mair <Andreas.Mair@linogate.com>
Olivier Jacques <jacquesolivier@hotmail.com>)
for translating OSD texts to the French language
for implementing the setup option "OSD/Channel info time"
Kai Moeller <moeller.ki@gmx.de>
for reporting a double call to MainMenuAction() of a plugin if invoked via a hotkey

View File

@ -3359,3 +3359,6 @@ Video Disk Recorder Revision History
for reporting these).
- Completed the Danish OSD texts (thanks to Mogens Elneff).
- Completed the French OSD texts (thanks to Olivier Jacques).
- The new setup option "OSD/Channel info time" can be used to define the time after
which the channel display is removed if no key has been pressed (thanks to
Olivier Jacques).

3
MANUAL
View File

@ -482,6 +482,9 @@ Version 1.2
The position of the channel info window in the OSD
(either 'bottom' or 'top').
Channel info time = 5 The time (in seconds) after which the channel info display
is removed if no key has been pressed.
Info on channel switch = yes
Turns the display of the current/next information on
or off when switching the channel. The information is

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.c 1.131 2005/01/09 12:14:58 kls Exp $
* $Id: config.c 1.132 2005/02/05 10:43:04 kls Exp $
*/
#include "config.h"
@ -283,6 +283,7 @@ cSetup::cSetup(void)
UpdateChannels = 4;
UseDolbyDigital = 1;
ChannelInfoPos = 0;
ChannelInfoTime = 5;
OSDLeft = 54;
OSDTop = 45;
OSDWidth = 624;
@ -438,6 +439,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value);
else if (!strcasecmp(Name, "UseDolbyDigital")) UseDolbyDigital = atoi(Value);
else if (!strcasecmp(Name, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
else if (!strcasecmp(Name, "ChannelInfoTime")) ChannelInfoTime = atoi(Value);
else if (!strcasecmp(Name, "OSDLeft")) OSDLeft = atoi(Value);
else if (!strcasecmp(Name, "OSDTop")) OSDTop = atoi(Value);
else if (!strcasecmp(Name, "OSDWidth")) { OSDWidth = atoi(Value); if (OSDWidth < 100) OSDWidth *= 12; OSDWidth &= ~0x07; } // OSD width must be a multiple of 8
@ -500,6 +502,7 @@ bool cSetup::Save(void)
Store("UpdateChannels", UpdateChannels);
Store("UseDolbyDigital", UseDolbyDigital);
Store("ChannelInfoPos", ChannelInfoPos);
Store("ChannelInfoTime", ChannelInfoTime);
Store("OSDLeft", OSDLeft);
Store("OSDTop", OSDTop);
Store("OSDWidth", OSDWidth);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.211 2005/01/23 19:24:20 kls Exp $
* $Id: config.h 1.212 2005/02/05 10:43:22 kls Exp $
*/
#ifndef __CONFIG_H
@ -241,6 +241,7 @@ public:
int UpdateChannels;
int UseDolbyDigital;
int ChannelInfoPos;
int ChannelInfoTime;
int OSDLeft, OSDTop, OSDWidth, OSDHeight;
int OSDMessageTime;
int UseSmallFont;

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.174 2005/02/05 10:36:38 kls Exp $
* $Id: i18n.c 1.175 2005/02/05 10:46:30 kls Exp $
*
* Translations provided by:
*
@ -2821,6 +2821,27 @@ const tI18nPhrase Phrases[] = {
"Kanaliinfo asukoht",
"Placering af kanalinfo",
},
{ "Setup.OSD$Channel info time (s)",
"Anzeigedauer für Kanal-Info (s)",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"Durée affichage infos chaînes (s)",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "Setup.OSD$Info on channel switch",
"Info beim Kanalwechsel",
"Pokazi naziv kanala",

6
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.338 2005/01/23 19:24:04 kls Exp $
* $Id: menu.c 1.339 2005/02/05 11:35:23 kls Exp $
*/
#include "menu.h"
@ -1769,6 +1769,7 @@ void cMenuSetupOSD::Set(void)
Add(new cMenuEditIntItem( tr("Setup.OSD$Message time (s)"), &data.OSDMessageTime, 1, 60));
Add(new cMenuEditStraItem(tr("Setup.OSD$Use small font"), &data.UseSmallFont, 3, useSmallFontTexts));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Channel info position"), &data.ChannelInfoPos, tr("bottom"), tr("top")));
Add(new cMenuEditIntItem( tr("Setup.OSD$Channel info time (s)"), &data.ChannelInfoTime, 1, 60));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Info on channel switch"), &data.ShowInfoOnChSwitch));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Scroll pages"), &data.MenuScrollPage));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Sort timers"), &data.SortTimers));
@ -2576,7 +2577,6 @@ static void SetTrackDescriptions(void)
// --- cDisplayChannel -------------------------------------------------------
#define DIRECTCHANNELTIMEOUT 1000 //ms
#define INFOTIMEOUT 5000 //ms
cDisplayChannel::cDisplayChannel(int Number, bool Switched)
:cOsdObject(true)
@ -2764,7 +2764,7 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
return osEnd;
}
};
if (lastTime.Elapsed() < INFOTIMEOUT) {
if (lastTime.Elapsed() < (uint64)(Setup.ChannelInfoTime * 1000)) {
if (!number && group < 0 && channel && channel->Number() != cDevice::CurrentChannel())
Refresh(); // makes sure a channel switch through the SVDRP CHAN command is displayed
DisplayInfo();