Merge remote-tracking branch 'tuxbox/master'

* needs compile fixes
* needs additional tests, of course :-)


Origin commit data
------------------
Branch: ni/coolstream
Commit: 13ab1ebc8a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-10-22 (Sat, 22 Oct 2016)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2016-10-22 11:37:40 +02:00
346 changed files with 13372 additions and 6088 deletions

View File

@@ -47,6 +47,7 @@
#include "osd_progressbar_setup.h"
#include <gui/audiomute.h>
#include <gui/color_custom.h>
#include <gui/infoclock.h>
#include <gui/widget/icons.h>
#include <gui/widget/colorchooser.h>
@@ -102,7 +103,7 @@ COsdSetup::~COsdSetup()
}
//font settings
const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[5] =
const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[] =
{
SNeutrinoSettings::FONT_TYPE_CHANNELLIST,
SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR,
@@ -110,8 +111,9 @@ const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[5] =
SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT,
SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP
};
size_t channellist_font_items = sizeof(channellist_font_sizes)/sizeof(channellist_font_sizes[0]);
const SNeutrinoSettings::FONT_TYPES eventlist_font_sizes[5] =
const SNeutrinoSettings::FONT_TYPES eventlist_font_sizes[] =
{
SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE,
SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE,
@@ -119,52 +121,60 @@ const SNeutrinoSettings::FONT_TYPES eventlist_font_sizes[5] =
SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME,
SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT
};
size_t eventlist_font_items = sizeof(eventlist_font_sizes)/sizeof(eventlist_font_sizes[0]);
const SNeutrinoSettings::FONT_TYPES infobar_font_sizes[4] =
const SNeutrinoSettings::FONT_TYPES infobar_font_sizes[] =
{
SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER,
SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME,
SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO,
SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL
};
size_t infobar_font_items = sizeof(infobar_font_sizes)/sizeof(infobar_font_sizes[0]);
const SNeutrinoSettings::FONT_TYPES epg_font_sizes[4] =
const SNeutrinoSettings::FONT_TYPES epg_font_sizes[] =
{
SNeutrinoSettings::FONT_TYPE_EPG_TITLE,
SNeutrinoSettings::FONT_TYPE_EPG_INFO1,
SNeutrinoSettings::FONT_TYPE_EPG_INFO2,
SNeutrinoSettings::FONT_TYPE_EPG_DATE
};
size_t epg_font_items = sizeof(epg_font_sizes)/sizeof(epg_font_sizes[0]);
const SNeutrinoSettings::FONT_TYPES menu_font_sizes[4] =
const SNeutrinoSettings::FONT_TYPES menu_font_sizes[] =
{
SNeutrinoSettings::FONT_TYPE_MENU_TITLE,
SNeutrinoSettings::FONT_TYPE_MENU,
SNeutrinoSettings::FONT_TYPE_MENU_INFO,
SNeutrinoSettings::FONT_TYPE_MENU_FOOT,
SNeutrinoSettings::FONT_TYPE_MENU_HINT
};
const SNeutrinoSettings::FONT_TYPES other_font_sizes[2] =
size_t menu_font_items = sizeof(menu_font_sizes)/sizeof(menu_font_sizes[0]);
const SNeutrinoSettings::FONT_TYPES other_font_sizes[] =
{
SNeutrinoSettings::FONT_TYPE_SUBTITLES,
SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM
};
size_t other_font_items = sizeof(other_font_sizes)/sizeof(other_font_sizes[0]);
#define FONT_GROUP_COUNT 6
font_sizes_groups font_sizes_groups[FONT_GROUP_COUNT] =
font_sizes_groups font_sizes_groups[] =
{
{LOCALE_FONTMENU_MENU , 4, menu_font_sizes , "fontsize.dmen", LOCALE_MENU_HINT_MENU_FONTS },
{LOCALE_FONTMENU_CHANNELLIST, 5, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS },
{LOCALE_FONTMENU_EVENTLIST , 5, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS },
{LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS },
{LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS },
{LOCALE_FONTMENU_OTHER , 2, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_OTHER_FONTS }
{LOCALE_FONTMENU_MENU , menu_font_items , menu_font_sizes , "fontsize.dmen", LOCALE_MENU_HINT_MENU_FONTS },
{LOCALE_FONTMENU_CHANNELLIST, channellist_font_items, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS },
{LOCALE_FONTMENU_EVENTLIST , eventlist_font_items , eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS },
{LOCALE_FONTMENU_EPG , epg_font_items , epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS },
{LOCALE_FONTMENU_INFOBAR , infobar_font_items , infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS },
{LOCALE_FONTMENU_OTHER , other_font_items , other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_OTHER_FONTS }
};
#define FONT_GROUP_COUNT (sizeof(font_sizes_groups)/sizeof(font_sizes_groups[0]))
font_sizes_struct neutrino_font[SNeutrinoSettings::FONT_TYPE_COUNT] =
{
{LOCALE_FONTSIZE_MENU , 20, CNeutrinoFonts::FONT_STYLE_BOLD , 0},
{LOCALE_FONTSIZE_MENU_TITLE , 30, CNeutrinoFonts::FONT_STYLE_BOLD , 0},
{LOCALE_FONTSIZE_MENU_INFO , 16, CNeutrinoFonts::FONT_STYLE_REGULAR, 0},
{LOCALE_FONTSIZE_MENU_FOOT , 14, CNeutrinoFonts::FONT_STYLE_REGULAR, 1},
{LOCALE_FONTSIZE_EPG_TITLE , 25, CNeutrinoFonts::FONT_STYLE_REGULAR, 1},
{LOCALE_FONTSIZE_EPG_INFO1 , 17, CNeutrinoFonts::FONT_STYLE_ITALIC , 2},
{LOCALE_FONTSIZE_EPG_INFO2 , 17, CNeutrinoFonts::FONT_STYLE_REGULAR, 2},
@@ -276,7 +286,6 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
if ( msg == CRCInput::RC_ok ) {
loop = false;
memset(window_size_value, 0, sizeof(window_size_value));
snprintf(window_size_value, sizeof(window_size_value), "%d / %d", g_settings.window_width, g_settings.window_height);
mfWindowSize->setOption(window_size_value);
@@ -338,7 +347,7 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
return res;
}
else if(strncmp(actionKey.c_str(), "fontsize.d", 10) == 0) {
for (int i = 0; i < FONT_GROUP_COUNT; i++) {
for (unsigned int i = 0; i < FONT_GROUP_COUNT; i++) {
if (actionKey == font_sizes_groups[i].actionkey) {
for (unsigned int j = 0; j < font_sizes_groups[i].count; j++) {
SNeutrinoSettings::FONT_TYPES k = font_sizes_groups[i].content[j];
@@ -373,14 +382,14 @@ const CMenuOptionChooser::keyval INFOBAR_CASYSTEM_MODE_OPTIONS[INFOBAR_CASYSTEM_
{ 2, LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_MINI },
{ 3, LOCALE_OPTIONS_OFF },
};
#if 0 //not used
#define SHOW_INFOMENU_MODE_OPTION_COUNT 2
const CMenuOptionChooser::keyval SHOW_INFOMENU_MODE_OPTIONS[SHOW_INFOMENU_MODE_OPTION_COUNT] =
{
{ 0, LOCALE_MAINMENU_HEAD },
{ 1, LOCALE_MAINMENU_SERVICE },
};
#endif
#define MENU_CORNERSETTINGS_TYPE_OPTION_COUNT 2
const CMenuOptionChooser::keyval MENU_CORNERSETTINGS_TYPE_OPTIONS[MENU_CORNERSETTINGS_TYPE_OPTION_COUNT] =
{
@@ -450,7 +459,7 @@ const CMenuOptionChooser::keyval CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS[CHANNE
{ 0 , LOCALE_CHANNELLIST_EPGTEXT_ALIGN_LEFT },
{ 1 , LOCALE_CHANNELLIST_EPGTEXT_ALIGN_RIGHT }
};
#if 0 //not used
#define CHANNELLIST_EXTENDED_OPTIONS_COUNT 3
const CMenuOptionChooser::keyval CHANNELLIST_EXTENDED_OPTIONS[CHANNELLIST_EXTENDED_OPTIONS_COUNT]=
{
@@ -458,7 +467,7 @@ const CMenuOptionChooser::keyval CHANNELLIST_EXTENDED_OPTIONS[CHANNELLIST_EXTEND
{ 1, LOCALE_CHANNELLIST_EXTENDED_SIMPLE }, //unicolor
{ 2, LOCALE_CHANNELLIST_EXTENDED_COLORED } //colored
};
#endif
#define OPTIONS_COLORED_EVENTS_OPTION_COUNT 3
const CMenuOptionChooser::keyval OPTIONS_COLORED_EVENTS_OPTIONS[OPTIONS_COLORED_EVENTS_OPTION_COUNT] =
{
@@ -701,6 +710,10 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
&t.menu_Content_inactive_alpha, colorSetupNotifier);
CColorChooser* chContentInactiveTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &t.menu_Content_inactive_Text_red, &t.menu_Content_inactive_Text_green, &t.menu_Content_inactive_Text_blue,
NULL, colorSetupNotifier);
CColorChooser* chFootcolor = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &t.menu_Foot_red, &t.menu_Foot_green, &t.menu_Foot_blue,
&t.menu_Foot_alpha, colorSetupNotifier);
CColorChooser* chFootTextcolor = new CColorChooser(LOCALE_COLORMENU_TEXTCOLOR, &t.menu_Foot_Text_red, &t.menu_Foot_Text_green, &t.menu_Foot_Text_blue,
NULL, colorSetupNotifier);
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUHEAD));
@@ -760,6 +773,17 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
mf->setHint("", LOCALE_MENU_HINT_SELECTED_TEXT);
menu_colors->addItem(mf);
// footer
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUFOOT));
mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chFootcolor );
mf->setHint("", LOCALE_MENU_HINT_FOOT_BACK);
menu_colors->addItem(mf);
// footer text
mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chFootTextcolor );
mf->setHint("", LOCALE_MENU_HINT_FOOT_TEXTCOLOR);
menu_colors->addItem(mf);
// hintbox color gradient
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORTHEMEMENU_MENU_HINTS));
oj = new CMenuOptionChooser(LOCALE_COLOR_GRADIENT, &t.menu_Hint_gradient, OPTIONS_COL_GRADIENT_OPTIONS, OPTIONS_COL_GRADIENT_OPTIONS_COUNT, true);
@@ -904,7 +928,8 @@ public:
void COsdSetup::AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry)
{
font_Settings.addItem(new CMenuNumberInput(neutrino_font[number_of_fontsize_entry].name, neutrino_font[number_of_fontsize_entry].defaultsize, fontsizenotifier, CNeutrinoApp::getInstance()->getConfigFile()));
CMenuNumberInput *ni = new CMenuNumberInput(neutrino_font[number_of_fontsize_entry].name, neutrino_font[number_of_fontsize_entry].defaultsize, fontsizenotifier, CNeutrinoApp::getInstance()->getConfigFile());
font_Settings.addItem(ni);
}
//font settings menu
@@ -944,7 +969,7 @@ void COsdSetup::showOsdFontSizeSetup(CMenuWidget *menu_fonts)
//fontSettings->addItem( new CMenuForwarder(LOCALE_EPGPLUS_SELECT_FONT_NAME, true, NULL, this, "select_font"));
mn_widget_id_t w_index = MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU;
for (int i = 0; i < FONT_GROUP_COUNT; i++)
for (unsigned int i = 0; i < FONT_GROUP_COUNT; i++)
{
CMenuWidget *fontSettingsSubMenu = new CMenuWidget(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, w_index);
@@ -1020,7 +1045,6 @@ void COsdSetup::showOsdMenusSetup(CMenuWidget *menu_menus)
CMenuOptionChooser * mc;
submenu_menus->addIntroItems(LOCALE_SETTINGS_MENUS);
// menu position
mc = new CMenuOptionChooser(LOCALE_SETTINGS_MENU_POS, &g_settings.menu_pos, MENU_DISP_POS_OPTIONS, MENU_DISP_POS_OPTIONS_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_MENU_POS);
@@ -1211,6 +1235,11 @@ void COsdSetup::showOsdEventlistSetup(CMenuWidget *menu_eventlist)
mc = new CMenuOptionChooser(LOCALE_EVENTLIST_ADDITIONAL, &g_settings.eventlist_additional, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_EVENTLIST_ADDITIONAL);
menu_eventlist->addItem(mc);
// epgplus in eventlist
mc = new CMenuOptionChooser(LOCALE_EVENTLIST_EPGPLUS, &g_settings.eventlist_epgplus, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_EVENTLIST_EPGPLUS);
menu_eventlist->addItem(mc);
}
// volume