From a69b37a929ee6d8adba8b9e075d9593f503a4384 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 8 Mar 2013 13:36:40 +0400 Subject: [PATCH] gui/keybind_setup.cpp: add bind setup for direct pip setup and live/pip swap --- src/gui/keybind_setup.cpp | 16 ++++++++++++---- src/gui/keybind_setup.h | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 1b014f6b3..0a49ddb73 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -185,7 +185,9 @@ const key_settings_struct_t key_settings[CKeybindSetup::KEYBINDS_COUNT] = /*{LOCALE_EXTRA_KEY_PLUGIN, &g_settings.key_plugin, },*/ {LOCALE_EXTRA_KEY_UNLOCK, &g_settings.key_unlock, LOCALE_MENU_HINT_KEY_UNLOCK}, {LOCALE_EXTRA_KEY_SCREENSHOT, &g_settings.key_screenshot, LOCALE_MENU_HINT_KEY_SCREENSHOT }, - {LOCALE_EXTRA_KEY_PIP, &g_settings.key_pip, LOCALE_MENU_HINT_KEY_PIP } + {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 } }; @@ -312,10 +314,16 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings) mf = new CMenuDForwarder(key_settings[KEY_SCREENSHOT].keydescription, true, keychooser[KEY_SCREENSHOT]->getKeyName(), keychooser[KEY_SCREENSHOT]); mf->setHint("", key_settings[KEY_SCREENSHOT].hint); bindSettings->addItem(mf); -#ifdef BOXMODEL_APOLLO +#ifdef ENABLE_PIP // pip - mf = new CMenuDForwarder(key_settings[KEY_PIP].keydescription, true, keychooser[KEY_PIP]->getKeyName(), keychooser[KEY_PIP]); - mf->setHint("", key_settings[KEY_PIP].hint); + mf = new CMenuDForwarder(key_settings[KEY_PIP_CLOSE].keydescription, true, keychooser[KEY_PIP_CLOSE]->getKeyName(), keychooser[KEY_PIP_CLOSE]); + mf->setHint("", key_settings[KEY_PIP_CLOSE].hint); + bindSettings->addItem(mf); + mf = new CMenuDForwarder(key_settings[KEY_PIP_SETUP].keydescription, true, keychooser[KEY_PIP_SETUP]->getKeyName(), keychooser[KEY_PIP_SETUP]); + mf->setHint("", key_settings[KEY_PIP_SETUP].hint); + bindSettings->addItem(mf); + mf = new CMenuDForwarder(key_settings[KEY_PIP_SWAP].keydescription, true, keychooser[KEY_PIP_SWAP]->getKeyName(), keychooser[KEY_PIP_SWAP]); + mf->setHint("", key_settings[KEY_PIP_SWAP].hint); bindSettings->addItem(mf); #endif diff --git a/src/gui/keybind_setup.h b/src/gui/keybind_setup.h index cdb49b041..2a4c15ae1 100644 --- a/src/gui/keybind_setup.h +++ b/src/gui/keybind_setup.h @@ -76,7 +76,9 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver /*KEY_PLUGIN,*/ KEY_UNLOCK, KEY_SCREENSHOT, - KEY_PIP, + KEY_PIP_CLOSE, + KEY_PIP_SETUP, + KEY_PIP_SWAP, KEYBINDS_COUNT };