From 35692a6152202655cd446ce5f637d847b0bee6ad 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 e3ed66bdc..067501529 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2765,6 +2765,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 8d5ac4b77..6d4a140a3 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -191,6 +191,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 63d194f2e..d91aacd07 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -878,6 +878,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);