mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 02:11:11 +02:00
Merge branch 'uncool/dvbsi++' commit '6e0bc85a6c0'
This is the last commit before the "menu hints" started. Needs buildfixing... Conflicts: configure.ac src/daemonc/remotecontrol.cpp src/daemonc/remotecontrol.h src/driver/audiodec/basedec.cpp src/driver/fb_window.cpp src/driver/rcinput.cpp src/driver/volume.cpp src/global.h src/gui/channellist.cpp src/gui/eventlist.cpp src/gui/infoviewer.cpp src/gui/keybind_setup.cpp src/gui/miscsettings_menu.cpp src/gui/movieplayer.cpp src/gui/osd_setup.cpp src/gui/plugins.cpp src/gui/scan.cpp src/gui/scan_setup.cpp src/gui/streaminfo2.cpp src/gui/videosettings.cpp src/gui/widget/buttons.cpp src/neutrino.cpp src/sectionsd/dmx.cpp src/sectionsd/dmxapi.cpp src/sectionsd/sectionsd.cpp src/system/setting_helpers.cpp src/zapit/include/zapit/client/zapittypes.h src/zapit/include/zapit/frontend_c.h src/zapit/include/zapit/satconfig.h src/zapit/include/zapit/scan.h src/zapit/lib/zapitclient.cpp src/zapit/src/Makefile.am src/zapit/src/frontend.cpp src/zapit/src/getservices.cpp src/zapit/src/pmt.cpp src/zapit/src/scan.cpp src/zapit/src/sdt.cpp src/zapit/src/zapit.cpp
This commit is contained in:
@@ -70,15 +70,13 @@
|
||||
|
||||
CKeybindSetup::CKeybindSetup()
|
||||
{
|
||||
keySetupNotifier = new CKeySetupNotifier;
|
||||
keySetupNotifier->changeNotify(NONEXISTANT_LOCALE, NULL);
|
||||
changeNotify(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, NULL);
|
||||
|
||||
width = w_max (40, 10);
|
||||
}
|
||||
|
||||
CKeybindSetup::~CKeybindSetup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
@@ -186,7 +184,7 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] =
|
||||
{LOCALE_MPKEY_BOOKMARK, &g_settings.mpkey_bookmark, },
|
||||
{LOCALE_EXTRA_KEY_TIMESHIFT, &g_settings.key_timeshift, },
|
||||
{LOCALE_MPKEY_PLUGIN, &g_settings.mpkey_plugin, },
|
||||
{LOCALE_EXTRA_KEY_PLUGIN, &g_settings.key_plugin, },
|
||||
/*{LOCALE_EXTRA_KEY_PLUGIN, &g_settings.key_plugin, },*/
|
||||
{LOCALE_EXTRA_KEY_UNLOCK, &g_settings.key_unlock, },
|
||||
{LOCALE_EXTRA_KEY_SCREENSHOT, &g_settings.key_screenshot, }
|
||||
};
|
||||
@@ -209,30 +207,27 @@ int CKeybindSetup::showKeySetup()
|
||||
keySettings->addIntroItems(LOCALE_MAINSETTINGS_KEYBINDING);
|
||||
|
||||
//keybindings menu
|
||||
CMenuWidget* bindSettings = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING);
|
||||
CMenuWidget bindSettings(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING);
|
||||
|
||||
//keybindings
|
||||
int shortcut = 1;
|
||||
showKeyBindSetup(bindSettings);
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_HEAD, true, NULL, bindSettings, NULL, CRCInput::convertDigitToKey(shortcut++)));
|
||||
showKeyBindSetup(&bindSettings);
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_HEAD, true, NULL, &bindSettings, NULL, CRCInput::convertDigitToKey(shortcut++)));
|
||||
keySettings->addItem(GenericMenuSeparator);
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_EXTRA_LOADKEYS, true, NULL, this, "loadkeys", CRCInput::convertDigitToKey(shortcut++)));
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_EXTRA_SAVEKEYS, true, NULL, this, "savekeys", CRCInput::convertDigitToKey(shortcut++)));
|
||||
|
||||
//rc tuning
|
||||
keySetupNotifier = new CKeySetupNotifier;
|
||||
CStringInput * keySettings_repeat_genericblocker = new CStringInput(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, g_settings.repeat_genericblocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", keySetupNotifier);
|
||||
CStringInput * keySettings_repeatBlocker = new CStringInput(LOCALE_KEYBINDINGMENU_REPEATBLOCK, g_settings.repeat_blocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", keySetupNotifier);
|
||||
keySetupNotifier->changeNotify(NONEXISTANT_LOCALE, NULL);
|
||||
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)
|
||||
keySettings->addItem(new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true));
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, keySettings_repeatBlocker));
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, keySettings_repeat_genericblocker));
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, &keySettings_repeatBlocker));
|
||||
keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, &keySettings_repeat_genericblocker));
|
||||
|
||||
int res = keySettings->exec(NULL, "");
|
||||
keySettings->hide();
|
||||
|
||||
//check if rc hardware selection has changed before leaving the menu
|
||||
if (org_remote_control_hardware != g_settings.remote_control_hardware) {
|
||||
@@ -262,29 +257,29 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings)
|
||||
//modes
|
||||
CMenuWidget* bindSettings_modes = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_MODES);
|
||||
showKeyBindModeSetup(bindSettings_modes);
|
||||
bindSettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_MODECHANGE, true, NULL, bindSettings_modes, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
|
||||
bindSettings->addItem(new CMenuDForwarder(LOCALE_KEYBINDINGMENU_MODECHANGE, true, NULL, bindSettings_modes, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
|
||||
|
||||
// channellist keybindings
|
||||
CMenuWidget* bindSettings_chlist = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_CHANNELLIST);
|
||||
showKeyBindChannellistSetup(bindSettings_chlist);
|
||||
bindSettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_CHANNELLIST, true, NULL, bindSettings_chlist, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
bindSettings->addItem(new CMenuDForwarder(LOCALE_KEYBINDINGMENU_CHANNELLIST, true, NULL, bindSettings_chlist, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
|
||||
// Zapping keys quickzap
|
||||
CMenuWidget* bindSettings_qzap = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_QUICKZAP);
|
||||
showKeyBindQuickzapSetup(bindSettings_qzap);
|
||||
bindSettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_QUICKZAP, true, NULL, bindSettings_qzap, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
bindSettings->addItem(new CMenuDForwarder(LOCALE_KEYBINDINGMENU_QUICKZAP, true, NULL, bindSettings_qzap, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
|
||||
//movieplayer
|
||||
CMenuWidget* bindSettings_mplayer = new CMenuWidget(LOCALE_KEYBINDINGMENU_HEAD, NEUTRINO_ICON_KEYBINDING, width, MN_WIDGET_ID_KEYSETUP_KEYBINDING_MOVIEPLAYER);
|
||||
showKeyBindMovieplayerSetup(bindSettings_mplayer);
|
||||
bindSettings->addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, bindSettings_mplayer, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
|
||||
bindSettings->addItem(new CMenuDForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, bindSettings_mplayer, NULL, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE));
|
||||
|
||||
//misc
|
||||
bindSettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_MISC));
|
||||
//bindSettings->addItem(new CMenuForwarder(keydescription[KEY_PLUGIN], true, NULL, keychooser[KEY_PLUGIN]));
|
||||
bindSettings->addItem(new CMenuForwarder(key_settings[KEY_UNLOCK].keydescription, true, keychooser[KEY_UNLOCK]->getKeyName(), keychooser[KEY_UNLOCK]));
|
||||
//bindSettings->addItem(new CMenuDForwarder(keydescription[KEY_PLUGIN], true, NULL, keychooser[KEY_PLUGIN]));
|
||||
bindSettings->addItem(new CMenuDForwarder(key_settings[KEY_UNLOCK].keydescription, true, keychooser[KEY_UNLOCK]->getKeyName(), keychooser[KEY_UNLOCK]));
|
||||
#ifdef SCREENSHOT
|
||||
bindSettings->addItem(new CMenuForwarder(key_settings[KEY_SCREENSHOT].keydescription, true, keychooser[KEY_SCREENSHOT]->getKeyName(), keychooser[KEY_SCREENSHOT]));
|
||||
bindSettings->addItem(new CMenuDForwarder(key_settings[KEY_SCREENSHOT].keydescription, true, keychooser[KEY_SCREENSHOT]->getKeyName(), keychooser[KEY_SCREENSHOT]));
|
||||
#endif
|
||||
//bindSettings->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ZAP_CYCLE, &g_settings.zap_cycle, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
bindSettings->addItem(new CMenuOptionChooser(LOCALE_EXTRA_MENU_LEFT_EXIT, &g_settings.menu_left_exit, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
@@ -296,8 +291,8 @@ void CKeybindSetup::showKeyBindModeSetup(CMenuWidget *bindSettings_modes)
|
||||
{
|
||||
bindSettings_modes->addIntroItems(LOCALE_KEYBINDINGMENU_MODECHANGE);
|
||||
|
||||
bindSettings_modes->addItem(new CMenuForwarder(key_settings[KEY_TV_RADIO_MODE].keydescription, true, keychooser[KEY_TV_RADIO_MODE]->getKeyName(), keychooser[KEY_TV_RADIO_MODE], NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
|
||||
bindSettings_modes->addItem(new CMenuForwarder(key_settings[KEY_POWER_OFF].keydescription, true, keychooser[KEY_POWER_OFF]->getKeyName(), keychooser[KEY_POWER_OFF], NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
bindSettings_modes->addItem(new CMenuDForwarder(key_settings[KEY_TV_RADIO_MODE].keydescription, true, keychooser[KEY_TV_RADIO_MODE]->getKeyName(), keychooser[KEY_TV_RADIO_MODE], NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
|
||||
bindSettings_modes->addItem(new CMenuDForwarder(key_settings[KEY_POWER_OFF].keydescription, true, keychooser[KEY_POWER_OFF]->getKeyName(), keychooser[KEY_POWER_OFF], NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
}
|
||||
|
||||
void CKeybindSetup::showKeyBindChannellistSetup(CMenuWidget *bindSettings_chlist)
|
||||
@@ -307,7 +302,7 @@ void CKeybindSetup::showKeyBindChannellistSetup(CMenuWidget *bindSettings_chlist
|
||||
bindSettings_chlist->addItem(oj);
|
||||
|
||||
for (int i = KEY_PAGE_UP; i <= KEY_CURRENT_TRANSPONDER; i++)
|
||||
bindSettings_chlist->addItem(new CMenuForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]));
|
||||
bindSettings_chlist->addItem(new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]));
|
||||
|
||||
bindSettings_chlist->addItem(new CMenuOptionChooser(LOCALE_EXTRA_SMS_CHANNEL, &g_settings.sms_channel, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
}
|
||||
@@ -317,7 +312,7 @@ void CKeybindSetup::showKeyBindQuickzapSetup(CMenuWidget *bindSettings_qzap)
|
||||
bindSettings_qzap->addIntroItems(LOCALE_KEYBINDINGMENU_QUICKZAP);
|
||||
|
||||
for (int i = KEY_CHANNEL_UP; i <= KEY_LASTCHANNEL; i++)
|
||||
bindSettings_qzap->addItem(new CMenuForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]));
|
||||
bindSettings_qzap->addItem(new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]));
|
||||
}
|
||||
|
||||
void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplayer)
|
||||
@@ -325,6 +320,39 @@ void CKeybindSetup::showKeyBindMovieplayerSetup(CMenuWidget *bindSettings_mplaye
|
||||
bindSettings_mplayer->addIntroItems(LOCALE_MAINMENU_MOVIEPLAYER);
|
||||
|
||||
for (int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++)
|
||||
bindSettings_mplayer->addItem(new CMenuForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]));
|
||||
bindSettings_mplayer->addItem(new CMenuDForwarder(key_settings[i].keydescription, true, keychooser[i]->getKeyName(), keychooser[i]));
|
||||
}
|
||||
|
||||
bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* data */)
|
||||
{
|
||||
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);
|
||||
|
||||
g_RCInput->repeat_block = fdelay * 1000;
|
||||
g_RCInput->repeat_block_generic = xdelay * 1000;
|
||||
|
||||
int fd = g_RCInput->getFileHandle();
|
||||
#ifdef HAVE_COOL_HARDWARE
|
||||
ioctl(fd, IOC_IR_SET_F_DELAY, fdelay);
|
||||
ioctl(fd, IOC_IR_SET_X_DELAY, xdelay);
|
||||
#else
|
||||
/* if we have a good input device, we don't need the private ioctl above */
|
||||
struct input_event ie;
|
||||
ie.type = EV_REP;
|
||||
/* increase by 10 ms to trick the repeat checker code in the
|
||||
* rcinput loop into accepting the key event... */
|
||||
ie.value = fdelay + 10;
|
||||
ie.code = REP_DELAY;
|
||||
if (write(fd, &ie, sizeof(ie)) == -1)
|
||||
perror("CKeySetupNotifier::changeNotify REP_DELAY");
|
||||
|
||||
ie.value = xdelay + 10;
|
||||
ie.code = REP_PERIOD;
|
||||
if (write(fd, &ie, sizeof(ie)) == -1)
|
||||
perror("CKeySetupNotifier::changeNotify REP_PERIOD");
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user