Merge remote-tracking branch 'check/next-cc'

compiles, nothing else.

Conflicts:
	configure.ac
	src/Makefile.am
	src/gui/Makefile.am
	src/gui/luainstance.cpp
	src/gui/luainstance.h
	src/gui/plugins.cpp
	src/gui/plugins.h
	src/gui/scan_setup.cpp
	src/gui/start_wizard.cpp
	src/gui/test_menu.cpp
	src/gui/user_menue.cpp
	src/gui/widget/hintboxext.cpp
	src/gui/widget/menue.cpp
	src/gui/widget/messagebox.cpp
	src/gui/widget/stringinput.cpp


Origin commit data
------------------
Branch: ni/coolstream
Commit: b414474323
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-01-23 (Thu, 23 Jan 2014)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2014-01-23 14:08:37 +01:00
92 changed files with 2474 additions and 1428 deletions

View File

@@ -232,42 +232,26 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
else if (actionKey == "font_scaling") {
int xre = g_settings.screen_xres;
int yre = g_settings.screen_yres;
char val_x[4] = {0};
char val_y[4] = {0};
snprintf(val_x,sizeof(val_x), "%03d",g_settings.screen_xres);
snprintf(val_y,sizeof(val_y), "%03d",g_settings.screen_yres);
CMenuWidget fontscale(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_FONTSCALE);
fontscale.addIntroItems(LOCALE_FONTMENU_SCALING);
CStringInput xres_count(LOCALE_FONTMENU_SCALING_X, val_x,50,200, 3, LOCALE_FONTMENU_SCALING, LOCALE_FONTMENU_SCALING_X_HINT2, "0123456789 ");
CMenuForwarder *m_x = new CMenuForwarder(LOCALE_FONTMENU_SCALING_X, true, val_x, &xres_count);
CMenuOptionNumberChooser* mc = new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_X, &g_settings.screen_xres, true, 50, 200, this);
mc->setNumericInput(true);
mc->setNumberFormat("%d%%");
fontscale.addItem(mc);
CStringInput yres_count(LOCALE_FONTMENU_SCALING_Y, val_y,50,200, 3, LOCALE_FONTMENU_SCALING, LOCALE_FONTMENU_SCALING_Y_HINT2, "0123456789 ");
CMenuForwarder *m_y = new CMenuForwarder(LOCALE_FONTMENU_SCALING_Y, true, val_y, &yres_count);
mc = new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_Y, &g_settings.screen_yres, true, 50, 200, this);
mc->setNumericInput(true);
mc->setNumberFormat("%d%%");
fontscale.addItem(mc);
fontscale.addItem(m_x);
fontscale.addItem(m_y);
res = fontscale.exec(NULL, "");
xre = atoi(val_x);
yre = atoi(val_y);
//fallback for min/max bugs ;)
if( xre < 50 || xre > 200 ){
xre = g_settings.screen_xres;
snprintf(val_x,sizeof(val_x), "%03d",g_settings.screen_xres);
}
if( yre < 50 || yre > 200 ){
yre = g_settings.screen_yres;
snprintf(val_y,sizeof(val_y), "%03d",g_settings.screen_yres);
}
if (xre != g_settings.screen_xres || yre != g_settings.screen_yres) {
printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", xre, yre);
g_settings.screen_xres = xre;
g_settings.screen_yres = yre;
printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", g_settings.screen_xres, g_settings.screen_yres);
CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT | CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT_INST);
}
//return menu_return::RETURN_REPAINT;
return res;
}
else if(actionKey=="window_size") {
@@ -739,36 +723,42 @@ private:
CChangeObserver * observer;
CConfigFile * configfile;
int32_t defaultvalue;
char value[11];
std::string value;
protected:
virtual const char * getOption(void)
{
sprintf(value, "%u", configfile->getInt32(locale_real_names[text], defaultvalue));
return value;
}
std::string getOption(fb_pixel_t * bgcol __attribute__((unused)) = NULL) {
return to_string(configfile->getInt32(locale_real_names[name], defaultvalue));
}
virtual bool changeNotify(const neutrino_locale_t OptionName, void * Data)
{
configfile->setInt32(locale_real_names[text], atoi(value));
return observer->changeNotify(OptionName, Data);
}
{
configfile->setInt32(locale_real_names[name], atoi(value.c_str()));
return observer->changeNotify(OptionName, Data);
}
public:
CMenuNumberInput(const neutrino_locale_t Text, const int32_t DefaultValue, CChangeObserver * const Observer, CConfigFile * const Configfile) : CMenuForwarder(Text, true, NULL, this)
{
observer = Observer;
configfile = Configfile;
defaultvalue = DefaultValue;
}
{
observer = Observer;
configfile = Configfile;
defaultvalue = DefaultValue;
}
int exec(CMenuTarget * parent, const std::string & action_Key)
{
CStringInput input(text, (char *)getOption(), 3, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2, "0123456789 ", this);
return input.exec(parent, action_Key);
}
{
value = getOption();
while (value.length() < 3)
value = " " + value;
CStringInput input(name, &value, 3, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2, "0123456789 ", this);
return input.exec(parent, action_Key);
}
std::string &getValue(void) {
value = getOption();
return value;
}
};
void COsdSetup::AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry)