From 37312fe9222c0ab2bcf65de8176b916459514e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Thu, 29 Oct 2015 02:11:26 +0700 Subject: [PATCH] (GLUI) Display playlists in the second tab --- menu/drivers/glui.c | 10 +++++----- menu/intl/menu_hash_us.c | 2 ++ menu/menu.h | 1 + menu/menu_displaylist.c | 5 +++++ menu/menu_hash.h | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 63392f0df3..1ead6d37ee 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -49,10 +49,10 @@ enum enum { GLUI_SYSTEM_TAB_MAIN = 0, - GLUI_SYSTEM_TAB_SETTINGS + GLUI_SYSTEM_TAB_PLAYLISTS }; -#define GLUI_SYSTEM_TAB_END GLUI_SYSTEM_TAB_SETTINGS +#define GLUI_SYSTEM_TAB_END GLUI_SYSTEM_TAB_PLAYLISTS struct glui_texture_item { @@ -1142,11 +1142,11 @@ static void glui_list_cache(menu_list_type_t type, unsigned action) menu_stack->list[stack_size - 1].type = MENU_SETTINGS; break; - case GLUI_SYSTEM_TAB_SETTINGS: + case GLUI_SYSTEM_TAB_PLAYLISTS: menu_stack->list[stack_size - 1].label = - strdup(menu_hash_to_str(MENU_VALUE_SETTINGS_TAB)); + strdup(menu_hash_to_str(MENU_VALUE_PLAYLISTS_TAB)); menu_stack->list[stack_size - 1].type = - MENU_SETTINGS_TAB; + MENU_PLAYLISTS_TAB; break; } break; diff --git a/menu/intl/menu_hash_us.c b/menu/intl/menu_hash_us.c index fa7d6e6c3f..c8ca204e3e 100644 --- a/menu/intl/menu_hash_us.c +++ b/menu/intl/menu_hash_us.c @@ -780,6 +780,8 @@ const char *menu_hash_to_str_us(uint32_t hash) return "History tab"; case MENU_VALUE_ADD_TAB: return "Add tab"; + case MENU_VALUE_PLAYLISTS_TAB: + return "Playlists tab"; case MENU_LABEL_VALUE_NO_SETTINGS_FOUND: return "No settings found."; case MENU_LABEL_VALUE_NO_PERFORMANCE_COUNTERS: diff --git a/menu/menu.h b/menu/menu.h index 27dd77c56a..d9623b8c7a 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -104,6 +104,7 @@ typedef enum MENU_SETTINGS_TAB, MENU_HISTORY_TAB, MENU_ADD_TAB, + MENU_PLAYLISTS_TAB, MENU_SETTING_DRIVER, MENU_SETTING_ACTION, MENU_SETTING_ACTION_RUN, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index b00f22c98b..e1d7e243b1 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3110,6 +3110,11 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list) return -1; menu_displaylist_push_list_process(&info); return 0; + case MENU_VALUE_PLAYLISTS_TAB: + if (menu_displaylist_push_list(&info, DISPLAYLIST_DATABASE_PLAYLISTS) != 0) + return -1; + menu_displaylist_push_list_process(&info); + return 0; case MENU_VALUE_HORIZONTAL_MENU: if (menu_displaylist_push_list(&info, DISPLAYLIST_HORIZONTAL) != 0) return -1; diff --git a/menu/menu_hash.h b/menu/menu_hash.h index d6fcfd29fb..994de737af 100644 --- a/menu/menu_hash.h +++ b/menu/menu_hash.h @@ -572,6 +572,7 @@ extern "C" { #define MENU_VALUE_SETTINGS_TAB 0x6548d16dU #define MENU_VALUE_HISTORY_TAB 0xea9b0ceeU #define MENU_VALUE_ADD_TAB 0x7fb20225U +#define MENU_VALUE_PLAYLISTS_TAB 0x092d3161U #define MENU_VALUE_MAIN_MENU 0x1625971fU #define MENU_LABEL_VALUE_SETTINGS 0x8aca3ff6U #define MENU_VALUE_INPUT_SETTINGS 0xddd30846U