int COsdLangSetup::exec(CMenuTarget* parent, const std::string & actionKey)
{
	dprintf(DEBUG_DEBUG, "init font setup\n");

	if(!actionKey.empty())
	{
		const char * locale = actionKey.c_str();
		strcpy(g_settings.language, locale);

		int unicode_locale = g_Locale->loadLocale(locale);
		if(CNeutrinoApp::getInstance()->ChangeFonts(unicode_locale))
		{
			parent->hide();
			return menu_return::RETURN_REPAINT;
		}
		else
			return menu_return::RETURN_NONE;
	}

	if(parent != NULL)
		parent->hide();

	int res = showSetup();
	
	return res;
}
int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &)
{
	if(parent != NULL)
		parent->hide();

	int res = showSetup();

	return res;
}
示例#3
0
int CDriverBootSetup::exec(CMenuTarget* parent, const std::string &)
{
	dprintf(DEBUG_DEBUG, "init driversettings\n");
	if(parent != NULL)
		parent->hide();

	showSetup();
	
	return menu_return::RETURN_REPAINT;	
}
示例#4
0
int CDriverBootSetup::exec(CMenuTarget* parent, const std::string &)
{
	dprintf(DEBUG_DEBUG, "init driversettings\n");
	if(parent != NULL)
		parent->hide();

	int res = showSetup();
	
	return res;
}
示例#5
0
文件: lcd_setup.cpp 项目: UkCvs/ukcvs
int CLcdSetup::exec(CMenuTarget* parent, const std::string &)
{
	dprintf(DEBUG_DEBUG, "init lcd setup\n");
	if(parent != NULL)
		parent->hide();

	showSetup();
	
	return menu_return::RETURN_REPAINT;	
}
示例#6
0
int COsdLangSetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
{
	dprintf(DEBUG_DEBUG, "init font setup\n");

	if(parent != NULL)
		parent->hide();

	showSetup();
	
	return menu_return::RETURN_REPAINT;	
}
示例#7
0
int CVfdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
{
	dprintf(DEBUG_DEBUG, "init lcd setup\n");
	if(parent != NULL)
		parent->hide();
	if(actionKey=="def")
	{
		brightness		= DEFAULT_VFD_BRIGHTNESS;
		brightnessstandby	= DEFAULT_VFD_STANDBYBRIGHTNESS;
		brightnessdeepstandby   = DEFAULT_VFD_STANDBYBRIGHTNESS;
		g_settings.lcd_setting_dim_brightness = 3;
		CVFD::getInstance()->setBrightness(brightness);
		CVFD::getInstance()->setBrightnessStandby(brightnessstandby);
		CVFD::getInstance()->setBrightnessDeepStandby(brightnessdeepstandby);
		return menu_return::RETURN_REPAINT;
	}

	int res = showSetup();

	return res;
}
int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &actionKey)
{
	if (actionKey == ">d") {
		int selected = ums->getSelected();
		if (selected >= item_offset) {
			if(parent)
				parent->hide();
			ums->removeItem(selected);
			ums->hide();
			return menu_return::RETURN_REPAINT;
		}
		return menu_return::RETURN_NONE;
	}

	if(parent)
		parent->hide();

	if (actionKey == ">a") {
		int selected = ums->getSelected();
		CMenuOptionStringChooser *c = new CMenuOptionStringChooser(std::string(""), NULL, true, NULL, CRCInput::RC_nokey, NULL, true);
		c->setOptions(options);
		std::string n(g_Locale->getText(LOCALE_USERMENU_ITEM_NONE));
		c->setOptionValue(n);
		if (selected >= item_offset)
			ums->insertItem(selected, c);
		else
			ums->addItem(c);
		ums->hide();
		return menu_return::RETURN_REPAINT;
	}

	int res = showSetup();
	checkButtonName();
	
	return res; 
}