From 536d116d3191895315955d1f2f465ad7644c7bd7 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 5 Sep 2024 15:17:58 +0200 Subject: [PATCH] =?UTF-8?q?fix=20epg=20newline=20for=C3=96R=20channels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gui/channellist.cpp | 4 ++++ src/gui/epgview.cpp | 4 ++++ src/gui/eventlist.cpp | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 52cfc5cb9..76728a53a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2740,6 +2740,10 @@ void CChannelList::processTextToArray(std::string text, int screening) // UTF-8 std::string aktLine = ""; std::string aktWord = ""; int aktWidth = 0; + + if(!text.empty()) + text = str_replace("\\n", "\n", text); + text += ' '; const char *text_= text.c_str(); diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index c04236cc8..c57ae89c9 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -189,6 +189,10 @@ void CEpgData::processTextToArray(std::string text, int screening, bool has_cove std::string aktLine = ""; std::string aktWord = ""; int aktWidth = 0; + + if(!text.empty()) + text = str_replace("\\n", "\n", text); + text += ' '; char* text_= (char*) text.c_str(); diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index e0c2273a9..7a27ac13f 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -820,6 +820,9 @@ void CEventList::paintDescription(int index) else infozone_text = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); + if(!infozone_text.empty()) + infozone_text = str_replace("\\n", "\n", infozone_text); + infozone->setText(infozone_text, CTextBox::TOP, g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT]); infozone->doPaintBg(false); infozone->doPaintTextBoxBg(true);