Version 1.5.9

- Fixed handling locale directories with a large number of entries (thanks to
  Anssi Hannula).
- Updated Turkish language texts (thanks to Oktay Yolgeçen).
- Fixed stripping the context in I18nTranslate() (reported by Christian
  Wieninger).
- Fixed detecting whether a particular locale is actually supported.
- Added a note about LANG having to be set to a valid locale in INSTALL
  (suggested by Matthias Fechner).
- Fixed some compiler warnings with gcc-4.2.0 (thanks to Matthias Schwarzott).
- Fixed setting the locale file name in i18n-to-gettext.pl (thanks to Matthias
  Schwarzott).
- Changed the default for LOCDIR in Makefile and Make.config.template to
  "./locale", so that internationalization works by default when running VDR
  from within its source directory (suggested by Anssi Hannula).
- Added the new i18n macro trVDR(), which can be used by plugins to mark
  texts they want to reuse from VDR's core translations (suggested by Matthias
  Becker).
- VDR now uses the default configuration directory as defined in the CONFDIR
  varable in the Makefile (thanks to Thomas Schmidt).
- The SVDRP command LSTC can now list the channels with group separators if the
  option ':groups' is given (thanks to Andreas Mair).
- Added a missing error report to cCuttingThread::Action() (thanks to Udo
  Richter).
- There can now be more than one OSD at the same time. At any given time,
  however, only one of them can be active (and thus visible). This is to
  allow displaying things like subtitles in an easy way. A cOsd therefore
  now has a "Level", and only the OSD with the smallest level will be
  displayed. The level 0 OSD is special, and there can only be one with
  this level. If there is more than one OSD with a particular level, only
  the one that was created first will be displayed.
  Plugins that provide an OSD need to adjust their cOsdProvider::CreateOsd()
  function to hand through the Level.
- Fixed checking for ttDolbyLast in cDevice::SetCurrentAudioTrack() (thanks
  to Marco Schlüßler).
This commit is contained in:
Klaus Schmidinger
2007-08-26 18:00:00 +02:00
parent e5a2aa41c9
commit 46c882c04d
25 changed files with 282 additions and 156 deletions

45
osd.c
View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osd.c 1.73 2007/08/17 15:23:50 kls Exp $
* $Id: osd.c 1.74 2007/08/26 09:44:50 kls Exp $
*/
#include "osd.h"
@@ -646,18 +646,24 @@ int cOsd::osdLeft = 0;
int cOsd::osdTop = 0;
int cOsd::osdWidth = 0;
int cOsd::osdHeight = 0;
int cOsd::isOpen = 0;
cVector<cOsd *> cOsd::Osds;
cOsd::cOsd(int Left, int Top)
cOsd::cOsd(int Left, int Top, uint Level)
{
if (isOpen)
esyslog("ERROR: OSD opened without closing previous OSD!");
savedRegion = NULL;
numBitmaps = 0;
left = Left;
top = Top;
width = height = 0;
isOpen++;
level = Level;
active = false;
for (int i = 0; i < Osds.Size(); i++) {
if (Osds[i]->level > level) {
Osds.Insert(this, i);
return;
}
}
Osds.Append(this);
}
cOsd::~cOsd()
@@ -665,7 +671,14 @@ cOsd::~cOsd()
for (int i = 0; i < numBitmaps; i++)
delete bitmaps[i];
delete savedRegion;
isOpen--;
for (int i = 0; i < Osds.Size(); i++) {
if (Osds[i] == this) {
Osds.Remove(i);
if (Osds.Size())
Osds[0]->SetActive(true);
break;
}
}
}
void cOsd::SetOsdPosition(int Left, int Top, int Width, int Height)
@@ -803,15 +816,23 @@ cOsdProvider::~cOsdProvider()
osdProvider = NULL;
}
cOsd *cOsdProvider::NewOsd(int Left, int Top)
cOsd *cOsdProvider::NewOsd(int Left, int Top, uint Level)
{
if (cOsd::IsOpen())
if (Level == 0 && cOsd::IsOpen())
esyslog("ERROR: attempt to open OSD while it is already open - using dummy OSD!");
else if (osdProvider)
return osdProvider->CreateOsd(Left, Top);
else if (osdProvider) {
cOsd *ActiveOsd = cOsd::Osds.Size() ? cOsd::Osds[0] : NULL;
cOsd *Osd = osdProvider->CreateOsd(Left, Top, Level);
if (Osd == cOsd::Osds[0]) {
if (ActiveOsd)
ActiveOsd->SetActive(false);
Osd->SetActive(true);
}
return Osd;
}
else
esyslog("ERROR: no OSD provider available - using dummy OSD!");
return new cOsd(Left, Top); // create a dummy cOsd, so that access won't result in a segfault
return new cOsd(Left, Top, 999); // create a dummy cOsd, so that access won't result in a segfault
}
void cOsdProvider::Shutdown(void)