mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
moviebrowser: fix possible memleaks with initOptionsBrowserMenu()
Origin commit data
------------------
Branch: ni/coolstream
Commit: cdd74b24de
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-06-25 (Tue, 25 Jun 2019)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -3631,23 +3631,15 @@ void CMovieBrowser::initOptionsDirMenu(CMenuWidget *OptionsMenuDir, std::vector<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMovieBrowser::initOptionsBrowserMenu(CMenuWidget *OptionsMenuBrowser)
|
void CMovieBrowser::initOptionsBrowserMenu(CMenuWidget *OptionsMenuBrowser, CIntInput* PlayMaxUserIntInput, CIntInput* RecMaxUserIntInput, CIntInput* BrowserFrameUserIntInputAdd, CIntInput* BrowserFrameUserIntInputGen, CIntInput* BrowserRowNrIntInput)
|
||||||
{
|
{
|
||||||
CIntInput* playMaxUserIntInput = new CIntInput(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, (int *)&m_settings.lastPlayMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
|
||||||
CIntInput* recMaxUserIntInput = new CIntInput(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, (int *)&m_settings.lastRecordMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
|
||||||
|
|
||||||
CIntInput* browserFrameUserIntInputAdd = new CIntInput(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int *)&m_settings.browserFrameHeightAdditional, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
|
||||||
CIntInput* browserFrameUserIntInputGen = new CIntInput(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int *)&m_settings.browserFrameHeightGeneral, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
|
||||||
|
|
||||||
CIntInput* browserRowNrIntInput = new CIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, (int *)&m_settings.browserRowNr, 1, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
|
||||||
|
|
||||||
OptionsMenuBrowser->addIntroItems(LOCALE_MOVIEBROWSER_OPTION_BROWSER);
|
OptionsMenuBrowser->addIntroItems(LOCALE_MOVIEBROWSER_OPTION_BROWSER);
|
||||||
OptionsMenuBrowser->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, true, playMaxUserIntInput->getValue(), playMaxUserIntInput));
|
OptionsMenuBrowser->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, true, PlayMaxUserIntInput->getValue(), PlayMaxUserIntInput));
|
||||||
OptionsMenuBrowser->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, true, recMaxUserIntInput->getValue(), recMaxUserIntInput));
|
OptionsMenuBrowser->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, true, RecMaxUserIntInput->getValue(), RecMaxUserIntInput));
|
||||||
OptionsMenuBrowser->addItem(GenericMenuSeparatorLine);
|
OptionsMenuBrowser->addItem(GenericMenuSeparatorLine);
|
||||||
|
|
||||||
CMenuForwarder* fw1 = new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, !m_settings.browserAdditional, browserFrameUserIntInputGen->getValue(), browserFrameUserIntInputGen);
|
CMenuForwarder* fw1 = new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, !m_settings.browserAdditional, BrowserFrameUserIntInputGen->getValue(), BrowserFrameUserIntInputGen);
|
||||||
CMenuForwarder* fw2 = new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH_ADDITIONAL, m_settings.browserAdditional, browserFrameUserIntInputAdd->getValue(), browserFrameUserIntInputAdd);
|
CMenuForwarder* fw2 = new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH_ADDITIONAL, m_settings.browserAdditional, BrowserFrameUserIntInputAdd->getValue(), BrowserFrameUserIntInputAdd);
|
||||||
|
|
||||||
CMenuOptionChooser *oj = new CMenuOptionChooser(LOCALE_MOVIEBROWSER_BROWSER_ADDITIONAL, (int*)(&m_settings.browserAdditional), MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true);
|
CMenuOptionChooser *oj = new CMenuOptionChooser(LOCALE_MOVIEBROWSER_BROWSER_ADDITIONAL, (int*)(&m_settings.browserAdditional), MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true);
|
||||||
oj->OnAfterChangeOption.connect(sigc::bind(sigc::mem_fun(*this, &CMovieBrowser::changeBrowserHeight), fw1, fw2));
|
oj->OnAfterChangeOption.connect(sigc::bind(sigc::mem_fun(*this, &CMovieBrowser::changeBrowserHeight), fw1, fw2));
|
||||||
@@ -3659,7 +3651,7 @@ void CMovieBrowser::initOptionsBrowserMenu(CMenuWidget *OptionsMenuBrowser)
|
|||||||
OptionsMenuBrowser->addItem(GenericMenuSeparatorLine);
|
OptionsMenuBrowser->addItem(GenericMenuSeparatorLine);
|
||||||
OptionsMenuBrowser->addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_BROWSER_CUT_LONG_ROWTEXT, (int*)(&m_settings.browserCutLongRowText), MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true));
|
OptionsMenuBrowser->addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_BROWSER_CUT_LONG_ROWTEXT, (int*)(&m_settings.browserCutLongRowText), MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true));
|
||||||
OptionsMenuBrowser->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_BROWSER_ROW_HEAD));
|
OptionsMenuBrowser->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_BROWSER_ROW_HEAD));
|
||||||
OptionsMenuBrowser->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, true, browserRowNrIntInput->getValue(), browserRowNrIntInput));
|
OptionsMenuBrowser->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, true, BrowserRowNrIntInput->getValue(), BrowserRowNrIntInput));
|
||||||
OptionsMenuBrowser->addItem(GenericMenuSeparator);
|
OptionsMenuBrowser->addItem(GenericMenuSeparator);
|
||||||
for (int i = 0; i < MB_MAX_ROWS; i++)
|
for (int i = 0; i < MB_MAX_ROWS; i++)
|
||||||
{
|
{
|
||||||
@@ -3693,7 +3685,14 @@ bool CMovieBrowser::showMenu(bool calledExternally)
|
|||||||
int oldFrameHeight = m_settings.browserFrameHeight;
|
int oldFrameHeight = m_settings.browserFrameHeight;
|
||||||
int oldAdditional = m_settings.browserAdditional;
|
int oldAdditional = m_settings.browserAdditional;
|
||||||
CMenuWidget optionsMenuBrowser(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
|
CMenuWidget optionsMenuBrowser(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
|
||||||
initOptionsBrowserMenu(&optionsMenuBrowser);
|
CIntInput playMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, (int *)&m_settings.lastPlayMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
|
CIntInput recMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, (int *)&m_settings.lastRecordMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
|
|
||||||
|
CIntInput browserFrameUserIntInputAdd(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int *)&m_settings.browserFrameHeightAdditional, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
|
CIntInput browserFrameUserIntInputGen(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int *)&m_settings.browserFrameHeightGeneral, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
|
|
||||||
|
CIntInput browserRowNrIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, (int *)&m_settings.browserRowNr, 1, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
|
||||||
|
initOptionsBrowserMenu(&optionsMenuBrowser, &playMaxUserIntInput, &recMaxUserIntInput, &browserFrameUserIntInputAdd, &browserFrameUserIntInputGen, &browserRowNrIntInput);
|
||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
/** options **************************************************/
|
/** options **************************************************/
|
||||||
|
@@ -353,7 +353,7 @@ class CMovieBrowser : public CMenuTarget, public CProgressSignals
|
|||||||
void initUpdateMovieInfoMenu(CMenuWidget *MovieInfoMenuUpdate);
|
void initUpdateMovieInfoMenu(CMenuWidget *MovieInfoMenuUpdate);
|
||||||
void initParentalMenu(CMenuWidget *ParentalMenu);
|
void initParentalMenu(CMenuWidget *ParentalMenu);
|
||||||
void initOptionsDirMenu(CMenuWidget *OptionsMenuDir, std::vector<COnOffNotifier*>& v_notifiers);
|
void initOptionsDirMenu(CMenuWidget *OptionsMenuDir, std::vector<COnOffNotifier*>& v_notifiers);
|
||||||
void initOptionsBrowserMenu(CMenuWidget *OptionsMenuBrowser);
|
void initOptionsBrowserMenu(CMenuWidget *OptionsMenuBrowser, CIntInput* PlayMaxUserIntInput, CIntInput* RecMaxUserIntInput, CIntInput* BrowserFrameUserIntInputAdd, CIntInput* BrowserFrameUserIntInputGen, CIntInput* BrowserRowNrIntInput);
|
||||||
int showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2
|
int showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2
|
||||||
int showMovieCutMenu(); // P2
|
int showMovieCutMenu(); // P2
|
||||||
int showStartPosSelectionMenu(void); // P2
|
int showStartPosSelectionMenu(void); // P2
|
||||||
|
Reference in New Issue
Block a user