diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 108fb445..cd8fcb81 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3414,6 +3414,7 @@ Matthias Senzel for fixing height calculation in progress display for fixing an unnecessary double display of the current menu item in page up/down for fixing an unnecessary double display of menu items in the Recordings menu + for reporting a bug in handling cSkinDisplayMenu::GetTextAreaFont() Marek Nazarko for translating OSD texts to the Polish language diff --git a/HISTORY b/HISTORY index a28ee075..8924d467 100644 --- a/HISTORY +++ b/HISTORY @@ -9944,3 +9944,4 @@ Video Disk Recorder Revision History - Fixed a crash in strreplace() for multiple replacements with strings of different lengths (reported by Markus Ehrnsperger). +- Fixed handling of cSkinDisplayMenu::GetTextAreaFont() (reported by Matthias Senzel). diff --git a/menuitems.c b/menuitems.c index 8c516006..e4ed457b 100644 --- a/menuitems.c +++ b/menuitems.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.c 5.1 2020/12/26 15:49:01 kls Exp $ + * $Id: menuitems.c 5.2 2024/07/13 09:12:18 kls Exp $ */ #include "menuitems.h" @@ -497,10 +497,7 @@ void cMenuEditStrItem::AdvancePos(void) void cMenuEditStrItem::Set(void) { if (InEditMode()) { - // This is an ugly hack to make editing strings work with the 'skincurses' plugin. const cFont *font = dynamic_cast(cSkinDisplay::Current())->GetTextAreaFont(false); - if (!font || font->Width("W") != 1) // all characters have width == 1 in the font used by 'skincurses' - font = cFont::GetFont(fontOsd); int width = cSkinDisplay::Current()->EditableWidth(); width -= font->Width("[]"); diff --git a/skins.c b/skins.c index 4d29e4a0..75a76dfa 100644 --- a/skins.c +++ b/skins.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skins.c 5.1 2024/01/17 21:15:48 kls Exp $ + * $Id: skins.c 5.2 2024/07/13 09:12:18 kls Exp $ */ #include "skins.h" @@ -139,9 +139,9 @@ int cSkinDisplayMenu::GetTextAreaWidth(void) const return 0; } -const cFont *cSkinDisplayMenu::GetTextAreaFont(bool) const +const cFont *cSkinDisplayMenu::GetTextAreaFont(bool FixedFont) const { - return NULL; + return cFont::GetFont(FixedFont ? fontFix : fontOsd); } // --- cSkinDisplayReplay::cProgressBar -------------------------------------- diff --git a/skins.h b/skins.h index 88da89d7..0a65c36b 100644 --- a/skins.h +++ b/skins.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skins.h 5.2 2024/06/11 12:43:25 kls Exp $ + * $Id: skins.h 5.3 2024/07/13 09:12:18 kls Exp $ */ #ifndef __SKINS_H @@ -310,8 +310,7 @@ public: virtual const cFont *GetTextAreaFont(bool FixedFont) const; ///< Returns a pointer to the font which is used to display text with SetText(). ///< The parameter FixedFont has the same meaning as in SetText(). The default - ///< implementation returns NULL. Therefore a caller of this method must be - ///< prepared to receive NULL if the plugin doesn't implement this method. + ///< implementation returns the font defined in the setup. ///< The returned pointer is valid a long as the instance of cSkinDisplayMenu ///< exists. };