From 93ed1cbc2b1b28a6cc0b26dd53e5f10aa9a6d427 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 15 Apr 2013 21:37:43 +0200 Subject: [PATCH] auto-enumerate FONT_TYPE_COUNT instead of defining it Conflicts: src/system/settings.h Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5954735ed8f32fc93f3289e44bfa2e41f1465c86 Author: Stefan Seyfried Date: 2013-04-15 (Mon, 15 Apr 2013) ------------------ This commit was generated by Migit --- src/global.h | 2 +- src/gui/osd_setup.cpp | 2 +- src/system/settings.h | 51 ++++++++++++++++++++++--------------------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/global.h b/src/global.h index cd6a8499c..da997a295 100644 --- a/src/global.h +++ b/src/global.h @@ -87,7 +87,7 @@ NEUTRINO_CPP CTimerdClient *g_Timerd; NEUTRINO_CPP FBFontRenderClass *g_fontRenderer; -NEUTRINO_CPP Font * g_Font[FONT_TYPE_COUNT]; +NEUTRINO_CPP Font * g_Font[SNeutrinoSettings::FONT_TYPE_COUNT]; NEUTRINO_CPP Font * g_SignalFont; NEUTRINO_CPP CRCInput *g_RCInput; diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 73a108c99..7fffbf934 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -144,7 +144,7 @@ font_sizes_groups font_sizes_groups[6] = #define FONT_STYLE_BOLD 1 #define FONT_STYLE_ITALIC 2 -font_sizes_struct neutrino_font[FONT_TYPE_COUNT] = +font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] = { {LOCALE_FONTSIZE_MENU , 20, FONT_STYLE_BOLD , 0}, {LOCALE_FONTSIZE_MENU_TITLE , 30, FONT_STYLE_BOLD , 0}, diff --git a/src/system/settings.h b/src/system/settings.h index f7d16c9ec..983cb2c8e 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -481,32 +481,33 @@ struct SNeutrinoSettings // Font sizes -#define FONT_TYPE_COUNT 24 enum FONT_TYPES { - FONT_TYPE_MENU = 0, - FONT_TYPE_MENU_TITLE = 1, - FONT_TYPE_MENU_INFO = 2, - FONT_TYPE_EPG_TITLE = 3, - FONT_TYPE_EPG_INFO1 = 4, - FONT_TYPE_EPG_INFO2 = 5, - FONT_TYPE_EPG_DATE = 6, - FONT_TYPE_EVENTLIST_TITLE = 7, - FONT_TYPE_EVENTLIST_ITEMLARGE = 8, - FONT_TYPE_EVENTLIST_ITEMSMALL = 9, - FONT_TYPE_EVENTLIST_DATETIME = 10, - FONT_TYPE_GAMELIST_ITEMLARGE = 11, - FONT_TYPE_GAMELIST_ITEMSMALL = 12, - FONT_TYPE_CHANNELLIST = 13, - FONT_TYPE_CHANNELLIST_DESCR = 14, - FONT_TYPE_CHANNELLIST_NUMBER = 15, - FONT_TYPE_CHANNELLIST_EVENT = 16, - FONT_TYPE_CHANNEL_NUM_ZAP = 17, - FONT_TYPE_INFOBAR_NUMBER = 18, - FONT_TYPE_INFOBAR_CHANNAME = 19, - FONT_TYPE_INFOBAR_INFO = 20, - FONT_TYPE_INFOBAR_SMALL = 21, - FONT_TYPE_FILEBROWSER_ITEM = 22, - FONT_TYPE_MENU_HINT = 23 + FONT_TYPE_MENU = 0, + FONT_TYPE_MENU_TITLE, + FONT_TYPE_MENU_INFO, + FONT_TYPE_EPG_TITLE, + FONT_TYPE_EPG_INFO1, + FONT_TYPE_EPG_INFO2, + FONT_TYPE_EPG_DATE, + FONT_TYPE_EVENTLIST_TITLE, + FONT_TYPE_EVENTLIST_ITEMLARGE, + FONT_TYPE_EVENTLIST_ITEMSMALL, + FONT_TYPE_EVENTLIST_DATETIME, + FONT_TYPE_EVENTLIST_EVENT, + FONT_TYPE_GAMELIST_ITEMLARGE, + FONT_TYPE_GAMELIST_ITEMSMALL, + FONT_TYPE_CHANNELLIST, + FONT_TYPE_CHANNELLIST_DESCR, + FONT_TYPE_CHANNELLIST_NUMBER, + FONT_TYPE_CHANNELLIST_EVENT, + FONT_TYPE_CHANNEL_NUM_ZAP, + FONT_TYPE_INFOBAR_NUMBER, + FONT_TYPE_INFOBAR_CHANNAME, + FONT_TYPE_INFOBAR_INFO, + FONT_TYPE_INFOBAR_SMALL, + FONT_TYPE_FILEBROWSER_ITEM, + FONT_TYPE_MENU_HINT, + FONT_TYPE_COUNT }; // lcdd