channellist: add possibility to clear channel history

Origin commit data
------------------
Branch: ni/coolstream
Commit: ffd0e72251
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-05-19 (Thu, 19 May 2016)

Origin message was:
------------------
- channellist: add possibility to clear channel history

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-05-19 16:59:56 +02:00
parent 07de2c10e3
commit 131e086535
5 changed files with 23 additions and 4 deletions

View File

@@ -255,6 +255,7 @@ channellist.foot_sort_freq Sortiert[freq]
channellist.foot_sort_sat Sortiert[sat]
channellist.head Alle Kanäle
channellist.history Verlauf
channellist.history_clear Verlauf löschen
channellist.keep_numbers Dauerhafte Kanalnummern
channellist.make_hdlist Erzeuge Bouquet mit HD-Kanälen
channellist.make_newlist Erzeuge Bouquet mit neuen Kanälen

View File

@@ -255,6 +255,7 @@ channellist.foot_sort_freq sorted[freq]
channellist.foot_sort_sat sorted[sat]
channellist.head All Services
channellist.history History
channellist.history_clear Clear history
channellist.keep_numbers Persistent channel numbers
channellist.make_hdlist Create list of HD channels
channellist.make_newlist Create list of new channels

View File

@@ -311,6 +311,7 @@ int CChannelList::doChannelMenu(void)
bool empty = (*chanlist).empty();
bool allow_edit = (bouquet && bouquet->zapitBouquet && !bouquet->zapitBouquet->bOther && !bouquet->zapitBouquet->bWebtv);
bool got_history = (CNeutrinoApp::getInstance()->channelList->getLastChannels().size() > 1);
int i = 0;
snprintf(cnt, sizeof(cnt), "%d", i);
@@ -328,6 +329,10 @@ int CChannelList::doChannelMenu(void)
snprintf(cnt, sizeof(cnt), "%d", i);
menu->addItem(new CMenuForwarder(LOCALE_CHANNELLIST_RESET_ALL, reset_all, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
menu->addItem(GenericMenuSeparator);
snprintf(cnt, sizeof(cnt), "%d", i);
menu->addItem(new CMenuForwarder(LOCALE_CHANNELLIST_HISTORY_CLEAR, got_history, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
menu->addItem(new CMenuSeparator(CMenuSeparator::LINE));
snprintf(cnt, sizeof(cnt), "%d", i);
menu->addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
@@ -411,7 +416,14 @@ int CChannelList::doChannelMenu(void)
if(g_settings.make_new_list)
CNeutrinoApp::getInstance()->MarkChannelsInit();
break;
case 5: // settings
case 5: // clear channel history
{
CNeutrinoApp::getInstance()->channelList->getLastChannels().clear();
printf("%s:%d lastChList cleared\n", __FUNCTION__, __LINE__);
ret = -2; // exit channellist
}
break;
case 6: // settings
{
previous_channellist_additional = g_settings.channellist_additional;
COsdSetup osd_setup;
@@ -713,11 +725,14 @@ int CChannelList::show()
if (selected + 1 < (*chanlist).size())
selected++;
}
if (ret != 0) {
if (ret == -2) // exit channellist
loop = false;
else {
if (ret != 0)
paint();
}
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]);
}
}
else if (!empty && msg == (neutrino_msg_t) g_settings.key_list_start) {
actzap = updateSelection(0);
}

View File

@@ -282,6 +282,7 @@ typedef enum
LOCALE_CHANNELLIST_FOOT_SORT_SAT,
LOCALE_CHANNELLIST_HEAD,
LOCALE_CHANNELLIST_HISTORY,
LOCALE_CHANNELLIST_HISTORY_CLEAR,
LOCALE_CHANNELLIST_KEEP_NUMBERS,
LOCALE_CHANNELLIST_MAKE_HDLIST,
LOCALE_CHANNELLIST_MAKE_NEWLIST,

View File

@@ -282,6 +282,7 @@ const char * locale_real_names[] =
"channellist.foot_sort_sat",
"channellist.head",
"channellist.history",
"channellist.history_clear",
"channellist.keep_numbers",
"channellist.make_hdlist",
"channellist.make_newlist",