diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 0c0a45641..1389638a8 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -74,6 +74,7 @@ CScanTs::CScanTs(delivery_system_t DelSys) delsys = DelSys; signalbox = NULL; memset(&TP, 0, sizeof(TP)); // valgrind + canceled = false; } CScanTs::~CScanTs() @@ -343,8 +344,10 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) else if(msg == CRCInput::RC_home) { if(manual && !scansettings.scan_nit_manual) continue; + canceled = false; if (ShowMsg(LOCALE_SCANTS_ABORT_HEADER, LOCALE_SCANTS_ABORT_BODY, CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo) == CMsgBox::mbrYes) { g_Zapit->stopScan(); + canceled = true; } } else @@ -361,7 +364,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) perror(NEUTRINO_SCAN_STOP_SCRIPT " failed"); } if(!test) { - CComponentsHeader header(x, y, width, hheight, success ? LOCALE_SCANTS_FINISHED : LOCALE_SCANTS_FAILED); + CComponentsHeader header(x, y, width, hheight, success ? LOCALE_SCANTS_FINISHED : (canceled ? LOCALE_SCANTS_CANCELED : LOCALE_SCANTS_FAILED)); header.paint(CC_SAVE_SCREEN_NO); uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(0xFFFF); do { diff --git a/src/gui/scan.h b/src/gui/scan.h index 40d13dbd7..693f854d3 100644 --- a/src/gui/scan.h +++ b/src/gui/scan.h @@ -66,6 +66,7 @@ class CScanTs : public CMenuTarget uint32_t done; int tuned; CSignalBox *signalbox; + bool canceled; void paint(bool fortest = false); void paintLineLocale(int x, int * y, int width, const neutrino_locale_t l);