diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 5251fe627..63387dc2e 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1319,13 +1319,24 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st // -- 2002-05-13 rasc // -const struct button_label EpgButtons[] = +#define EpgButtonsMax 4 +const struct button_label EpgButtons[][EpgButtonsMax] = { - { NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERBAR_RECORDEVENT }, - { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH }, - { NEUTRINO_ICON_BUTTON_INFO_SMALL , LOCALE_CHANNELLIST_ADDITIONAL }, - { NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT } - + { // full view + { NEUTRINO_ICON_BUTTON_RED, LOCALE_TIMERBAR_RECORDEVENT }, + { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH }, + { NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT }, + { NEUTRINO_ICON_BUTTON_INFO_SMALL, LOCALE_CHANNELLIST_ADDITIONAL } + }, + { // w/o followscreenings + { NEUTRINO_ICON_BUTTON_RED, LOCALE_TIMERBAR_RECORDEVENT }, + { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH }, + { NEUTRINO_ICON_BUTTON_INFO_SMALL, LOCALE_CHANNELLIST_ADDITIONAL } + }, + { // movieplayer mode + { NEUTRINO_ICON_BUTTON_RED, LOCALE_EPG_SAVING }, + { NEUTRINO_ICON_BUTTON_INFO_SMALL, LOCALE_CHANNELLIST_ADDITIONAL } + } }; void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info) @@ -1356,20 +1367,22 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info) adzap_button += " " + to_string(g_settings.adzap_zapBackPeriod / 60) + " "; adzap_button += g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE); } - if (!mp_info && g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) - ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 4:3, EpgButtons, aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 1); - else if (mp_info){ - const struct button_label Button[] = - { - { NEUTRINO_ICON_BUTTON_RED , LOCALE_EPG_SAVING }, - { NEUTRINO_ICON_BUTTON_INFO_SMALL , LOCALE_CHANNELLIST_ADDITIONAL } - }; - if (g_settings.tmdb_api_key != "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"){ - ::paintButtons(x , y, 0, 2, Button, aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, NULL, 1); - } - }else - ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 3:2, &EpgButtons[1], aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 0); - + bool tmdb = (g_settings.tmdb_api_key != "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + bool fscr = (has_follow_screenings && !call_fromfollowlist); + if (mp_info) + ::paintButtons(x, y, 0, tmdb ? 2 : 1, EpgButtons[2], aw, h); + else + { + int c = EpgButtonsMax; + if (!tmdb) + c--; // reduce tmdb button + if (!fscr) + c--; // reduce blue button + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) + ::paintButtons(x, y, 0, c, EpgButtons[fscr ? 0 : 1], aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 1); + else + ::paintButtons(x, y, 0, c, &EpgButtons[fscr ? 0 : 1][1], aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, adzap ? adzap_button.c_str() : NULL, 0); + } #if 0 // Button: Timer Record & Channelswitch if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF)