summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 670a235202..b640905c0f 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -61,6 +61,12 @@
#include "list.h"
#include "buttonbar.h"
+/* hotkey settings */
+#ifdef HAVE_HOTKEY
+const struct menu_item_ex *selected_menu_item;
+bool hotkey_settable_menu = false;
+#endif
+
#define MAX_MENUS 8
/* used to allow for dynamic menus */
#define MAX_MENU_SUBITEMS 64
@@ -426,6 +432,17 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
done = true;
}
#endif
+#ifdef HAVE_HOTKEY
+ else if (hotkey_settable_menu &&
+ ((action == ACTION_WPS_HOTKEY) ||
+ (action == ACTION_TREE_HOTKEY)))
+ {
+ ret = MENU_SELECTED_HOTKEY;
+ done = true;
+ selected = get_menu_selection(gui_synclist_get_sel_pos(&lists),menu);
+ selected_menu_item = menu->submenus[selected];
+ }
+#endif
else if (action == ACTION_TREE_WPS)
{
ret = GO_TO_PREVIOUS_MUSIC;