keybind_setup: add possibility to disable/enable some special keys

Origin commit data
------------------
Branch: ni/coolstream
Commit: ea66aaaf8f
Author: tomworld <atzeworld@msn.com>
Date: 2013-07-12 (Fri, 12 Jul 2013)

Origin message was:
------------------
- keybind_setup: add possibility to disable/enable some special keys

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
tomworld
2013-07-12 15:50:30 +02:00
committed by vanhofen
parent f8772bfa30
commit 1bca8a26ce
9 changed files with 76 additions and 4 deletions

View File

@@ -368,8 +368,11 @@ extra.fec_s2_qpsk_7_8 7/8 S2_QPSK
extra.fec_s2_qpsk_8_9 8/9 S2_QPSK
extra.fec_s2_qpsk_9_10 9/10 S2_QPSK
extra.key_current_transponder Aktuelle Transponder Taste
extra.key_format_mode Videoformat
extra.key_list_end Listenende
extra.key_list_start Listenanfang
extra.key_pic_mode Bildschirmformat
extra.key_pic_size 4:3 Anzeigeverhalten
extra.key_pip_close Stop/Start PiP
extra.key_pip_setup PiP Konfiguration
extra.key_pip_swap Umschalten PiP/live
@@ -654,6 +657,7 @@ keybindingmenu.remotecontrol_hardware_tripledragon Triple Dragon
keybindingmenu.repeatblock Anfangsverzögerung
keybindingmenu.repeatblockgeneric Wiederholungsverzögerung
keybindingmenu.sort Sortierreihenfolge ändern
keybindingmenu_special_active Sondertasten
keybindingmenu.subchanneldown Unterkanal zurück
keybindingmenu.subchannelup Unterkanal weiter
keybindingmenu.tvradiomode Fernseh-/Radio-Modus
@@ -843,6 +847,7 @@ menu.hint_key_channel_sms Wenn es aktiviert ist, können Sie die Nummern-Tasten
menu.hint_key_channeldown Weisen Sie eine Taste für das Herunterschalten in der Kanalliste zu
menu.hint_key_channellist Konfigurieren Sie die Tastenbelegung für die Kanalliste
menu.hint_key_channelup Weisen Sie eine Taste für das Hochschalten in der Kanalliste zu
menu.hint_key_format_mode_active Die Taste für das Videoformat deaktivieren/aktivieren
menu.hint_key_hardware Definieren Sie, welche Fernbedienung Sie verwenden möchten. Die Bestätigung erfolgt mit der Ausgewählten
menu.hint_key_history Definieren Sie eine Taste für das Anzeigen der letzten Programme, die Sie schauten
menu.hint_key_lastchannel Definieren Sie eine Taste, die in den vorher eingestellten Kanal zurückschaltet
@@ -865,6 +870,8 @@ menu.hint_key_mptime Weisen Sie eine Taste für die Restzeitanzeige ihrer Aufnah
menu.hint_key_mptimeshift Weisen Sie eine Taste für das Starten von Timeshift zu
menu.hint_key_pagedown Weisen Sie eine Taste für das Herunterblättern zu
menu.hint_key_pageup Weisen Sie eine Taste für das Hochblättern zu
menu.hint_key_pic_mode_active Die Taste für das Bildschirmformat deaktivieren/aktivieren
menu.hint_key_pic_size_active Die Taste für das 4:3 Anzeigeverhalten deaktivieren/aktivieren
menu.hint_key_pip_close Tastenzuordnung für Stop PiP oder Start mit aktuellem Kanal
menu.hint_key_pip_setup Tastenzuordnung für PiP Konfiguration
menu.hint_key_pip_swap Tastenzuordnung zum Umschalten PiP und aktuellem Kanal
@@ -876,6 +883,7 @@ menu.hint_key_right Wählen Sie die Funktion für die Tasten 'links' und 'rechts
menu.hint_key_save Speichern Sie Ihre Tastenbelegungen in einer Datei ab
menu.hint_key_screenshot Weisen Sie eine Taste zu, um Menü- und/oder TV-Screenshots zu speichern
menu.hint_key_sort Weisen Sie eine Taste für das Sortieren in der Kanalliste zu
menu.hint_key_special_active Deaktivieren oder aktivieren einiger Sondertasten
menu.hint_key_subchanneldown Weisen Sie eine Taste für das Zurückschalten in den Unterkanälen zu
menu.hint_key_subchannelup Weisen Sie eine Taste für das Weiterschalten in den Unterkanälen zu
menu.hint_key_transponder Weisen Sie eine Taste für das Anzeigen der Transponder in der Kanalliste zu

