src/gui/scan.cpp/h: add more plausible caption for user canceled scan

Origin commit data
------------------
Branch: ni/coolstream
Commit: d12682931f
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-08-04 (Sat, 04 Aug 2018)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2018-08-04 11:41:52 +02:00
committed by vanhofen
parent f8df974c8c
commit 217a2187b8
2 changed files with 5 additions and 1 deletions

View File

@@ -74,6 +74,7 @@ CScanTs::CScanTs(delivery_system_t DelSys)
delsys = DelSys; delsys = DelSys;
signalbox = NULL; signalbox = NULL;
memset(&TP, 0, sizeof(TP)); // valgrind memset(&TP, 0, sizeof(TP)); // valgrind
canceled = false;
} }
CScanTs::~CScanTs() CScanTs::~CScanTs()
@@ -343,8 +344,10 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
else if(msg == CRCInput::RC_home) { else if(msg == CRCInput::RC_home) {
if(manual && !scansettings.scan_nit_manual) if(manual && !scansettings.scan_nit_manual)
continue; continue;
canceled = false;
if (ShowMsg(LOCALE_SCANTS_ABORT_HEADER, LOCALE_SCANTS_ABORT_BODY, CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo) == CMsgBox::mbrYes) { if (ShowMsg(LOCALE_SCANTS_ABORT_HEADER, LOCALE_SCANTS_ABORT_BODY, CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo) == CMsgBox::mbrYes) {
g_Zapit->stopScan(); g_Zapit->stopScan();
canceled = true;
} }
} }
else else
@@ -361,7 +364,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
perror(NEUTRINO_SCAN_STOP_SCRIPT " failed"); perror(NEUTRINO_SCAN_STOP_SCRIPT " failed");
} }
if(!test) { 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); header.paint(CC_SAVE_SCREEN_NO);
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(0xFFFF); uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(0xFFFF);
do { do {

View File

@@ -66,6 +66,7 @@ class CScanTs : public CMenuTarget
uint32_t done; uint32_t done;
int tuned; int tuned;
CSignalBox *signalbox; CSignalBox *signalbox;
bool canceled;
void paint(bool fortest = false); void paint(bool fortest = false);
void paintLineLocale(int x, int * y, int width, const neutrino_locale_t l); void paintLineLocale(int x, int * y, int width, const neutrino_locale_t l);