From 72fd77bb5f11f62dafd9274ad7ce87eae627c898 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 15 Feb 2013 22:55:45 +0100 Subject: [PATCH] Revert "- channellist.cpp: enable to lock new_zap_mode" This reverts commit 8b1b3b1418e83e3982a43508b554de0eb831067b because the display of infobar while zapping is broken with this commit. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fb892d18ff25d45c3757b007244a5592d57f351e Author: vanhofen Date: 2013-02-15 (Fri, 15 Feb 2013) ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 3 --- data/locale/english.locale | 3 --- src/gui/channellist.cpp | 26 ++++++++++---------------- src/gui/channellist.h | 3 ++- src/gui/miscsettings_menu.cpp | 9 +-------- src/system/locals.h | 3 --- src/system/locals_intern.h | 3 --- 7 files changed, 13 insertions(+), 37 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index abbe56b57..21aefc8db 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -225,9 +225,6 @@ channellist.make_hdlist Erzeuge Bouquet mit HD-Kanälen channellist.make_newlist Erzeuge Bouquet mit neuen Kanälen channellist.make_removedlist Erzeuge Bouquet mit gelöschten Kanälen channellist.new_zap_mode Quickzap in Liste -channellist.new_zap_mode_active aktiv -channellist.new_zap_mode_allow erlauben -channellist.new_zap_mode_off aus channellist.nonefound Es wurden keine Kanäle gefunden!\nFühren Sie bitte eine Kanalsuche durch\n(MENU-Taste -> Service) channellist.provs Anbieter channellist.recording_not_possible Aufnahme nicht möglich! diff --git a/data/locale/english.locale b/data/locale/english.locale index f4405d184..e731c32ba 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -225,9 +225,6 @@ channellist.make_hdlist Create list of HD channels channellist.make_newlist Create list of new channels channellist.make_removedlist Create list of removed channels channellist.new_zap_mode Quickzap in list -channellist.new_zap_mode_active active -channellist.new_zap_mode_allow allow -channellist.new_zap_mode_off off channellist.nonefound No channels were found!\nPlease execute a scan\n(MENU-key -> service) channellist.provs Providers channellist.recording_not_possible Recording not possible! diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 1967f4cce..76c77e4fa 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -96,7 +96,7 @@ extern cVideo * videoDecoder; #define ConnectLineBox_Width 16 -CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist) +CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vlist, bool ) { frameBuffer = CFrameBuffer::getInstance(); name = pName; @@ -108,6 +108,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl this->historyMode = phistoryMode; vlist = _vlist; selected_chid = 0; + this->new_mode_active = false; footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; //initial height value for buttonbar previous_channellist_additional = -1; eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT; @@ -540,7 +541,7 @@ bool CChannelList::updateSelection(int newpos) showChannelLogo(); } - if((g_settings.channellist_new_zap_mode == 2 /* active */) && SameTP()) { + if(this->new_mode_active && SameTP()) { actzap = true; zapTo(selected); } @@ -564,6 +565,8 @@ int CChannelList::show() return res; } + this->new_mode_active = 0; + calcSize(); displayNext = false; @@ -776,17 +779,7 @@ int CChannelList::show() } else if (( msg == CRCInput::RC_spkr ) && g_settings.channellist_new_zap_mode ) { if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) { - switch (g_settings.channellist_new_zap_mode) { - case 2: /* active */ - g_settings.channellist_new_zap_mode = 1; /* allow */ - break; - case 1: /* allow */ - g_settings.channellist_new_zap_mode = 2; /* active */ - break; - default: - break; - - } + this->new_mode_active = (this->new_mode_active ? 0 : 1); paintHead(); showChannelLogo(); } @@ -909,6 +902,7 @@ int CChannelList::show() res = bouquetList->exec(true); printf("CChannelList:: bouquetList->exec res %d\n", res); } + this->new_mode_active = 0; if(NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode()) return -1; @@ -1159,7 +1153,7 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */) zapToChannel(chan); tuned = pos; - if(g_settings.channellist_new_zap_mode == 2 /* active */) + if(this->new_mode_active) selected_in_new_mode = pos; else selected = pos; @@ -1195,7 +1189,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel) g_RemoteControl->zapTo_ChannelID(channel->getChannelID(), channel->getName(), !channel->bAlwaysLocked); CNeutrinoApp::getInstance()->channelList->adjustToChannelID(channel->getChannelID()); } - if(g_settings.channellist_new_zap_mode != 2 /* not active */) { + if(!this->new_mode_active) { /* remove recordModeActive from infobar */ if(g_settings.auto_timeshift && !CNeutrinoApp::getInstance()->recordingstatus) { g_InfoViewer->handleMsg(NeutrinoMessages::EVT_RECORDMODE, 0); @@ -2002,7 +1996,7 @@ void CChannelList::paintHead() frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + full_width - iw1 - 10, y, theight); //y+ 5 ); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_MENU, x + full_width - iw1 - iw2 - 14, y, theight);//y + 5); // icon for bouquet list button if (g_settings.channellist_new_zap_mode) - frameBuffer->paintIcon((g_settings.channellist_new_zap_mode == 2 /* active */) ? + frameBuffer->paintIcon(this->new_mode_active ? NEUTRINO_ICON_BUTTON_MUTE_ZAP_ACTIVE : NEUTRINO_ICON_BUTTON_MUTE_ZAP_INACTIVE, x + full_width - iw1 - iw2 - iw3 - 18, y, theight); diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 7fa9e8ed0..248f3c6cb 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -93,6 +93,7 @@ private: bool displayList; int info_height; + bool new_mode_active; int ChannelList_Rec; void paintDetails(int index); @@ -119,7 +120,7 @@ private: void processTextToArray(std::string text, int screening = 0); public: - CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false); + CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false, bool new_mode_active = false ); ~CChannelList(); void SetChannelList(ZapitChannelList* channels); diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index 97f6b0214..9cb4d2692 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -134,13 +134,6 @@ const CMenuOptionChooser::keyval MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTIONS[MISCSET { 1, LOCALE_FILESYSTEM_IS_UTF8_OPTION_UTF8 } }; -#define CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT 3 -const CMenuOptionChooser::keyval CHANNELLIST_NEW_ZAP_MODE_OPTIONS[CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT] = -{ - { 0, LOCALE_CHANNELLIST_NEW_ZAP_MODE_OFF }, - { 1, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ALLOW }, - { 2, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE } -}; #ifdef CPU_FREQ #define CPU_FREQ_OPTION_COUNT 13 @@ -399,7 +392,7 @@ void CMiscMenue::showMiscSettingsMenuChanlist(CMenuWidget *ms_chanlist) mc->setHint("", LOCALE_MENU_HINT_ZAP_CYCLE); ms_chanlist->addItem(mc); - mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_NEW_ZAP_MODE, &g_settings.channellist_new_zap_mode, CHANNELLIST_NEW_ZAP_MODE_OPTIONS, CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT, true ); + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_NEW_ZAP_MODE, &g_settings.channellist_new_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true ); mc->setHint("", LOCALE_MENU_HINT_NEW_ZAP_MODE); ms_chanlist->addItem(mc); } diff --git a/src/system/locals.h b/src/system/locals.h index 38203a667..48a6f1c1f 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -252,9 +252,6 @@ typedef enum LOCALE_CHANNELLIST_MAKE_NEWLIST, LOCALE_CHANNELLIST_MAKE_REMOVEDLIST, LOCALE_CHANNELLIST_NEW_ZAP_MODE, - LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE, - LOCALE_CHANNELLIST_NEW_ZAP_MODE_ALLOW, - LOCALE_CHANNELLIST_NEW_ZAP_MODE_OFF, LOCALE_CHANNELLIST_NONEFOUND, LOCALE_CHANNELLIST_PROVS, LOCALE_CHANNELLIST_RECORDING_NOT_POSSIBLE, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index a712c50d2..ee4f87d9d 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -252,9 +252,6 @@ const char * locale_real_names[] = "channellist.make_newlist", "channellist.make_removedlist", "channellist.new_zap_mode", - "channellist.new_zap_mode_active", - "channellist.new_zap_mode_allow", - "channellist.new_zap_mode_off", "channellist.nonefound", "channellist.provs", "channellist.recording_not_possible",