View File

@@ -368,8 +368,11 @@ extra.fec_s2_qpsk_7_8 7/8 s2 qpsk
extra.fec_s2_qpsk_8_9 8/9 s2 qpsk
extra.fec_s2_qpsk_9_10 9/10 s2 qpsk
extra.key_current_transponder Current Transponder Key
extra.key_format_mode Video format
extra.key_list_end end
extra.key_list_start home
extra.key_pic_mode Screen format
extra.key_pic_size 4:3 Display behavior
extra.key_pip_close Stop/Start PiP
extra.key_pip_setup Configure PiP
extra.key_pip_swap Swap PiP/live
@@ -654,6 +657,7 @@ keybindingmenu.remotecontrol_hardware_tripledragon Triple Dragon
keybindingmenu.repeatblock generic delay
keybindingmenu.repeatblockgeneric repeat delay
keybindingmenu.sort change sort order
keybindingmenu_special_active Special Keys
keybindingmenu.subchanneldown subchannel down
keybindingmenu.subchannelup subchannel up
keybindingmenu.tvradiomode TV/Radio-mode
@@ -843,6 +847,7 @@ menu.hint_key_channel_sms If enabled, numeric buttons in channel list\nused to s
menu.hint_key_channeldown Assign button for fast switch to previous\nchannel in channel list
menu.hint_key_channellist Configure keybingdings for channel list
menu.hint_key_channelup Assign button for fast switch to next\nchannel in channel list
menu.hint_key_format_mode_active Disable/enable key for the video format conversion
menu.hint_key_hardware Change remote control type
menu.hint_key_history Assign button to show channel\nchannel switch history
menu.hint_key_lastchannel Assign button for fast zap to\nprevious channel in history
@@ -865,6 +870,8 @@ menu.hint_key_mptime Assign button to show play time\nleft time
menu.hint_key_mptimeshift Assign button to start timeshift
menu.hint_key_pagedown Assign button to show next items page
menu.hint_key_pageup Assign button to show previous items page
menu.hint_key_pic_mode_active Disable/enable key for the screen format
menu.hint_key_pic_size_active Disable/enable key for the 4:3 display behavior
menu.hint_key_pip_close Assign button to stop PiP\nor start it for current channel
menu.hint_key_pip_setup Assign button to configure PiP
menu.hint_key_pip_swap Assign button to swap PiP and live channel
@@ -876,6 +883,7 @@ menu.hint_key_right Select 'right' function in live TV/Radio mode
menu.hint_key_save Save keybindings to file
menu.hint_key_screenshot Assign button to save GUI and/or TV screenshot
menu.hint_key_sort Assign button to change channel list sort order
menu.hint_key_special_active Disable or enable some special keys
menu.hint_key_subchanneldown Assign button for fast switch\n to previous subchannel
menu.hint_key_subchannelup Assign button for fast switch\n to next subchannel
menu.hint_key_transponder Assign button to show channel list\nfor current transponder

View File

