mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
moviebrowser: add PREVPLAYDATE/RECORDDATE sort buttons to footer
Origin commit data
------------------
Commit: 2f23aaedea
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-11-14 (Mon, 14 Nov 2016)
Origin message was:
------------------
- moviebrowser: add PREVPLAYDATE/RECORDDATE sort buttons to footer
This commit is contained in:
@@ -2014,6 +2014,18 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
|
|||||||
CMenuWidget m(LOCALE_MOVIEBROWSER_FOOT_SORT, NEUTRINO_ICON_SETTINGS);
|
CMenuWidget m(LOCALE_MOVIEBROWSER_FOOT_SORT, NEUTRINO_ICON_SETTINGS);
|
||||||
m.addIntroItems();
|
m.addIntroItems();
|
||||||
|
|
||||||
|
// add PREVPLAYDATE/RECORDDATE sort buttons to footer
|
||||||
|
m.addKey(CRCInput::RC_red, selector, to_string(MB_INFO_PREVPLAYDATE).c_str());
|
||||||
|
m.addKey(CRCInput::RC_green, selector, to_string(MB_INFO_RECORDDATE).c_str());
|
||||||
|
|
||||||
|
button_label footerButtons[] = {
|
||||||
|
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE},
|
||||||
|
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_MOVIEBROWSER_INFO_RECORDDATE}
|
||||||
|
};
|
||||||
|
int footerButtonsCount = sizeof(footerButtons) / sizeof(button_label);
|
||||||
|
|
||||||
|
m.setFooter(footerButtons, footerButtonsCount);
|
||||||
|
|
||||||
// just show sorting options for displayed rows; sorted by rows
|
// just show sorting options for displayed rows; sorted by rows
|
||||||
for (int row = 0; row < MB_MAX_ROWS && row < m_settings.browserRowNr; row++)
|
for (int row = 0; row < MB_MAX_ROWS && row < m_settings.browserRowNr; row++)
|
||||||
{
|
{
|
||||||
@@ -2022,6 +2034,10 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
|
|||||||
if (sortBy[i] == NULL)
|
if (sortBy[i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// already added to footer
|
||||||
|
if (i == MB_INFO_PREVPLAYDATE || i == MB_INFO_RECORDDATE)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (m_settings.browserRowItem[row] == i)
|
if (m_settings.browserRowItem[row] == i)
|
||||||
m.addItem(new CMenuForwarder(g_Locale->getText(m_localizedItemName[i]), true, NULL, selector, to_string(i).c_str(), CRCInput::convertDigitToKey(directkey++)));
|
m.addItem(new CMenuForwarder(g_Locale->getText(m_localizedItemName[i]), true, NULL, selector, to_string(i).c_str(), CRCInput::convertDigitToKey(directkey++)));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user