From a41206902ff16b122889e7173ecd5c1c57b9715b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 21 Oct 2016 10:47:38 +0200 Subject: [PATCH] timerlist: auto-calculate TimerListButtonsCount Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9a9fc2097b6d4b8330c811e75ded9162cdb01bf3 Author: vanhofen Date: 2016-10-21 (Fri, 21 Oct 2016) Origin message was: ------------------ - timerlist: auto-calculate TimerListButtonsCount ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/timerlist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index a7ae8a3e5..346363342 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -563,17 +563,17 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) }*/ } -#define TimerListButtonsCount 7 -struct button_label TimerListButtons[TimerListButtonsCount] = +struct button_label TimerListButtons[] = { { NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERLIST_DELETE }, { NEUTRINO_ICON_BUTTON_GREEN , LOCALE_TIMERLIST_NEW }, { NEUTRINO_ICON_BUTTON_YELLOW , LOCALE_TIMERLIST_RELOAD }, { NEUTRINO_ICON_BUTTON_BLUE , LOCALE_TIMERLIST_MODIFY }, { NEUTRINO_ICON_BUTTON_INFO_SMALL, NONEXISTANT_LOCALE }, - { NEUTRINO_ICON_BUTTON_PLAY, NONEXISTANT_LOCALE }, - { NEUTRINO_ICON_BUTTON_MENU_SMALL, NONEXISTANT_LOCALE } + { NEUTRINO_ICON_BUTTON_MENU_SMALL, NONEXISTANT_LOCALE }, + { NEUTRINO_ICON_BUTTON_PLAY , NONEXISTANT_LOCALE } }; +size_t TimerListButtonsCount = sizeof(TimerListButtons)/sizeof(TimerListButtons[0]); #define RemoteBoxFooterButtonCount 3 static const struct button_label RemoteBoxFooterButtons[RemoteBoxFooterButtonCount] = {