mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
gui/keybind_setup: use CMenuOptionNumberChooser instead of CStringInput
This commit is contained in:
@@ -236,22 +236,22 @@ int CKeybindSetup::showKeySetup()
|
||||
keySettings->addItem(mf);
|
||||
|
||||
//rc tuning
|
||||
CStringInput keySettings_repeat_genericblocker(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, g_settings.repeat_genericblocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", this);
|
||||
CStringInput keySettings_repeatBlocker(LOCALE_KEYBINDINGMENU_REPEATBLOCK, g_settings.repeat_blocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", this);
|
||||
|
||||
keySettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_RC));
|
||||
if (RC_HW_SELECT) {
|
||||
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_KEY_HARDWARE);
|
||||
keySettings->addItem(mc);
|
||||
}
|
||||
mf = new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, &keySettings_repeatBlocker);
|
||||
mf->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCK);
|
||||
keySettings->addItem(mf);
|
||||
CMenuOptionNumberChooser *cc;
|
||||
cc = new CMenuOptionNumberChooser(LOCALE_KEYBINDINGMENU_REPEATBLOCK,
|
||||
&g_settings.repeat_blocker, true, 0, 999);
|
||||
cc->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCK);
|
||||
keySettings->addItem(cc);
|
||||
|
||||
mf = new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, &keySettings_repeat_genericblocker);
|
||||
mf->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCKGENERIC);
|
||||
keySettings->addItem(mf);
|
||||
cc = new CMenuOptionNumberChooser(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC,
|
||||
&g_settings.repeat_genericblocker, true, 0, 999);
|
||||
cc->setHint("", LOCALE_MENU_HINT_KEY_REPEATBLOCKGENERIC);
|
||||
keySettings->addItem(cc);
|
||||
|
||||
int res = keySettings->exec(NULL, "");
|
||||
|
||||
@@ -430,8 +430,8 @@ bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* d
|
||||
{
|
||||
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC) ||
|
||||
ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_REPEATBLOCK)) {
|
||||
unsigned int fdelay = atoi(g_settings.repeat_blocker);
|
||||
unsigned int xdelay = atoi(g_settings.repeat_genericblocker);
|
||||
unsigned int fdelay = g_settings.repeat_blocker;
|
||||
unsigned int xdelay = g_settings.repeat_genericblocker;
|
||||
|
||||
g_RCInput->repeat_block = fdelay * 1000;
|
||||
g_RCInput->repeat_block_generic = xdelay * 1000;
|
||||
|
@@ -430,7 +430,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
strncpy(g_settings.pref_subs[i], configfile.getString(cfg_key, "none").c_str(), 30);
|
||||
}
|
||||
g_settings.zap_cycle = configfile.getInt32( "zap_cycle", 0 );
|
||||
strcpy( g_settings.audio_PCMOffset, configfile.getString( "audio_PCMOffset", "0" ).c_str() );
|
||||
|
||||
//vcr
|
||||
g_settings.vcr_AutoSwitch = configfile.getBool("vcr_AutoSwitch" , true );
|
||||
@@ -938,7 +937,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
sprintf(cfg_key, "pref_subs_%d", i);
|
||||
configfile.setString(cfg_key, g_settings.pref_subs[i]);
|
||||
}
|
||||
configfile.setString( "audio_PCMOffset", g_settings.audio_PCMOffset );
|
||||
|
||||
//vcr
|
||||
configfile.setBool("vcr_AutoSwitch" , g_settings.vcr_AutoSwitch );
|
||||
@@ -2538,11 +2536,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
struct timeval endtime;
|
||||
time_t seconds;
|
||||
|
||||
int timeout = 0;
|
||||
int timeout1 = 0;
|
||||
|
||||
sscanf(g_settings.repeat_blocker, "%d", &timeout);
|
||||
sscanf(g_settings.repeat_genericblocker, "%d", &timeout1);
|
||||
int timeout = g_settings.repeat_blocker;
|
||||
int timeout1 = g_settings.repeat_genericblocker;
|
||||
|
||||
if (timeout1 > timeout)
|
||||
timeout = timeout1;
|
||||
@@ -3857,8 +3852,8 @@ void CNeutrinoApp::loadKeys(const char * fname)
|
||||
g_settings.menu_left_exit = tconfig.getInt32( "menu_left_exit", 0 );
|
||||
g_settings.audio_run_player = tconfig.getInt32( "audio_run_player", 1 );
|
||||
g_settings.key_click = tconfig.getInt32( "key_click", 1 );
|
||||
strcpy(g_settings.repeat_blocker, tconfig.getString("repeat_blocker", "150").c_str());
|
||||
strcpy(g_settings.repeat_genericblocker, tconfig.getString("repeat_genericblocker", "100").c_str());
|
||||
g_settings.repeat_blocker = tconfig.getInt32("repeat_blocker", 150);
|
||||
g_settings.repeat_genericblocker = tconfig.getInt32("repeat_genericblocker", 100);
|
||||
|
||||
g_settings.bouquetlist_mode = tconfig.getInt32( "bouquetlist_mode", 0 );
|
||||
g_settings.sms_channel = tconfig.getInt32( "sms_channel", 0 );
|
||||
@@ -3924,8 +3919,8 @@ void CNeutrinoApp::saveKeys(const char * fname)
|
||||
tconfig.setInt32( "menu_left_exit", g_settings.menu_left_exit );
|
||||
tconfig.setInt32( "audio_run_player", g_settings.audio_run_player );
|
||||
tconfig.setInt32( "key_click", g_settings.key_click );
|
||||
tconfig.setString( "repeat_blocker", g_settings.repeat_blocker );
|
||||
tconfig.setString( "repeat_genericblocker", g_settings.repeat_genericblocker );
|
||||
tconfig.setInt32( "repeat_blocker", g_settings.repeat_blocker );
|
||||
tconfig.setInt32( "repeat_genericblocker", g_settings.repeat_genericblocker );
|
||||
|
||||
tconfig.setInt32( "bouquetlist_mode", g_settings.bouquetlist_mode );
|
||||
tconfig.setInt32( "sms_channel", g_settings.sms_channel );
|
||||
|
@@ -100,7 +100,6 @@ struct SNeutrinoSettings
|
||||
int audio_DolbyDigital;
|
||||
int auto_lang;
|
||||
int auto_subs;
|
||||
char audio_PCMOffset[3];
|
||||
int srs_enable;
|
||||
int srs_algo;
|
||||
int srs_ref_volume;
|
||||
@@ -458,8 +457,8 @@ struct SNeutrinoSettings
|
||||
int channellist_new_zap_mode;
|
||||
int channellist_sort_mode;
|
||||
int channellist_numeric_adjust;
|
||||
char repeat_blocker[4];
|
||||
char repeat_genericblocker[4];
|
||||
int repeat_blocker;
|
||||
int repeat_genericblocker;
|
||||
int remote_control_hardware;
|
||||
int audiochannel_up_down_enable;
|
||||
|
||||
|
Reference in New Issue
Block a user