From b1e4da3be6552f58f3890bf2ad48879823d2e130 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 17 Jun 2007 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.5.4=20-=20Increased=20APIVERSION=20(forgot?= =?UTF-8?q?=20to=20do=20that=20in=201.5.2=20and=201.5.3).=20-=20Fixed=20a?= =?UTF-8?q?=20crash=20in=20i18n=20character=20set=20conversion=20(thanks?= =?UTF-8?q?=20to=20Alexander=20Riedel,=20=20=20Jose=20Alberto=20Reguero=20?= =?UTF-8?q?and=20Christian=20Wieninger=20for=20patches=20that=20cured=20pa?= =?UTF-8?q?rt=20of=20=20=20the=20problem).=20-=20Adjusted=20the=20'skincur?= =?UTF-8?q?ses'=20plugin=20to=20UTF-8=20handling.=20-=20Using=20nl=5Flangi?= =?UTF-8?q?nfo(CODESET)=20to=20determine=20the=20local=20codeset=20to=20us?= =?UTF-8?q?e=20(thanks=20to=20=20=20Thomas=20G=C3=BCnther).=20The=20codese?= =?UTF-8?q?t=20names=20in=20'libsi/si.c'=20have=20been=20changed=20to=20th?= =?UTF-8?q?e=20=20=20canonical=20spelling=20with=20'-'=20(thanks=20to=20Lu?= =?UTF-8?q?dwig=20Nussel=20for=20pointing=20this=20out).=20-=20Modified=20?= =?UTF-8?q?handling=20invalid=20characters=20in=20VFAT=20mode.=20-=20Repla?= =?UTF-8?q?ced=20strn0cpy()=20with=20Utf8Strn0Cpy()=20where=20necessary.?= =?UTF-8?q?=20-=20Now=20using=20'fontconfig'=20to=20determine=20which=20fo?= =?UTF-8?q?nts=20to=20use=20(thanks=20to=20Anssi=20Hannula=20=20=20for=20c?= =?UTF-8?q?ode=20and=20hints=20on=20how=20to=20do=20this).=20-=20If=20no?= =?UTF-8?q?=20fonts=20are=20installed,=20VDR=20now=20uses=20a=20dummy=20fo?= =?UTF-8?q?nt=20that=20doesn't=20actually=20draw=20=20=20any=20text,=20and?= =?UTF-8?q?=20logs=20an=20error=20message.=20-=20The=20new=20function=20cF?= =?UTF-8?q?ont::CreateFont()=20can=20be=20used=20by=20plugins=20to=20creat?= =?UTF-8?q?e=20and=20use=20=20=20fonts=20of=20their=20own,=20independent?= =?UTF-8?q?=20of=20VDR's=20standard=20fonts.=20-=20Updated=20the=20Finnish?= =?UTF-8?q?=20OSD=20texts=20(thanks=20to=20Rolf=20Ahrenberg).=20-=20Change?= =?UTF-8?q?d=20the=20parameter=20"OSD=20font"=20to=20"Default=20font"=20in?= =?UTF-8?q?=20"Setup/OSD"=20(suggested=20=20=20by=20Rolf=20Ahrenberg).=20-?= =?UTF-8?q?=20Fixed=20handling=20detached=20processes=20in=20SystemExec()?= =?UTF-8?q?=20(thanks=20to=20Udo=20Richter).=20-=20The=20info.vdr=20file?= =?UTF-8?q?=20now=20also=20stores=20the=20name=20of=20the=20channel,=20and?= =?UTF-8?q?=20the=20new=20function=20=20=20cRecordingInfo::ChannelName()?= =?UTF-8?q?=20returns=20this=20information=20if=20available=20(based=20on?= =?UTF-8?q?=20=20=20a=20patch=20from=20Alexander=20Hans).=20-=20The=20new?= =?UTF-8?q?=20function=20cOsd::SetOsdPosition()=20can=20be=20used=20to=20d?= =?UTF-8?q?ynamically=20change=20the=20=20=20position=20and=20size=20of=20?= =?UTF-8?q?the=20OSD=20(based=20on=20a=20request=20from=20Christoph=20Haub?= =?UTF-8?q?rich).=20=20=20Plugins=20that=20implement=20skins=20should=20no?= =?UTF-8?q?=20longer=20use=20Setup.OSDWidth=20etc.=20directly,=20=20=20but?= =?UTF-8?q?=20should=20rather=20use=20cOsd::OsdWidth()=20etc.=20instead.?= =?UTF-8?q?=20=20=20Currently=20a=20change=20to=20the=20OSD=20position=20w?= =?UTF-8?q?ill=20only=20apply=20to=20newly=20opened=20OSDs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skinclassic.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'skinclassic.c') diff --git a/skinclassic.c b/skinclassic.c index b3395a6..14be9d6 100644 --- a/skinclassic.c +++ b/skinclassic.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinclassic.c 1.16 2007/06/10 12:42:02 kls Exp $ + * $Id: skinclassic.c 1.17 2007/06/17 13:53:09 kls Exp $ */ #include "skinclassic.h" @@ -92,13 +92,13 @@ cSkinClassicDisplayChannel::cSkinClassicDisplayChannel(bool WithInfo) const cFont *font = cFont::GetFont(fontOsd); lineHeight = font->Height(); message = false; - osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop + (Setup.ChannelInfoPos ? 0 : Setup.OSDHeight - Lines * lineHeight)); + osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop() + (Setup.ChannelInfoPos ? 0 : cOsd::OsdHeight() - Lines * lineHeight)); timeWidth = font->Width("00:00") + 4; - tArea Areas[] = { { 0, 0, Setup.OSDWidth - 1, Lines * lineHeight - 1, 8 } }; + tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, Lines * lineHeight - 1, 8 } }; if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk) osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); else { - tArea Areas[] = { { 0, 0, Setup.OSDWidth - 1, Lines * lineHeight - 1, 4 } }; + tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, Lines * lineHeight - 1, 4 } }; osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); } osd->DrawRectangle(0, 0, osd->Width() - 1, osd->Height() - 1, Theme.Color(clrBackground)); @@ -187,14 +187,14 @@ cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(void) const cFont *font = cFont::GetFont(fontOsd); lineHeight = font->Height(); x0 = 0; - x1 = Setup.OSDWidth; + x1 = cOsd::OsdWidth(); y0 = 0; y1 = lineHeight; y2 = y1 + lineHeight; - y5 = Setup.OSDHeight; + y5 = cOsd::OsdHeight(); y4 = y5 - lineHeight; y3 = y4 - lineHeight; - osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop); + osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop()); tArea Areas[] = { { x0, y0, x1 - 1, y5 - 1, 8 } }; if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk) osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); @@ -426,12 +426,12 @@ cSkinClassicDisplayReplay::cSkinClassicDisplayReplay(bool ModeOnly) int lineHeight = font->Height(); lastCurrentWidth = 0; x0 = 0; - x1 = Setup.OSDWidth; + x1 = cOsd::OsdWidth(); y0 = 0; y1 = lineHeight; y2 = 2 * lineHeight; y3 = 3 * lineHeight; - osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop + Setup.OSDHeight - y3); + osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop() + cOsd::OsdHeight() - y3); tArea Areas[] = { { x0, y0, x1 - 1, y3 - 1, 8 } }; if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk) osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); @@ -526,12 +526,12 @@ cSkinClassicDisplayVolume::cSkinClassicDisplayVolume(void) { const cFont *font = cFont::GetFont(fontOsd); int lineHeight = font->Height(); - osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop + Setup.OSDHeight - lineHeight); - tArea Areas[] = { { 0, 0, Setup.OSDWidth - 1, lineHeight - 1, 8 } }; + osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop() + cOsd::OsdHeight() - lineHeight); + tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 8 } }; if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk) osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); else { - tArea Areas[] = { { 0, 0, Setup.OSDWidth - 1, lineHeight - 1, 4 } }; + tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 4 } }; osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); } } @@ -591,7 +591,7 @@ cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(const char *Title, int NumT ItemsWidth = max(ItemsWidth, font->Width(Tracks[i])); ItemsWidth += 10; x0 = 0; - x1 = Setup.OSDWidth; + x1 = cOsd::OsdWidth(); int d = x1 - x0; if (d > ItemsWidth) { d = (d - ItemsWidth) & ~0x07; // must be multiple of 8 @@ -600,7 +600,7 @@ cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(const char *Title, int NumT y0 = 0; y1 = lineHeight; y2 = y1 + NumTracks * lineHeight; - osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop + Setup.OSDHeight - y2); + osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop() + cOsd::OsdHeight() - y2); tArea Areas[] = { { x0, y0, x1 - 1, y2 - 1, 8 } }; if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk) osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); @@ -663,12 +663,12 @@ cSkinClassicDisplayMessage::cSkinClassicDisplayMessage(void) { const cFont *font = cFont::GetFont(fontOsd); int lineHeight = font->Height(); - osd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop + Setup.OSDHeight - lineHeight); - tArea Areas[] = { { 0, 0, Setup.OSDWidth - 1, lineHeight - 1, 8 } }; + osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop() + cOsd::OsdHeight() - lineHeight); + tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 8 } }; if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk) osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); else { - tArea Areas[] = { { 0, 0, Setup.OSDWidth - 1, lineHeight - 1, 2 } }; + tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 2 } }; osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea)); } } @@ -681,7 +681,7 @@ cSkinClassicDisplayMessage::~cSkinClassicDisplayMessage() void cSkinClassicDisplayMessage::SetMessage(eMessageType Type, const char *Text) { const cFont *font = cFont::GetFont(fontOsd); - osd->DrawText(0, 0, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, Setup.OSDWidth, 0, taCenter); + osd->DrawText(0, 0, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, cOsd::OsdWidth(), 0, taCenter); } void cSkinClassicDisplayMessage::Flush(void) -- cgit v1.2.3