diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-08-26 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-08-26 18:00:00 +0200 |
commit | 46c882c04d5200cc97262b15db2e4841b305664d (patch) | |
tree | 5883630e3561fc1c16beb50c2d680fc73b8b457f | |
parent | e5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70 (diff) | |
download | vdr-patch-lnbsharing-46c882c04d5200cc97262b15db2e4841b305664d.tar.gz vdr-patch-lnbsharing-46c882c04d5200cc97262b15db2e4841b305664d.tar.bz2 |
Version 1.5.9vdr-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).
-rw-r--r-- | CONTRIBUTORS | 20 | ||||
-rw-r--r-- | HISTORY | 37 | ||||
-rw-r--r-- | INSTALL | 3 | ||||
-rw-r--r-- | Make.config.template | 6 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | PLUGINS.html | 37 | ||||
-rw-r--r-- | config.h | 10 | ||||
-rw-r--r-- | cutter.c | 6 | ||||
-rw-r--r-- | device.c | 4 | ||||
-rw-r--r-- | dvbosd.c | 60 | ||||
-rw-r--r-- | dvbosd.h | 4 | ||||
-rwxr-xr-x | i18n-to-gettext.pl | 4 | ||||
-rw-r--r-- | i18n.c | 45 | ||||
-rw-r--r-- | i18n.h | 3 | ||||
-rw-r--r-- | keys.h | 4 | ||||
-rw-r--r-- | menu.c | 4 | ||||
-rw-r--r-- | osd.c | 45 | ||||
-rw-r--r-- | osd.h | 24 | ||||
-rw-r--r-- | po/tr_TR.po | 78 | ||||
-rw-r--r-- | rcu.c | 4 | ||||
-rw-r--r-- | rcu.h | 4 | ||||
-rw-r--r-- | svdrp.c | 15 | ||||
-rw-r--r-- | thread.c | 4 | ||||
-rw-r--r-- | tools.h | 8 | ||||
-rw-r--r-- | vdr.c | 4 |
25 files changed, 282 insertions, 156 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 68abd99..bddbeed 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -541,6 +541,7 @@ Tomas Prybil <tomas.prybil@copper.se> Matthias Fechner <matthiasfechner@web.de> for pointing out a bug in parsing 'E' records in epg2html.pl + for suggesting to add a note about LANG having to be set to a valid locale in INSTALL Paul Lacatus <paul@campina.iiruc.ro> for translating OSD texts to the Romanian language @@ -943,6 +944,8 @@ Andreas Mair <andreas@vdr-developer.org> for enabling fonts to be created with a width that overwrites the default width for suggesting to make cBitmap::SetXpm() checks whether the given Xpm pointer is not NULL + for making the SVDRP command LSTC list the channels with group separators if the + option ':groups' is given Olivier Jacques <jacquesolivier@hotmail.com>) for translating OSD texts to the French language @@ -1056,9 +1059,11 @@ Jon Burgess <mplayer@jburgess.uklinux.net> for reporting a bug in handling the '.update' file in case the video directory is not at the default location -Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de> +Thomas Schmidt <tschmidt@debian.org> for reporting a crash when canceling a newly created timer for making 'diseqc.conf' a required file only if Setup.DiSEqC is activated + for making VDR use the default configuration directory as defined in the CONFDIR + varable in the Makefile Michael Walle <michael.walle@web.de> for reporting a bug in channel switching after Left/Right has been pressed @@ -1413,6 +1418,7 @@ Marco Schlüßler <marco@lordzodiac.de> for reporting a missing 'P' in vdr.c's SHUTDOWNCANCELROMPT macro for fixing a problem with characters >0x7F in the modified version of skipspace() for reporting a faulty comment in Make.config.template + for fixing checking for ttDolbyLast in cDevice::SetCurrentAudioTrack() Jürgen Schmitz <j.schmitz@web.de> for reporting a bug in displaying the current channel when switching via the SVDRP @@ -1515,6 +1521,7 @@ Udo Richter <udo_richter@gmx.de> for fixing handling detached processes in SystemExec() for fixing handling single byte characters >0x7F in Utf8ToArray() for fixing clearing color buttons in the 'curses' skin + for adding a missing error report to cCuttingThread::Action() Sven Kreiensen <svenk@kammer.uni-hannover.de> for his help in keeping 'channels.conf.terr' up to date @@ -1870,6 +1877,7 @@ Christian Wieninger <cwieninger@gmx.de> for reporting a problem with a format string in recording.c on 64bit systems for reporting a problem with the device selection in case of timer conflicts for a patch that fixed part of a crash in i18n character set conversion + for reporting a bug in stripping the context in I18nTranslate() Thiemo Gehrke <tgehrke@reel-multimedia.com> for suggesting to add a setup option to turn off the automatic timeout of the @@ -2062,6 +2070,10 @@ Anssi Hannula <anssi.hannula@gmail.com> for suggesting to make the "Setup/OSD/Language" menu only show those languages that actually have a locale for suggesting to use setenv() instead of setlocale() to set the language for gettext() + for fixing handling locale directories with a large number of entries + for suggesting to change 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 Antti Hartikainen <ami+vdr@ah.fi> for updating 'S13E' in 'sources.conf' @@ -2098,6 +2110,8 @@ Matthias Schwarzott <zzam@gentoo.org> for suggesting to move the "all" target in plugin Makefiles before the "Implicit rules", so that a plain "make" will compile everything for adding DESTDIR and PREFIX handling to the Makefile + for fixing some compiler warnings with gcc-4.2.0 + for fixing setting the locale file name in i18n-to-gettext.pl Martin Ostermann <martin@familie-ostermann.de> for fixing processing the PDCDescriptor in 'libsi' on big endian systems @@ -2151,3 +2165,7 @@ Tobias Bratfisch <tobias@reel-multimedia.com> Bruno Roussel <bruno.roussel@free.fr> for translating OSD texts to the French language + +Matthias Becker <becker.matthias@gmail.com> + for suggesting to add a new i18n macro that can be used by plugins to mark + texts they want to reuse from VDR's core translations @@ -5379,3 +5379,40 @@ Video Disk Recorder Revision History vdr.mo. Text files for plugins are now named "vdr-name.mo", when "name" is the name of the plugin. The "newplugin" script has been changed accordingly, and plugin authors should change their Makefiles, too. + +2007-08-26: 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). @@ -113,6 +113,9 @@ in the log file, it is sufficient to just set which only influences the way strings are sorted and leaves error messages in English. +Note that for VDR's internationalized texts to work, the LANG environment +variable must be set to a valid locale! + Automatic restart in case of hangups: ------------------------------------- diff --git a/Make.config.template b/Make.config.template index 86564a2..a4b4812 100644 --- a/Make.config.template +++ b/Make.config.template @@ -6,7 +6,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Make.config.template 1.13 2007/08/12 20:43:46 kls Exp $ +# $Id: Make.config.template 1.15 2007/08/25 08:53:45 kls Exp $ ### The C compiler and options: @@ -26,12 +26,12 @@ endif #DVBDIR = /usr/src/v4l-dvb/linux MANDIR = /usr/local/man BINDIR = /usr/local/bin -# set to ./locale to run VDR from within its source directory: -LOCDIR = /usr/share/vdr/locale +LOCDIR = ./locale PLUGINDIR= ./PLUGINS PLUGINLIBDIR= $(PLUGINDIR)/lib VIDEODIR = /video +CONFDIR = $(VIDEODIR) ### The remote control: @@ -4,7 +4,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Makefile 1.104 2007/08/15 13:47:16 kls Exp $ +# $Id: Makefile 1.106 2007/08/25 08:52:17 kls Exp $ .DELETE_ON_ERROR: @@ -19,7 +19,7 @@ DESTDIR ?= PREFIX ?= /usr/local MANDIR = $(PREFIX)/share/man BINDIR = $(PREFIX)/bin -LOCDIR = $(PREFIX)/share/vdr/locale +LOCDIR = ./locale LIBS = -ljpeg -lpthread -ldl -lcap -lfreetype -lfontconfig INCLUDES = -I/usr/include/freetype2 @@ -61,6 +61,7 @@ DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\" -DRCU_DEVICE=\"$(RCU_DEVICE)\" DEFINES += -D_GNU_SOURCE DEFINES += -DVIDEODIR=\"$(VIDEODIR)\" +DEFINES += -DCONFDIR=\"$(CONFDIR)\" DEFINES += -DPLUGINDIR=\"$(PLUGINLIBDIR)\" DEFINES += -DLOCDIR=\"$(LOCDIR)\" diff --git a/PLUGINS.html b/PLUGINS.html index d18bc42..0b0b495 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -6,7 +6,7 @@ <center><h1>The VDR Plugin System</h1></center> -<center><b>Version 1.5.3</b></center> +<center><b>Version 1.5.8</b></center> <p> <center> Copyright © 2006 Klaus Schmidinger<br> @@ -14,18 +14,18 @@ Copyright © 2006 Klaus Schmidinger<br> <a href="http://www.cadsoft.de/vdr">www.cadsoft.de/vdr</a> </center> <p> -<!--X1.5.0--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%> -Important modifications introduced in version 1.5.0 are marked like this. -<!--X1.5.0--></td></tr></table> -<!--X1.5.1--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%> +<!--X1.5.1--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%> Important modifications introduced in version 1.5.1 are marked like this. <!--X1.5.1--></td></tr></table> -<!--X1.5.3--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%> +<!--X1.5.3--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%> Important modifications introduced in version 1.5.3 are marked like this. <!--X1.5.3--></td></tr></table> -<!--X1.5.7--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%> +<!--X1.5.7--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%> Important modifications introduced in version 1.5.7 are marked like this. <!--X1.5.7--></td></tr></table> +<!--X1.5.8--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%> +Important modifications introduced in version 1.5.8 are marked like this. +<!--X1.5.8--></td></tr></table> <p> VDR provides an easy to use plugin interface that allows additional functionality to be added to the program by implementing a dynamically loadable library file. @@ -64,7 +64,7 @@ structures and allows it to hook itself into specific areas to perform special a <li><a href="#Housekeeping">Housekeeping</a> <li><a href="#Main thread hook">Main thread hook</a> <li><a href="#Activity">Activity</a> -<!--X1.5.1--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%> +<!--X1.5.1--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%> <li><a href="#Wakeup">Wakeup</a> <!--X1.5.1--></td></tr></table> <li><a href="#Setup parameters">Setup parameters</a> @@ -88,9 +88,7 @@ structures and allows it to hook itself into specific areas to perform special a <li><a href="#Devices">Devices</a> <li><a href="#Audio">Audio</a> <li><a href="#Remote Control">Remote Control</a> -<!--X1.5.0--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%> <li><a href="#Conditional Access">Conditional Access</a> -<!--X1.5.0--></td></tr></table> </ul> </ul> @@ -687,7 +685,7 @@ be queried, and further prompts may show up. If all prompts have been confirmed, the shutdown will take place. As soon as one prompt is not confirmed, no further plugins will be queried and no shutdown will be done. -<!--X1.5.1--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%> +<!--X1.5.1--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%> <a name="Wakeup"><hr><h2>Wakeup</h2> <center><i><b>Wake me up before you go-go</b></i></center><p> @@ -912,7 +910,7 @@ const char *MyConfigDir = cPlugin::ConfigDirectory(); <center><i><b>Welcome to Babylon!</b></i></center><p> -<!--X1.5.7--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%> +<!--X1.5.7--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%> If a plugin displays texts to the user, it should prepare for internationalization of these texts. All that is necessary for this is to mark every text that is presented to the user as translatable, as in @@ -923,9 +921,12 @@ const char *s = tr("Hello world!"); The text given here must be the English version, and the returned pointer is either a translated version (if available) or the original string. -Texts are first searched for in the domain registered for this plugin (if any) -and then in the global VDR texts. So a plugin can make use of texts defined by the -core VDR code. +<!--X1.5.8--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%> +Texts are searched for in the domain registered for this plugin. +If a plugin wants to make use of texts defined by the core VDR code, it can use +the special <tt>trVDR()</tt> macro to mark these texts without having them +appear in its own translation file. +<!--X1.5.8--></td></tr></table> <p> Sometimes texts are stored in an array, in which case they need to be marked differently, using the trNOOP() macro. The actual translation is then done @@ -943,7 +944,7 @@ for (int i = 0; i < 3; i++) </pre></td></tr></table><p> <p> -<!--X1.5.3--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%> +<!--X1.5.3--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%> The system VDR is running on may use a character encoding where a single character (or <i>symbol</i>) consists of more than one byte (UTF-8, as opposed to, for instance, ISO8859-1, where every character is represented by a single byte in memory). @@ -1605,7 +1606,7 @@ with the full required resolution. Only if this fails shall it use alternate areas. Drawing areas are always rectangular and may not overlap (but do not need to be adjacent). <p> -<!--X1.5.3--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%> +<!--X1.5.3--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%> Special consideration may have to be given to color usage if the OSD provides 8bpp (256 colors). In that case, fonts may be drawn using <i>anti-aliasing</i>, which requires several blended color values between the foreground and background @@ -2088,7 +2089,6 @@ Put(uint64 Code, bool Repeat = false, bool Release = false); The other parameters have the same meaning as in the first version of this function. -<!--X1.5.0--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%> <a name="Conditional Access"><hr><h2>Conditional Access</h2> <center><i><b>Members only!</b></i></center><p> @@ -2123,7 +2123,6 @@ virtual bool Assign(cDevice *Device, bool Query = false); </pre></td></tr></table><p> See the description of this function in <tt>ci.h</tt> for details. -<!--X1.5.0--></td></tr></table> </body> </html> @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.297 2007/08/12 20:38:10 kls Exp $ + * $Id: config.h 1.298 2007/08/19 16:02:50 kls Exp $ */ #ifndef __CONFIG_H @@ -22,13 +22,13 @@ // VDR's own version number: -#define VDRVERSION "1.5.8" -#define VDRVERSNUM 10508 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.5.9" +#define VDRVERSNUM 10509 // Version * 10000 + Major * 100 + Minor // The plugin API's version number: -#define APIVERSION "1.5.8" -#define APIVERSNUM 10508 // Version * 10000 + Major * 100 + Minor +#define APIVERSION "1.5.9" +#define APIVERSNUM 10509 // Version * 10000 + Major * 100 + Minor // When loading plugins, VDR searches them by their APIVERSION, which // may be smaller than VDRVERSION in case there have been no changes to @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: cutter.c 1.16 2006/07/30 10:22:08 kls Exp $ + * $Id: cutter.c 1.17 2007/08/25 10:33:18 kls Exp $ */ #include "cutter.h" @@ -110,8 +110,10 @@ void cCuttingThread::Action(void) break; } } - else + else { + error = "index"; break; + } // Write one frame: @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.141 2007/06/16 09:31:32 kls Exp $ + * $Id: device.c 1.142 2007/08/26 11:11:42 kls Exp $ */ #include "device.h" @@ -892,7 +892,7 @@ int cDevice::NumAudioTracks(void) const bool cDevice::SetCurrentAudioTrack(eTrackType Type) { - if (ttNone < Type && Type < ttDolbyLast) { + if (ttNone < Type && Type <= ttDolbyLast) { cMutexLock MutexLock(&mutexCurrentAudioTrack); if (IS_DOLBY_TRACK(Type)) SetDigitalAudioDevice(true); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbosd.c 1.30 2006/01/28 14:24:04 kls Exp $ + * $Id: dvbosd.c 1.31 2007/08/26 09:39:20 kls Exp $ */ #include "dvbosd.h" @@ -26,15 +26,17 @@ private: int osdMem; bool shown; void Cmd(OSD_Command cmd, int color = 0, int x0 = 0, int y0 = 0, int x1 = 0, int y1 = 0, const void *data = NULL); +protected: + virtual void SetActive(bool On); public: - cDvbOsd(int Left, int Top, int OsdDev); + cDvbOsd(int Left, int Top, int OsdDev, uint Level); virtual ~cDvbOsd(); virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas); virtual void Flush(void); }; -cDvbOsd::cDvbOsd(int Left, int Top, int OsdDev) -:cOsd(Left, Top) +cDvbOsd::cDvbOsd(int Left, int Top, int OsdDev, uint Level) +:cOsd(Left, Top, Level) { osdDev = OsdDev; shown = false; @@ -49,23 +51,36 @@ cDvbOsd::cDvbOsd(int Left, int Top, int OsdDev) if (ioctl(osdDev, OSD_GET_CAPABILITY, &cap) == 0) osdMem = cap.val; #endif - // must clear all windows here to avoid flashing effects - doesn't work if done - // in Flush() only for the windows that are actually used... - for (int i = 0; i < MAXNUMWINDOWS; i++) { - Cmd(OSD_SetWindow, 0, i + 1); - Cmd(OSD_Clear); - } } } cDvbOsd::~cDvbOsd() { - if (shown) { - cBitmap *Bitmap; - for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) { - Cmd(OSD_SetWindow, 0, i + 1); - Cmd(OSD_Close); - } + SetActive(false); +} + +void cDvbOsd::SetActive(bool On) +{ + if (On != Active()) { + cOsd::SetActive(On); + if (On) { + // must clear all windows here to avoid flashing effects - doesn't work if done + // in Flush() only for the windows that are actually used... + for (int i = 0; i < MAXNUMWINDOWS; i++) { + Cmd(OSD_SetWindow, 0, i + 1); + Cmd(OSD_Clear); + } + if (GetBitmap(0)) // only flush here if there are already bitmaps + Flush(); + } + else if (shown) { + cBitmap *Bitmap; + for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) { + Cmd(OSD_SetWindow, 0, i + 1); + Cmd(OSD_Close); + } + shown = false; + } } } @@ -108,13 +123,20 @@ void cDvbOsd::Cmd(OSD_Command cmd, int color, int x0, int y0, int x1, int y1, co void cDvbOsd::Flush(void) { + if (!Active()) + return; cBitmap *Bitmap; for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) { Cmd(OSD_SetWindow, 0, i + 1); if (!shown) Cmd(OSD_Open, Bitmap->Bpp(), Left() + Bitmap->X0(), Top() + Bitmap->Y0(), Left() + Bitmap->X0() + Bitmap->Width() - 1, Top() + Bitmap->Y0() + Bitmap->Height() - 1, (void *)1); // initially hidden! int x1 = 0, y1 = 0, x2 = 0, y2 = 0; - if (Bitmap->Dirty(x1, y1, x2, y2)) { + if (!shown || Bitmap->Dirty(x1, y1, x2, y2)) { + if (!shown) { + x1 = y1 = 0; + x2 = Bitmap->Width() - 1; + y2 = Bitmap->Height() - 1; + } //TODO Workaround: apparently the bitmap sent to the driver always has to be a multiple //TODO of 8 bits wide, and (dx * dy) also has to be a multiple of 8. //TODO Fix driver (should be able to handle any size bitmaps!) @@ -173,7 +195,7 @@ cDvbOsdProvider::cDvbOsdProvider(int OsdDev) osdDev = OsdDev; } -cOsd *cDvbOsdProvider::CreateOsd(int Left, int Top) +cOsd *cDvbOsdProvider::CreateOsd(int Left, int Top, uint Level) { - return new cDvbOsd(Left, Top, osdDev); + return new cDvbOsd(Left, Top, osdDev, Level); } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbosd.h 1.18 2004/06/12 13:09:52 kls Exp $ + * $Id: dvbosd.h 1.19 2007/08/25 13:49:34 kls Exp $ */ #ifndef __DVBOSD_H @@ -17,7 +17,7 @@ private: int osdDev; public: cDvbOsdProvider(int OsdDev); - virtual cOsd *CreateOsd(int Left, int Top); + virtual cOsd *CreateOsd(int Left, int Top, uint Level); }; #endif //__DVBOSD_H diff --git a/i18n-to-gettext.pl b/i18n-to-gettext.pl index 130122d..e46c644 100755 --- a/i18n-to-gettext.pl +++ b/i18n-to-gettext.pl @@ -10,7 +10,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: i18n-to-gettext.pl 1.3 2007/08/15 12:52:00 kls Exp $ +# $Id: i18n-to-gettext.pl 1.4 2007/08/24 13:19:34 kls Exp $ # How to convert an actual plugin: # @@ -323,7 +323,7 @@ i18n: $(I18Nmo) @mkdir -p $(LOCALEDIR) for i in $(I18Ndirs); do\ mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\ - cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(PLUGIN).mo;\ + cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/vdr-$(PLUGIN).mo;\ done }; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: i18n.c 1.312 2007/08/19 14:10:46 kls Exp $ + * $Id: i18n.c 1.317 2007/08/24 14:03:47 kls Exp $ * * */ @@ -62,7 +62,7 @@ const char *LanguageCodeList[] = { NULL }; -static char *I18nLocaleDir = LOCDIR; +static const char *I18nLocaleDir = LOCDIR; static cStringList LanguageLocales; static cStringList LanguageNames; @@ -112,21 +112,24 @@ void I18nInitialize(void) for (int i = 0; i < Locales.Size(); i++) { cString FileName = cString::sprintf("%s/%s/LC_MESSAGES/vdr.mo", I18nLocaleDir, Locales[i]); if (access(FileName, F_OK) == 0) { // found a locale with VDR texts - if (i < I18N_MAX_LANGUAGES - 1) { + if (NumLocales < I18N_MAX_LANGUAGES - 1) { SetEnvLanguage(Locales[i]); - NumLocales++; - if (strstr(OldLocale, Locales[i]) == OldLocale) - CurrentLanguage = LanguageLocales.Size(); - LanguageLocales.Append(strdup(Locales[i])); - LanguageNames.Append(strdup(gettext(LanguageName))); - const char *Code = gettext(LanguageCode); - for (const char **lc = LanguageCodeList; *lc; lc++) { - if (ContainsCode(*lc, Code)) { - Code = *lc; - break; + const char *TranslatedLanguageName = gettext(LanguageName); + if (TranslatedLanguageName != LanguageName) { + NumLocales++; + if (strstr(OldLocale, Locales[i]) == OldLocale) + CurrentLanguage = LanguageLocales.Size(); + LanguageLocales.Append(strdup(Locales[i])); + LanguageNames.Append(strdup(TranslatedLanguageName)); + const char *Code = gettext(LanguageCode); + for (const char **lc = LanguageCodeList; *lc; lc++) { + if (ContainsCode(*lc, Code)) { + Code = *lc; + break; + } } - } - LanguageCodes.Append(strdup(Code)); + LanguageCodes.Append(strdup(Code)); + } } else { esyslog("ERROR: too many locales - increase I18N_MAX_LANGUAGES!"); @@ -203,15 +206,11 @@ const char *I18nTranslate(const char *s, const char *Plugin) if (!s) return s; if (CurrentLanguage) { - const char *t = s; - if (Plugin) - t = dgettext(Plugin, s); - if (t == s) - t = gettext(s); - s = t; + const char *t = Plugin ? dgettext(Plugin, s) : gettext(s); + if (t != s) + return t; } - const char *p = strchr(s, '$'); - return p ? p + 1 : s; + return SkipContext(s); } const char *I18nLocale(int Language) @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: i18n.h 1.23 2007/08/19 14:07:17 kls Exp $ + * $Id: i18n.h 1.24 2007/08/24 13:35:18 kls Exp $ */ #ifndef __I18N_H @@ -80,6 +80,7 @@ bool I18nIsPreferredLanguage(int *PreferredLanguages, const char *LanguageCode, #ifdef PLUGIN_NAME_I18N #define tr(s) I18nTranslate(s, "vdr-" PLUGIN_NAME_I18N) +#define trVDR(s) I18nTranslate(s) // to use a text that's in the VDR core's translation file #else #define tr(s) I18nTranslate(s) #endif @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: keys.h 1.12 2007/08/04 14:40:23 kls Exp $ + * $Id: keys.h 1.13 2007/08/24 13:15:48 kls Exp $ */ #ifndef __KEYS_H @@ -82,7 +82,7 @@ enum eKeys { // "Up" and "Down" must be the first two keys! struct tKey { eKeys type; - char *name; + const char *name; }; class cKey : public cListObject { @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.460 2007/08/18 09:03:05 kls Exp $ + * $Id: menu.c 1.461 2007/08/24 13:15:48 kls Exp $ */ #include "menu.h" @@ -1040,7 +1040,7 @@ int cMenuScheduleItem::Compare(const cListObject &ListObject) const return r; } -static char *TimerMatchChars = " tT"; +static const char *TimerMatchChars = " tT"; bool cMenuScheduleItem::Update(bool Force) { @@ -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) @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.h 1.56 2007/07/20 14:50:17 kls Exp $ + * $Id: osd.h 1.57 2007/08/26 09:45:38 kls Exp $ */ #ifndef __OSD_H @@ -15,6 +15,7 @@ #include <stdint.h> #include "config.h" #include "font.h" +#include "tools.h" #define MAXNUMCOLORS 256 @@ -247,13 +248,15 @@ class cOsd { friend class cOsdProvider; private: static int osdLeft, osdTop, osdWidth, osdHeight; - static int isOpen; + static cVector<cOsd *> Osds; cBitmap *savedRegion; cBitmap *bitmaps[MAXOSDAREAS]; int numBitmaps; int left, top, width, height; + uint level; + bool active; protected: - cOsd(int Left, int Top); + cOsd(int Left, int Top, uint Level); ///< Initializes the OSD with the given coordinates. ///< By default it is assumed that the full area will be able to display ///< full 32 bit graphics (ARGB with eight bit for each color and the alpha @@ -269,6 +272,14 @@ protected: ///< and should require only the minimum necessary color depth. This is ///< because a derived cOsd class may or may not be able to handle more ///< than one area. + ///< There can be any number of cOsd objects at the same time, but only + ///< one of them will be active at any given time. The active OSD is the + ///< one with the lowest value of Level. If there are several cOsd objects + ///< with the same Level, the one that was created first will be active. + bool Active(void) { return active; } + virtual void SetActive(bool On) { active = On; } + ///< Sets this OSD to be the active one. + ///< A derived class must call cOsd::SetActive(On). public: virtual ~cOsd(); ///< Shuts down the OSD. @@ -281,7 +292,8 @@ public: ///< This may be useful for plugins that determine the scaling of the ///< video image and need to scale the OSD accordingly to fit on the ///< screen. - static int IsOpen(void) { return isOpen; } + static int IsOpen(void) { return Osds.Size() && Osds[0]->level == 0; } + ///< Returns true if there is currently a level 0 OSD open. int Left(void) { return left; } int Top(void) { return top; } int Width(void) { return width; } @@ -379,14 +391,14 @@ class cOsdProvider { private: static cOsdProvider *osdProvider; protected: - virtual cOsd *CreateOsd(int Left, int Top) = 0; + virtual cOsd *CreateOsd(int Left, int Top, uint Level) = 0; ///< Returns a pointer to a newly created cOsd object, which will be located ///< at the given coordinates. public: cOsdProvider(void); //XXX maybe parameter to make this one "sticky"??? (frame-buffer etc.) virtual ~cOsdProvider(); - static cOsd *NewOsd(int Left, int Top); + static cOsd *NewOsd(int Left, int Top, uint Level = 0); ///< Returns a pointer to a newly created cOsd object, which will be located ///< at the given coordinates. When the cOsd object is no longer needed, the ///< caller must delete it. If the OSD is already in use, or there is no OSD diff --git a/po/tr_TR.po b/po/tr_TR.po index 1eecb50..487c426 100644 --- a/po/tr_TR.po +++ b/po/tr_TR.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n" "POT-Creation-Date: 2007-08-19 13:53+0200\n" -"PO-Revision-Date: 2007-08-12 14:17+0200\n" +"PO-Revision-Date: 2007-08-24 14:37+0200\n" "Last-Translator: Oktay Yolgeçen <oktay_73@yahoo.de>\n" "Language-Team: <vdr@linuxtv.org>\n" "MIME-Version: 1.0\n" @@ -25,7 +25,7 @@ msgstr "Kanal kullanýlamýyor!" #: device.c:636 msgid "Can't start Transfer Mode!" -msgstr "Transfer mode baþlatýlamýyor!" +msgstr "Transfer modu baþlatýlamýyor!" #: eitscan.c:159 msgid "Starting EPG scan" @@ -59,7 +59,7 @@ msgstr "Kumandanýn kodu bulundu!" #: interface.c:80 msgid "Do not press any key..." -msgstr "Tuþlara basmayýnýz..." +msgstr "Tuþlara basma..." #: interface.c:86 msgid "Phase 2: Learning specific key codes" @@ -68,7 +68,7 @@ msgstr "Faz 2: Belirli tuþ kodu eðitiliyor" #: interface.c:90 #, c-format msgid "Press key for '%s'" -msgstr "'%s' için tuþ seçiniz" +msgstr "'%s' için tuþ seç" #: interface.c:106 msgid "Press 'Up' to confirm" @@ -84,7 +84,7 @@ msgstr "(Geri dönmek için 'Yukarý' bas)" #: interface.c:142 msgid "(press 'Down' to end key definition)" -msgstr "(Sona erdirmek için 'Aþaðý' bas)" +msgstr "(Bitirmek için 'Aþaðý' bas)" #: interface.c:146 msgid "(press 'Menu' to skip this key)" @@ -200,11 +200,11 @@ msgstr "Önceki kanal" #: keys.c:48 msgid "Key$Volume+" -msgstr "Ses+" +msgstr "Volüm+" #: keys.c:49 msgid "Key$Volume-" -msgstr "Ses-" +msgstr "Volüm-" #: keys.c:50 skinclassic.c:549 msgid "Key$Mute" @@ -240,39 +240,39 @@ msgstr "Komutlar" #: keys.c:58 msgid "Key$User1" -msgstr "" +msgstr "Kullanýcý1" #: keys.c:59 msgid "Key$User2" -msgstr "" +msgstr "Kullanýcý2" #: keys.c:60 msgid "Key$User3" -msgstr "" +msgstr "Kullanýcý3" #: keys.c:61 msgid "Key$User4" -msgstr "" +msgstr "Kullanýcý4" #: keys.c:62 msgid "Key$User5" -msgstr "" +msgstr "Kullanýcý5" #: keys.c:63 msgid "Key$User6" -msgstr "" +msgstr "Kullanýcý6" #: keys.c:64 msgid "Key$User7" -msgstr "" +msgstr "Kullanýcý7" #: keys.c:65 msgid "Key$User8" -msgstr "" +msgstr "Kullanýcý8" #: keys.c:66 msgid "Key$User9" -msgstr "" +msgstr "Kullanýcý9" #: menu.c:69 msgid "Free To Air" @@ -547,7 +547,7 @@ msgstr "Lütfen %d rakam veriniz!" #: menu.c:1754 msgid "CAM not responding!" -msgstr "" +msgstr "CAM yanýt vermiyor!" #: menu.c:1784 msgid "Recording info" @@ -639,35 +639,35 @@ msgstr "Mesaj gösterme zamaný (sn)" #: menu.c:2217 msgid "Setup.OSD$Use small font" -msgstr "Küçük harf kullan" +msgstr "Küçük font kullan" #: menu.c:2218 msgid "Setup.OSD$Anti-alias" -msgstr "" +msgstr "Anti-alias" #: menu.c:2219 msgid "Setup.OSD$Default font" -msgstr "" +msgstr "Olaðan font" #: menu.c:2220 msgid "Setup.OSD$Small font" -msgstr "" +msgstr "Küçük font" #: menu.c:2221 msgid "Setup.OSD$Fixed font" -msgstr "" +msgstr "Çakýlý font" #: menu.c:2222 msgid "Setup.OSD$Default font size (pixel)" -msgstr "" +msgstr "Olaðan font boyutu (pixel)" #: menu.c:2223 msgid "Setup.OSD$Small font size (pixel)" -msgstr "" +msgstr "Küçük font boyutu (pixel)" #: menu.c:2224 msgid "Setup.OSD$Fixed font size (pixel)" -msgstr "" +msgstr "Çakýlý font boyutu (pixel)" #: menu.c:2225 msgid "Setup.OSD$Channel info position" @@ -837,15 +837,15 @@ msgstr "Üst LNB frekansý (MHz)" #: menu.c:2560 msgid "CAM reset" -msgstr "" +msgstr "CAM sýfýrlandý" #: menu.c:2561 msgid "CAM present" -msgstr "" +msgstr "CAM mevcut" #: menu.c:2562 msgid "CAM ready" -msgstr "" +msgstr "CAM hazýr" #: menu.c:2585 menu.c:2815 msgid "CAM" @@ -869,7 +869,7 @@ msgstr "CAM menüsü açýlamýyor!" #: menu.c:2624 msgid "CAM is in use - really reset?" -msgstr "" +msgstr "CAM kullanýlýyor - gerçekden sýfýrla?" #: menu.c:2626 msgid "Can't reset CAM!" @@ -901,7 +901,7 @@ msgstr "Olaðan çekim ömrü (gün)" #: menu.c:2666 msgid "Setup.Recording$Pause priority" -msgstr "Olaðan duraklama prioritesi" +msgstr "Duraklama prioritesi" #: menu.c:2667 msgid "Setup.Recording$Pause lifetime (d)" @@ -973,11 +973,11 @@ msgstr "SVDRP zaman aþýmý (sn) " #: menu.c:2715 msgid "Setup.Miscellaneous$Zap timeout (s)" -msgstr "Kanal deðiþtirme zaman aþýmý (sn)" +msgstr "Zaping zaman aþýmý (sn)" #: menu.c:2716 msgid "Setup.Miscellaneous$Channel entry timeout (ms)" -msgstr "" +msgstr "Kanal giriþ zaman aþýmý (ms)" #: menu.c:2717 msgid "Setup.Miscellaneous$Initial channel" @@ -1149,7 +1149,7 @@ msgstr "Kapatýlamýyor - '-s' seçeneði verilmemiþ!" #: shutdown.c:152 msgid "Editing - shut down anyway?" -msgstr "" +msgstr "Kesim aktif - buna raðmen kapat?" #: shutdown.c:162 msgid "Recording - shut down anyway?" @@ -1167,11 +1167,11 @@ msgstr "buna raðmen kapat?" #: shutdown.c:184 #, c-format msgid "Plugin %s wakes up in %ld min, continue?" -msgstr "" +msgstr "Eklenti %s %ld dakikada açýlýyor, devam et?" #: shutdown.c:195 msgid "Editing - restart anyway?" -msgstr "" +msgstr "Kesim aktif - buna raðmen yeniden baþlat?" #: shutdown.c:205 msgid "Recording - restart anyway?" @@ -1184,7 +1184,7 @@ msgstr "buna raðmen yeniden baþlat?" #. TRANSLATORS: note the trailing blank! #: skinclassic.c:553 msgid "Volume " -msgstr "Ses " +msgstr "Volüm " #: skinclassic.c:702 msgid "Classic VDR" @@ -1242,7 +1242,7 @@ msgstr "Kayýt baþlandý" #: vdr.c:1034 msgid "VDR will shut down later - press Power to force" -msgstr "" +msgstr "VDR daha sonra kapanacak - zorlamak için Kapat'a bas" #: vdr.c:1046 msgid "Press any key to cancel shutdown" @@ -1262,9 +1262,9 @@ msgstr "Kesim bitti" #: vdr.c:1175 msgid "Press any key to cancel restart" -msgstr "" +msgstr "Yeniden baþlatmayý iptal etmek için herhangi bir tuþa bas" #: vdr.c:1195 #, c-format msgid "VDR will shut down in %s minutes" -msgstr "" +msgstr "VDR %s dakikada kapanacak" @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: rcu.c 1.15 2006/12/02 11:12:28 kls Exp $ + * $Id: rcu.c 1.16 2007/08/24 13:15:48 kls Exp $ */ #include "rcu.h" @@ -257,7 +257,7 @@ void cRcuRemote::SetNumber(int n, bool Hex) data = m; } -void cRcuRemote::SetString(char *s) +void cRcuRemote::SetString(const char *s) { const char *chars = mode == modeH ? "0123456789ABCDEF" : "0123456789-EHLP "; int n = 0; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: rcu.h 1.6 2005/12/31 15:09:25 kls Exp $ + * $Id: rcu.h 1.7 2007/08/24 13:15:48 kls Exp $ */ #ifndef __RCU_H @@ -31,7 +31,7 @@ private: void SetMode(unsigned char Mode); void SetNumber(int n, bool Hex = false); void SetPoints(unsigned char Dp, bool On); - void SetString(char *s); + void SetString(const char *s); bool DetectCode(unsigned char *Code); virtual void Action(void); virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); @@ -10,7 +10,7 @@ * and interact with the Video Disk Recorder - or write a full featured * graphical interface that sits on top of an SVDRP connection. * - * $Id: svdrp.c 1.102 2007/06/23 13:14:59 kls Exp $ + * $Id: svdrp.c 1.103 2007/08/25 09:28:26 kls Exp $ */ #include "svdrp.h" @@ -216,10 +216,12 @@ const char *HelpPages[] = { "HITK [ <key> ]\n" " Hit the given remote control key. Without option a list of all\n" " valid key names is given.", - "LSTC [ <number> | <name> ]\n" + "LSTC [ :groups | <number> | <name> ]\n" " List channels. Without option, all channels are listed. Otherwise\n" " only the given channel is listed. If a name is given, all channels\n" - " containing the given string as part of their name are listed.", + " containing the given string as part of their name are listed.\n" + " If ':groups' is given, all channels are listed including group\n" + " separators. The channel number of a group separator is always 0.", "LSTE [ <channel> ] [ now | next | at <time> ]\n" " List EPG data. Without any parameters all data of all channels is\n" " listed. If a channel is given (either by number or by channel ID),\n" @@ -862,7 +864,8 @@ void cSVDRP::CmdHITK(const char *Option) void cSVDRP::CmdLSTC(const char *Option) { - if (*Option) { + bool WithGroupSeps = strcasecmp(Option, ":groups") == 0; + if (*Option && !WithGroupSeps) { if (isnumber(Option)) { cChannel *channel = Channels.GetByNumber(strtol(Option, NULL, 10)); if (channel) @@ -889,7 +892,9 @@ void cSVDRP::CmdLSTC(const char *Option) } else if (Channels.MaxNumber() >= 1) { for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { - if (!channel->GroupSep()) + if (WithGroupSeps) + Reply(channel->Next() ? -250: 250, "%d %s", channel->GroupSep() ? 0 : channel->Number(), *channel->ToText()); + else if (!channel->GroupSep()) Reply(channel->Number() < Channels.MaxNumber() ? -250 : 250, "%d %s", channel->Number(), *channel->ToText()); } } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: thread.c 1.61 2007/06/17 12:43:40 kls Exp $ + * $Id: thread.c 1.62 2007/08/24 13:15:48 kls Exp $ */ #include "thread.h" @@ -416,7 +416,7 @@ bool cPipe::Open(const char *Command, const char *Mode) return false; } - char *mode = "w"; + const char *mode = "w"; int iopipe = 0; if (pid > 0) { // parent process @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.h 1.107 2007/08/05 12:11:52 kls Exp $ + * $Id: tools.h 1.108 2007/08/25 14:16:39 kls Exp $ */ #ifndef __TOOLS_H @@ -464,6 +464,12 @@ public: Realloc(allocated * 4 / 2); // increase size by 50% data[size++] = Data; } + virtual void Remove(int Index) + { + if (Index < size - 1) + memmove(&data[Index], &data[Index + 1], (size - Index) * sizeof(T)); + size--; + } virtual void Clear(void) {} void Sort(__compar_fn_t Compare) { @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.298 2007/08/18 13:03:46 kls Exp $ + * $Id: vdr.c 1.299 2007/08/25 08:51:13 kls Exp $ */ #include <getopt.h> @@ -536,7 +536,7 @@ int main(int argc, char *argv[]) // Configuration data: if (!ConfigDirectory) - ConfigDirectory = VideoDirectory; + ConfigDirectory = CONFDIR; cPlugin::SetConfigDirectory(ConfigDirectory); cThemes::SetThemesDirectory(AddDirectory(ConfigDirectory, "themes")); |