@@ -188,7 +188,10 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] =
{LOCALE_EXTRA_KEY_SCREENSHOT, &g_settings.key_screenshot, LOCALE_MENU_HINT_KEY_SCREENSHOT },
{LOCALE_EXTRA_KEY_PIP_CLOSE, &g_settings.key_pip_close, LOCALE_MENU_HINT_KEY_PIP_CLOSE },
{LOCALE_EXTRA_KEY_PIP_SETUP, &g_settings.key_pip_setup, LOCALE_MENU_HINT_KEY_PIP_SETUP },
{LOCALE_EXTRA_KEY_PIP_SWAP, &g_settings.key_pip_swap, LOCALE_MENU_HINT_KEY_PIP_CLOSE }
{LOCALE_EXTRA_KEY_PIP_SWAP, &g_settings.key_pip_swap, LOCALE_MENU_HINT_KEY_PIP_CLOSE },
{LOCALE_EXTRA_KEY_FORMAT_MODE, &g_settings.key_format_mode_active, LOCALE_MENU_HINT_KEY_FORMAT_MODE_ACTIVE },
{LOCALE_EXTRA_KEY_PIC_MODE, &g_settings.key_pic_mode_active, LOCALE_MENU_HINT_KEY_PIC_MODE_ACTIVE },
{LOCALE_EXTRA_KEY_PIC_SIZE, &g_settings.key_pic_size_active, LOCALE_MENU_HINT_KEY_PIC_SIZE_ACTIVE }
};
@@ -269,6 +272,8 @@ int CKeybindSetup::showKeySetup()
void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings)
{
int shortcut = 1;
CMenuForwarder * mf;
bindSettings->addIntroItems(LOCALE_KEYBINDINGMENU_HEAD);
@@ -307,6 +312,14 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings)
//misc
bindSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_MISC));
//bindSettings->addItem(new CMenuDForwarder(keydescription[KEY_PLUGIN], true, NULL, keychooser[KEY_PLUGIN]));
//Special keys
CMenuWidget* bindSettings_special = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_SPECIAL);
showKeyBindSpecialSetup(bindSettings_special);
mf = new CMenuDForwarder(LOCALE_KEYBINDINGMENU_SPECIAL_ACTIVE, true, NULL, bindSettings_special, NULL, CRCInput::convertDigitToKey(shortcut++));
mf->setHint("", LOCALE_MENU_HINT_KEY_SPECIAL_ACTIVE);
bindSettings->addItem(mf);
// unlock
mf = new CMenuDForwarder(key_settings[KEY_UNLOCK].keydescription, true, keychooser[KEY_UNLOCK]->getKeyName(), keychooser[KEY_UNLOCK]);
mf->setHint("", key_settings[KEY_UNLOCK].hint);
@@ -400,6 +413,17 @@ void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplaye
}
}
void CKeybindSetup::showKeyBindSpecialSetup(CMenuWidget *bindSettings_special)
{
bindSettings_special->addIntroItems(LOCALE_KEYBINDINGMENU_SPECIAL_ACTIVE);
for (int i = KEY_FORMAT_MODE; i <= KEY_PIC_SIZE; i++) {
CMenuOptionChooser * mf = new CMenuOptionChooser(key_settings[i].keydescription, key_settings[i].keyvalue_p, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
mf->setHint("", key_settings[i].hint);
bindSettings_special->addItem(mf);
}
}
bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* data */)
{
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC) ||

View File

@@ -80,6 +80,9 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver
KEY_PIP_CLOSE,
KEY_PIP_SETUP,
KEY_PIP_SWAP,
KEY_FORMAT_MODE,
KEY_PIC_MODE,
KEY_PIC_SIZE,
KEYBINDS_COUNT
};
@@ -95,6 +98,7 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver
void showKeyBindChannellistSetup(CMenuWidget *bindSettings_chlist);
void showKeyBindQuickzapSetup(CMenuWidget *bindSettings_qzap);
void showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplayer);
void showKeyBindSpecialSetup(CMenuWidget *bindSettings_special);
public:
CKeybindSetup();

View File

