From f238ab71836724b0e3d16435d951a7d80f16648f Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sat, 18 Sep 2021 15:14:29 +0100 Subject: [PATCH] Fix text corruption on channel list when returning from live TV Remove Input::NA_SIGNAL --- control.cc | 5 +---- input.h | 1 - inputlinux.cc | 2 -- inputwin.cc | 2 +- vchannellist.cc | 16 +++++++++++++--- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/control.cc b/control.cc index 8666cf3..bfd761f 100644 --- a/control.cc +++ b/control.cc @@ -399,14 +399,11 @@ void Control::run() } else { - VConnect* vconnect = new VConnect(); // FIXME never deleted? + VConnect* vconnect = new VConnect(); // Deleted when VConnect messages Control, and is boxstack->remove()'d boxstack->add(vconnect); vconnect->run(); } - - // FIXME Input::NA_SIGNAL is possibly obsolete now - std::unique_lock lockWrapper(messageQueueMutex); // locks. unlocks on out-of-scope inputMan->start(); diff --git a/input.h b/input.h index a88501d..5b53613 100644 --- a/input.h +++ b/input.h @@ -77,7 +77,6 @@ class Input: public AbstractOption const static UCHAR NA_LEARN = 101; const static UCHAR NA_NONE = 98; const static UCHAR NA_UNKNOWN = 99; - const static UCHAR NA_SIGNAL = 100; // Problem common buttons const static UCHAR VOLUMEUP = 16; diff --git a/inputlinux.cc b/inputlinux.cc index 67c9d0f..9a81fb8 100644 --- a/inputlinux.cc +++ b/inputlinux.cc @@ -612,5 +612,3 @@ void InputLinux::listenLoop() close(pfds[1]); close(pfds[0]); } - -// FIXME surely NA_SIGNAL can go diff --git a/inputwin.cc b/inputwin.cc index ea8fb78..7646f76 100644 --- a/inputwin.cc +++ b/inputwin.cc @@ -88,7 +88,7 @@ UCHAR RemoteWin::getButtonPress(int waitType) if (!hascurevent) { if (signal) { signal=false; - return NA_SIGNAL; //Since we have no signals on windows, we simulate this + //return NA_SIGNAL; //Since we have no signals on windows, we simulate this } else { return NA_NONE; } diff --git a/vchannellist.cc b/vchannellist.cc index 8067efd..c34bf06 100644 --- a/vchannellist.cc +++ b/vchannellist.cc @@ -165,12 +165,22 @@ void VChannelList::doShowingBar() int topOption = sl.getTopOption() + 1; if (sl.getNumOptions() == 0) topOption = 0; + rectangle(220, 385, 160, 25, DrawStyle::VIEWBACKGROUND); + char showing[200]; sprintf(showing, tr("%i to %i of %i"), topOption, sl.getBottomOption(), sl.getNumOptions()); -#ifndef GRADIENT_DRAWING - rectangle(220, 385,160, 25, DrawStyle::VIEWBACKGROUND); -#endif drawText(showing, 220, 385, DrawStyle::LIGHTTEXT); + + /* + * The following would work but the translation files need changing to {} instead of %i + * This is server side and so requires a server version bump breaking compatibility with older clients + * Maybe this will happen for v0.6 ? + * + * drawText( + * fmt::format(tr("%i to %i of %i"), topOption, sl.getBottomOption(), sl.getNumOptions()).c_str(), + * 220, 385, DrawStyle::LIGHTTEXT); + * + */ } void VChannelList::quickUpdate() { //only quick for plattform that need it! -- 2.39.5