mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
gui/scan_setup.cpp: fix memleaks
Origin commit data
------------------
Branch: ni/coolstream
Commit: 4e48e81914
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-11-27 (Wed, 27 Nov 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -197,8 +197,6 @@ CScanSetup::CScanSetup(bool wizard_mode)
|
|||||||
width = w_max (40, 10);
|
width = w_max (40, 10);
|
||||||
is_wizard = wizard_mode;
|
is_wizard = wizard_mode;
|
||||||
|
|
||||||
satSelect = NULL;
|
|
||||||
cableSelect = NULL;
|
|
||||||
satOnOff = NULL;
|
satOnOff = NULL;
|
||||||
fautoScanAll = NULL;
|
fautoScanAll = NULL;
|
||||||
frontendSetup = NULL;
|
frontendSetup = NULL;
|
||||||
@@ -214,8 +212,6 @@ CScanSetup::CScanSetup(bool wizard_mode)
|
|||||||
allow_start = true;
|
allow_start = true;
|
||||||
if (CFEManager::getInstance()->haveCable())
|
if (CFEManager::getInstance()->haveCable())
|
||||||
nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
if (CFEManager::getInstance()->haveSat())
|
|
||||||
satSelect = new CMenuOptionStringChooser(LOCALE_SATSETUP_SATELLITE, scansettings.satName, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CScanSetup* CScanSetup::getInstance()
|
CScanSetup* CScanSetup::getInstance()
|
||||||
@@ -232,7 +228,6 @@ CScanSetup* CScanSetup::getInstance()
|
|||||||
|
|
||||||
CScanSetup::~CScanSetup()
|
CScanSetup::~CScanSetup()
|
||||||
{
|
{
|
||||||
delete satSelect;
|
|
||||||
delete nid;
|
delete nid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,14 +397,8 @@ int CScanSetup::showScanMenu()
|
|||||||
|
|
||||||
//settings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCANTS_PREVERENCES_RECEIVING_SYSTEM ));
|
//settings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCANTS_PREVERENCES_RECEIVING_SYSTEM ));
|
||||||
|
|
||||||
//satSelect = new CMenuOptionStringChooser(LOCALE_SATSETUP_SATELLITE, scansettings.satName, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
|
||||||
satSelect->setHint("", LOCALE_MENU_HINT_SCAN_SATELLITE);
|
|
||||||
|
|
||||||
satOnOff = new CMenuWidget(LOCALE_SATSETUP_SATELLITE, NEUTRINO_ICON_SETTINGS, width);
|
satOnOff = new CMenuWidget(LOCALE_SATSETUP_SATELLITE, NEUTRINO_ICON_SETTINGS, width);
|
||||||
|
|
||||||
/* add configured satellites to satSelect */
|
|
||||||
fillSatSelect(satSelect);
|
|
||||||
|
|
||||||
//auto scan
|
//auto scan
|
||||||
char autoscan[64];
|
char autoscan[64];
|
||||||
std::string s_capt_part = g_Locale->getText(LOCALE_SATSETUP_SATELLITE);
|
std::string s_capt_part = g_Locale->getText(LOCALE_SATSETUP_SATELLITE);
|
||||||
@@ -417,14 +406,14 @@ int CScanSetup::showScanMenu()
|
|||||||
|
|
||||||
CMenuWidget * autoScan = new CMenuWidget(LOCALE_SERVICEMENU_SCANTS, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN);
|
CMenuWidget * autoScan = new CMenuWidget(LOCALE_SERVICEMENU_SCANTS, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN);
|
||||||
addScanMenuAutoScan(autoScan);
|
addScanMenuAutoScan(autoScan);
|
||||||
mf = new CMenuForwarderNonLocalized(autoscan, true, NULL, autoScan, "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
|
mf = new CMenuDForwarderNonLocalized(autoscan, true, NULL, autoScan, "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
|
||||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_AUTO);
|
mf->setHint("", LOCALE_MENU_HINT_SCAN_AUTO);
|
||||||
settings->addItem(mf);
|
settings->addItem(mf);
|
||||||
|
|
||||||
//manual scan
|
//manual scan
|
||||||
CMenuWidget * manualScan = new CMenuWidget(LOCALE_SATSETUP_MANUAL_SCAN, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_MANUAL_SCAN);
|
CMenuWidget * manualScan = new CMenuWidget(LOCALE_SATSETUP_MANUAL_SCAN, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_MANUAL_SCAN);
|
||||||
addScanMenuManualScan(manualScan);
|
addScanMenuManualScan(manualScan);
|
||||||
mf = new CMenuForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, manualScan, "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
mf = new CMenuDForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, manualScan, "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_MANUAL);
|
mf->setHint("", LOCALE_MENU_HINT_SCAN_MANUAL);
|
||||||
settings->addItem(mf);
|
settings->addItem(mf);
|
||||||
//auto scan all
|
//auto scan all
|
||||||
@@ -445,12 +434,9 @@ int CScanSetup::showScanMenu()
|
|||||||
if (CFEManager::getInstance()->haveCable()) {
|
if (CFEManager::getInstance()->haveCable()) {
|
||||||
r_system = DVB_C;
|
r_system = DVB_C;
|
||||||
|
|
||||||
cableSelect = new CMenuOptionStringChooser(LOCALE_CABLESETUP_PROVIDER, scansettings.cableName, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
|
||||||
cableSelect->setHint("", LOCALE_MENU_HINT_SCAN_CABLE);
|
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
settings->addItem(GenericMenuSeparatorLine);
|
settings->addItem(GenericMenuSeparatorLine);
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
fillCableSelect(cableSelect);
|
|
||||||
//tune timeout
|
//tune timeout
|
||||||
if(CFEManager::getInstance()->getFrontendCount() <= 1) {
|
if(CFEManager::getInstance()->getFrontendCount() <= 1) {
|
||||||
CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100);
|
CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_ZAPIT_FE_TIMEOUT, (int *)&zapitCfg.feTimeout, true, 6, 100);
|
||||||
@@ -467,14 +453,14 @@ int CScanSetup::showScanMenu()
|
|||||||
|
|
||||||
CMenuWidget * autoScan = new CMenuWidget(LOCALE_SERVICEMENU_SCANTS, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN);
|
CMenuWidget * autoScan = new CMenuWidget(LOCALE_SERVICEMENU_SCANTS, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_AUTO_SCAN);
|
||||||
addScanMenuAutoScan(autoScan);
|
addScanMenuAutoScan(autoScan);
|
||||||
mf = new CMenuForwarderNonLocalized(autoscan, true, NULL, autoScan, "", have_sat ? CRCInput::convertDigitToKey(shortcut++) : CRCInput::RC_red, have_sat ? NULL : NEUTRINO_ICON_BUTTON_RED);
|
mf = new CMenuDForwarderNonLocalized(autoscan, true, NULL, autoScan, "", have_sat ? CRCInput::convertDigitToKey(shortcut++) : CRCInput::RC_red, have_sat ? NULL : NEUTRINO_ICON_BUTTON_RED);
|
||||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_AUTO);
|
mf->setHint("", LOCALE_MENU_HINT_SCAN_AUTO);
|
||||||
settings->addItem(mf);
|
settings->addItem(mf);
|
||||||
|
|
||||||
//manual scan
|
//manual scan
|
||||||
CMenuWidget * manualScan = new CMenuWidget(LOCALE_SATSETUP_MANUAL_SCAN, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_MANUAL_SCAN);
|
CMenuWidget * manualScan = new CMenuWidget(LOCALE_SATSETUP_MANUAL_SCAN, NEUTRINO_ICON_SETTINGS, w/*width*/, MN_WIDGET_ID_SCAN_MANUAL_SCAN);
|
||||||
addScanMenuManualScan(manualScan);
|
addScanMenuManualScan(manualScan);
|
||||||
mf = new CMenuForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, manualScan, "", have_sat ? CRCInput::convertDigitToKey(shortcut++) : CRCInput::RC_green, have_sat ? NULL : NEUTRINO_ICON_BUTTON_GREEN);
|
mf = new CMenuDForwarder(LOCALE_SATSETUP_MANUAL_SCAN, true, NULL, manualScan, "", have_sat ? CRCInput::convertDigitToKey(shortcut++) : CRCInput::RC_green, have_sat ? NULL : NEUTRINO_ICON_BUTTON_GREEN);
|
||||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_MANUAL);
|
mf->setHint("", LOCALE_MENU_HINT_SCAN_MANUAL);
|
||||||
settings->addItem(mf);
|
settings->addItem(mf);
|
||||||
//simple cable scan
|
//simple cable scan
|
||||||
@@ -736,7 +722,7 @@ int CScanSetup::showFrontendSetup(int number)
|
|||||||
mc->setHint("", LOCALE_MENU_HINT_SCAN_SATENABLE);
|
mc->setHint("", LOCALE_MENU_HINT_SCAN_SATENABLE);
|
||||||
satToSelect->addItem(mc);
|
satToSelect->addItem(mc);
|
||||||
}
|
}
|
||||||
fsatSelect = new CMenuForwarder(LOCALE_SATSETUP_SELECT_SAT, allow_moptions, NULL, satToSelect, "", CRCInput::convertDigitToKey(shortcut++));
|
fsatSelect = new CMenuDForwarder(LOCALE_SATSETUP_SELECT_SAT, allow_moptions, NULL, satToSelect, "", CRCInput::convertDigitToKey(shortcut++));
|
||||||
fsatSelect->setHint("", LOCALE_MENU_HINT_SCAN_SATADD);
|
fsatSelect->setHint("", LOCALE_MENU_HINT_SCAN_SATADD);
|
||||||
setupMenu->addItem(fsatSelect);
|
setupMenu->addItem(fsatSelect);
|
||||||
|
|
||||||
@@ -1067,12 +1053,19 @@ void CScanSetup::addScanMenuManualScan(CMenuWidget *manual_Scan)
|
|||||||
manual_Scan->addIntroItems();
|
manual_Scan->addIntroItems();
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
if (r_system == DVB_C) {
|
if (r_system == DVB_C) {
|
||||||
|
CMenuOptionStringChooser * cableSelect = new CMenuOptionStringChooser(LOCALE_CABLESETUP_PROVIDER, scansettings.cableName, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||||
|
cableSelect->setHint("", LOCALE_MENU_HINT_SCAN_CABLE);
|
||||||
|
fillCableSelect(cableSelect);
|
||||||
manual_Scan->addItem(cableSelect);
|
manual_Scan->addItem(cableSelect);
|
||||||
mf = new CMenuForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid);
|
mf = new CMenuForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid);
|
||||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_NID);
|
mf->setHint("", LOCALE_MENU_HINT_SCAN_NID);
|
||||||
manual_Scan->addItem(mf);
|
manual_Scan->addItem(mf);
|
||||||
mf = new CMenuDForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, new CTPSelectHandler(), "cable", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
mf = new CMenuDForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, new CTPSelectHandler(), "cable", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||||
} else {
|
} else {
|
||||||
|
CMenuOptionStringChooser * satSelect = new CMenuOptionStringChooser(LOCALE_SATSETUP_SATELLITE, scansettings.satName, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||||
|
satSelect->setHint("", LOCALE_MENU_HINT_SCAN_SATELLITE);
|
||||||
|
/* add configured satellites to satSelect */
|
||||||
|
fillSatSelect(satSelect);
|
||||||
manual_Scan->addItem(satSelect);
|
manual_Scan->addItem(satSelect);
|
||||||
mf = new CMenuDForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, new CTPSelectHandler(), "sat", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
mf = new CMenuDForwarder(LOCALE_SCANTS_SELECT_TP, true, NULL, new CTPSelectHandler(), "sat", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||||
}
|
}
|
||||||
@@ -1163,12 +1156,20 @@ void CScanSetup::addScanMenuAutoScan(CMenuWidget *auto_Scan)
|
|||||||
auto_Scan->addIntroItems();
|
auto_Scan->addIntroItems();
|
||||||
|
|
||||||
if (r_system == DVB_C) { //cable
|
if (r_system == DVB_C) { //cable
|
||||||
|
CMenuOptionStringChooser * cableSelect = new CMenuOptionStringChooser(LOCALE_CABLESETUP_PROVIDER, scansettings.cableName, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||||
|
cableSelect->setHint("", LOCALE_MENU_HINT_SCAN_CABLE);
|
||||||
|
fillCableSelect(cableSelect);
|
||||||
auto_Scan->addItem(cableSelect);
|
auto_Scan->addItem(cableSelect);
|
||||||
mf = new CMenuForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid);
|
mf = new CMenuForwarder(LOCALE_SATSETUP_CABLE_NID, true, nid->getValue(), nid);
|
||||||
mf->setHint("", LOCALE_MENU_HINT_SCAN_NID);
|
mf->setHint("", LOCALE_MENU_HINT_SCAN_NID);
|
||||||
auto_Scan->addItem(mf);
|
auto_Scan->addItem(mf);
|
||||||
} else
|
} else {
|
||||||
|
CMenuOptionStringChooser * satSelect = new CMenuOptionStringChooser(LOCALE_SATSETUP_SATELLITE, scansettings.satName, true, this, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||||
|
satSelect->setHint("", LOCALE_MENU_HINT_SCAN_SATELLITE);
|
||||||
|
/* add configured satellites to satSelect */
|
||||||
|
fillSatSelect(satSelect);
|
||||||
auto_Scan->addItem(satSelect);
|
auto_Scan->addItem(satSelect);
|
||||||
|
}
|
||||||
|
|
||||||
auto_Scan->addItem(GenericMenuSeparatorLine);
|
auto_Scan->addItem(GenericMenuSeparatorLine);
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -50,8 +50,6 @@ class CScanSetup : public CMenuTarget, public CChangeObserver
|
|||||||
int width;
|
int width;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CMenuOptionStringChooser *satSelect;
|
|
||||||
CMenuOptionStringChooser *cableSelect;
|
|
||||||
CMenuWidget *satOnOff;
|
CMenuWidget *satOnOff;
|
||||||
|
|
||||||
/* global items to be enabled/disabled in notify */
|
/* global items to be enabled/disabled in notify */
|
||||||
|
Reference in New Issue
Block a user