diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 817e3c5e0..9084627c8 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -211,6 +211,7 @@ channellist.foot_freq Tuning-Parameter channellist.foot_next Nachfolgesendung channellist.foot_off aus channellist.foot_sort_alpha Sortiert[alpha] +channellist.foot_sort_chnum Sortiert[nummer] channellist.foot_sort_freq Sortiert[freq] channellist.foot_sort_sat Sortiert[sat] channellist.head Alle Kanäle diff --git a/data/locale/english.locale b/data/locale/english.locale index eb24ddc23..cb537a192 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -211,6 +211,7 @@ channellist.foot_freq Sat/Freq Info channellist.foot_next next Event channellist.foot_off off channellist.foot_sort_alpha sorted[alpha] +channellist.foot_sort_chnum Sortiert[number] channellist.foot_sort_freq sorted[freq] channellist.foot_sort_sat sorted[sat] channellist.head All Services diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 92c7f50d3..eaf0a8bfb 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -223,6 +223,11 @@ void CChannelList::SortTP(void) sort(chanlist.begin(), chanlist.end(), CmpChannelByFreq()); } +void CChannelList::SortChNumber(void) +{ + sort(chanlist.begin(), chanlist.end(), CmpChannelByChNum()); +} + CZapitChannel* CChannelList::getChannel(int number) { for (uint32_t i=0; i< chanlist.size(); i++) { @@ -814,8 +819,8 @@ int CChannelList::show() int mode = CNeutrinoApp::getInstance()->GetChannelMode(); if(mode != LIST_MODE_FAV) { g_settings.channellist_sort_mode++; - if(g_settings.channellist_sort_mode > 2) - g_settings.channellist_sort_mode = 0; + if(g_settings.channellist_sort_mode > SORT_MAX-1) + g_settings.channellist_sort_mode = SORT_ALPHA; CNeutrinoApp::getInstance()->SetChannelMode(mode); paintHead(); // update button bar paint(); @@ -1631,7 +1636,7 @@ void CChannelList::paintButtonBar(bool is_current) struct button_label Button[num_buttons]; const neutrino_locale_t button_ids[] = {LOCALE_INFOVIEWER_NOW,LOCALE_INFOVIEWER_NEXT,LOCALE_MAINMENU_RECORDING,LOCALE_MAINMENU_RECORDING_STOP,NONEXISTANT_LOCALE, - LOCALE_CHANNELLIST_FOOT_SORT_ALPHA,LOCALE_CHANNELLIST_FOOT_SORT_FREQ,LOCALE_CHANNELLIST_FOOT_SORT_SAT}; + LOCALE_CHANNELLIST_FOOT_SORT_ALPHA,LOCALE_CHANNELLIST_FOOT_SORT_FREQ,LOCALE_CHANNELLIST_FOOT_SORT_SAT,LOCALE_CHANNELLIST_FOOT_SORT_CHNUM}; const std::vector buttonID_rest (button_ids, button_ids + sizeof(button_ids) / sizeof(neutrino_locale_t) ); for (int i = 0;iBouquets.size()); for (uint32_t i = 0; i < bouquetList->Bouquets.size(); i++) { - if(g_settings.channellist_sort_mode == 0) + if(g_settings.channellist_sort_mode == CChannelList::SORT_ALPHA) bouquetList->Bouquets[i]->channelList->SortAlpha(); - if(g_settings.channellist_sort_mode == 1) + if(g_settings.channellist_sort_mode == CChannelList::SORT_TP) bouquetList->Bouquets[i]->channelList->SortTP(); - if(g_settings.channellist_sort_mode == 2) + if(g_settings.channellist_sort_mode == CChannelList::SORT_SAT) bouquetList->Bouquets[i]->channelList->SortSat(); + if(g_settings.channellist_sort_mode == CChannelList::SORT_CH_NUMBER) + bouquetList->Bouquets[i]->channelList->SortChNumber(); } channelList->adjustToChannelID(channelList->getActiveChannel_ChannelID()); } diff --git a/src/system/locals.h b/src/system/locals.h index 6808a23f9..2a35ef6b2 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -238,6 +238,7 @@ typedef enum LOCALE_CHANNELLIST_FOOT_NEXT, LOCALE_CHANNELLIST_FOOT_OFF, LOCALE_CHANNELLIST_FOOT_SORT_ALPHA, + LOCALE_CHANNELLIST_FOOT_SORT_CHNUM, LOCALE_CHANNELLIST_FOOT_SORT_FREQ, LOCALE_CHANNELLIST_FOOT_SORT_SAT, LOCALE_CHANNELLIST_HEAD, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 47161f20e..905652f7f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -238,6 +238,7 @@ const char * locale_real_names[] = "channellist.foot_next", "channellist.foot_off", "channellist.foot_sort_alpha", + "channellist.foot_sort_chnum", "channellist.foot_sort_freq", "channellist.foot_sort_sat", "channellist.head",