@@ -2582,15 +2582,15 @@ _repeat:
audioDecoder->EnableAnalogOut(false);
return messages_return::handled;
}
else if( msg == CRCInput::RC_mode ) {
else if(( msg == CRCInput::RC_mode ) && g_settings.key_format_mode_active ) {
g_videoSettings->nextMode();
return messages_return::handled;
}
else if( msg == CRCInput::RC_next ) {
else if(( msg == CRCInput::RC_next ) && g_settings.key_pic_size_active ) {
g_videoSettings->next43Mode();
return messages_return::handled;
}
else if( msg == CRCInput::RC_prev ) {
else if(( msg == CRCInput::RC_prev ) && g_settings.key_pic_mode_active ) {
g_videoSettings->SwitchFormat();
return messages_return::handled;
}
@@ -3748,6 +3748,10 @@ void CNeutrinoApp::loadKeys(const char * fname)
g_settings.mpkey_plugin = tconfig.getInt32( "mpkey.plugin", CRCInput::RC_red );
g_settings.mpkey_subtitle = tconfig.getInt32( "mpkey.subtitle", CRCInput::RC_sub );
g_settings.key_format_mode_active = tconfig.getInt32( "key_format_mode_active", 1 );
g_settings.key_pic_mode_active = tconfig.getInt32( "key_pic_mode_active", 1 );
g_settings.key_pic_size_active = tconfig.getInt32( "key_pic_size_active", 1 );
/* options */
g_settings.menu_left_exit = tconfig.getInt32( "menu_left_exit", 0 );
g_settings.audio_run_player = tconfig.getInt32( "audio_run_player", 1 );
@@ -3812,6 +3816,10 @@ void CNeutrinoApp::saveKeys(const char * fname)
tconfig.setInt32( "mpkey.plugin", g_settings.mpkey_plugin );
tconfig.setInt32( "mpkey.subtitle", g_settings.mpkey_subtitle );
tconfig.setInt32( "key_format_mode_active", g_settings.key_format_mode_active );
tconfig.setInt32( "key_pic_mode_active", g_settings.key_pic_mode_active );
tconfig.setInt32( "key_pic_size_active", g_settings.key_pic_size_active );
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 );

View File

@@ -99,6 +99,7 @@ enum MN_WIDGET_ID
MN_WIDGET_ID_KEYSETUP_KEYBINDING_CHANNELLIST,
MN_WIDGET_ID_KEYSETUP_KEYBINDING_QUICKZAP,
MN_WIDGET_ID_KEYSETUP_KEYBINDING_MOVIEPLAYER,
MN_WIDGET_ID_KEYSETUP_KEYBINDING_SPECIAL,
//picture viewer setup
MN_WIDGET_ID_PVIEWERSETUP,

View File

@@ -395,8 +395,11 @@ typedef enum
LOCALE_EXTRA_FEC_S2_QPSK_8_9,
LOCALE_EXTRA_FEC_S2_QPSK_9_10,
LOCALE_EXTRA_KEY_CURRENT_TRANSPONDER,
LOCALE_EXTRA_KEY_FORMAT_MODE,
LOCALE_EXTRA_KEY_LIST_END,
LOCALE_EXTRA_KEY_LIST_START,
LOCALE_EXTRA_KEY_PIC_MODE,
LOCALE_EXTRA_KEY_PIC_SIZE,
LOCALE_EXTRA_KEY_PIP_CLOSE,
LOCALE_EXTRA_KEY_PIP_SETUP,
LOCALE_EXTRA_KEY_PIP_SWAP,
@@ -681,6 +684,7 @@ typedef enum
LOCALE_KEYBINDINGMENU_REPEATBLOCK,
LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC,
LOCALE_KEYBINDINGMENU_SORT,
LOCALE_KEYBINDINGMENU_SPECIAL_ACTIVE,
LOCALE_KEYBINDINGMENU_SUBCHANNELDOWN,
LOCALE_KEYBINDINGMENU_SUBCHANNELUP,
LOCALE_KEYBINDINGMENU_TVRADIOMODE,
@@ -870,6 +874,7 @@ typedef enum
LOCALE_MENU_HINT_KEY_CHANNELDOWN,
LOCALE_MENU_HINT_KEY_CHANNELLIST,
LOCALE_MENU_HINT_KEY_CHANNELUP,
LOCALE_MENU_HINT_KEY_FORMAT_MODE_ACTIVE,
LOCALE_MENU_HINT_KEY_HARDWARE,
LOCALE_MENU_HINT_KEY_HISTORY,
LOCALE_MENU_HINT_KEY_LASTCHANNEL,
@@ -892,6 +897,8 @@ typedef enum
LOCALE_MENU_HINT_KEY_MPTIMESHIFT,
LOCALE_MENU_HINT_KEY_PAGEDOWN,
LOCALE_MENU_HINT_KEY_PAGEUP,
LOCALE_MENU_HINT_KEY_PIC_MODE_ACTIVE,
LOCALE_MENU_HINT_KEY_PIC_SIZE_ACTIVE,
LOCALE_MENU_HINT_KEY_PIP_CLOSE,
LOCALE_MENU_HINT_KEY_PIP_SETUP,
LOCALE_MENU_HINT_KEY_PIP_SWAP,
@@ -903,6 +910,7 @@ typedef enum
LOCALE_MENU_HINT_KEY_SAVE,
LOCALE_MENU_HINT_KEY_SCREENSHOT,
LOCALE_MENU_HINT_KEY_SORT,
LOCALE_MENU_HINT_KEY_SPECIAL_ACTIVE,
LOCALE_MENU_HINT_KEY_SUBCHANNELDOWN,
LOCALE_MENU_HINT_KEY_SUBCHANNELUP,
LOCALE_MENU_HINT_KEY_TRANSPONDER,

View File

@@ -395,8 +395,11 @@ const char * locale_real_names[] =
"extra.fec_s2_qpsk_8_9",
"extra.fec_s2_qpsk_9_10",
"extra.key_current_transponder",
"extra.key_format_mode",
"extra.key_list_end",
"extra.key_list_start",
"extra.key_pic_mode",
"extra.key_pic_size",
"extra.key_pip_close",
"extra.key_pip_setup",
"extra.key_pip_swap",
@@ -681,6 +684,7 @@ const char * locale_real_names[] =
"keybindingmenu.repeatblock",
"keybindingmenu.repeatblockgeneric",
"keybindingmenu.sort",
"keybindingmenu_special_active",
"keybindingmenu.subchanneldown",
"keybindingmenu.subchannelup",
"keybindingmenu.tvradiomode",
@@ -870,6 +874,7 @@ const char * locale_real_names[] =
"menu.hint_key_channeldown",
"menu.hint_key_channellist",
"menu.hint_key_channelup",
"menu.hint_key_format_mode_active",
"menu.hint_key_hardware",
"menu.hint_key_history",
"menu.hint_key_lastchannel",
@@ -892,6 +897,8 @@ const char * locale_real_names[] =
"menu.hint_key_mptimeshift",
"menu.hint_key_pagedown",
"menu.hint_key_pageup",
"menu.hint_key_pic_mode_active",
"menu.hint_key_pic_size_active",
"menu.hint_key_pip_close",
"menu.hint_key_pip_setup",
"menu.hint_key_pip_swap",
@@ -903,6 +910,7 @@ const char * locale_real_names[] =
"menu.hint_key_save",
"menu.hint_key_screenshot",
"menu.hint_key_sort",
"menu.hint_key_special_active",
"menu.hint_key_subchanneldown",
"menu.hint_key_subchannelup",
"menu.hint_key_transponder",

View File

@@ -414,6 +414,9 @@ struct SNeutrinoSettings
int key_pip_close;
int key_pip_setup;
int key_pip_swap;
int key_format_mode_active;
int key_pic_mode_active;
int key_pic_size_active;
int cacheTXT;
int minimode;