From 6b008637240e1195b6845390cbf1732e749fefbc Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 1 Oct 2011 21:11:40 +0000 Subject: [PATCH] neutrino channellist: fix dynamic record button show matching button to modes record/stop/disable git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1722 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7db85cbb57323557206a6797ab176c8bdb20338e Author: Thilo Graf Date: 2011-10-01 (Sat, 01 Oct 2011) Origin message was: ------------------ *neutrino channellist: fix dynamic record button show matching button to modes record/stop/disable git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1722 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/channellist.cpp | 17 ++++++++++------- src/gui/channellist.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 773994e61..cfd8e5f27 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -583,7 +583,8 @@ int CChannelList::show() { printf("[neutrino channellist] start direct recording...\n"); CRecordManager::getInstance()->Record(chanlist[selected]->channel_id); - loop = false; + paint(); + loop=false; } } @@ -1770,22 +1771,24 @@ struct button_label SChannelListButtons[NUM_LIST_BUTTONS] = { NEUTRINO_ICON_BUTTON_RECORD_INACTIVE_16, NONEXISTANT_LOCALE} }; -void CChannelList::paintButtonBar(bool do_rec, bool is_current) +void CChannelList::paintButtonBar(bool is_current) { - printf("[neutrino channellist] %s...%d\n", __FUNCTION__, __LINE__); + printf("[neutrino channellist] %s...%d, liststart %d\n", __FUNCTION__, __LINE__, selected); - //default color buttons + //manage now/next button if (displayNext) SChannelListButtons[1].locale = LOCALE_INFOVIEWER_NOW; else SChannelListButtons[1].locale = LOCALE_INFOVIEWER_NEXT; //manage record button + bool do_record = CRecordManager::getInstance()->RecordingStatus(getActiveChannel_ChannelID()); + if (g_settings.recording_type != RECORDING_OFF && !displayNext){ - if (is_current && !do_rec){ + if (is_current && !do_record){ SChannelListButtons[3].locale = LOCALE_MAINMENU_RECORDING; SChannelListButtons[3].button = NEUTRINO_ICON_BUTTON_RECORD_ACTIVE_16; - }else if (do_rec){ + }else if (do_record){ SChannelListButtons[3].locale = LOCALE_MAINMENU_RECORDING_STOP; SChannelListButtons[3].button = NEUTRINO_ICON_BUTTON_STOP_16; }else{ @@ -1870,7 +1873,7 @@ void CChannelList::paintItem(int pos) frameBuffer->paintIcon(NEUTRINO_ICON_REC, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2); //paint buttons - paintButtonBar(do_rec, iscurrent); + paintButtonBar(iscurrent); int icon_space = r_icon_w+s_icon_w; diff --git a/src/gui/channellist.h b/src/gui/channellist.h index 6073badeb..c40715ce7 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -88,7 +88,7 @@ private: void paintItem(int pos); void paint(); void paintHead(); - void paintButtonBar(bool do_rec, bool is_current); + void paintButtonBar(bool is_current); void hide(); void showChannelLogo();