From bf02055971545959bacbeb6070740e7f2e41628e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 1 Feb 2015 07:39:20 +0100 Subject: [PATCH] Add more string representations --- menu/menu_entries_cbs.c | 54 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/menu/menu_entries_cbs.c b/menu/menu_entries_cbs.c index fc61016984..77d536e936 100644 --- a/menu/menu_entries_cbs.c +++ b/menu/menu_entries_cbs.c @@ -4194,6 +4194,48 @@ static void menu_action_setting_disp_set_label_menu_file_filter( strlcpy(path_buf, path, path_buf_size); } +static void menu_action_setting_disp_set_label_menu_file_url( + file_list_t* list, + unsigned *w, unsigned type, unsigned i, + const char *label, + char *type_str, size_t type_str_size, + const char *entry_label, + const char *path, + char *path_buf, size_t path_buf_size) +{ + strlcpy(type_str, "(URL)", type_str_size); + *w = strlen(type_str); + strlcpy(path_buf, path, path_buf_size); +} + +static void menu_action_setting_disp_set_label_menu_file_rdb( + file_list_t* list, + unsigned *w, unsigned type, unsigned i, + const char *label, + char *type_str, size_t type_str_size, + const char *entry_label, + const char *path, + char *path_buf, size_t path_buf_size) +{ + strlcpy(type_str, "(RDB)", type_str_size); + *w = strlen(type_str); + strlcpy(path_buf, path, path_buf_size); +} + +static void menu_action_setting_disp_set_label_menu_file_cursor( + file_list_t* list, + unsigned *w, unsigned type, unsigned i, + const char *label, + char *type_str, size_t type_str_size, + const char *entry_label, + const char *path, + char *path_buf, size_t path_buf_size) +{ + strlcpy(type_str, "(CURSOR)", type_str_size); + *w = strlen(type_str); + strlcpy(path_buf, path, path_buf_size); +} + static void menu_action_setting_disp_set_label(file_list_t* list, unsigned *w, unsigned type, unsigned i, const char *label, @@ -4768,6 +4810,18 @@ static void menu_entries_cbs_init_bind_get_string_representation(menu_file_list_ cbs->action_get_representation = menu_action_setting_disp_set_label_menu_file_filter; break; + case MENU_FILE_DOWNLOAD_CORE: + cbs->action_get_representation = + menu_action_setting_disp_set_label_menu_file_url; + break; + case MENU_FILE_RDB: + cbs->action_get_representation = + menu_action_setting_disp_set_label_menu_file_rdb; + break; + case MENU_FILE_CURSOR: + cbs->action_get_representation = + menu_action_setting_disp_set_label_menu_file_cursor; + break; default: cbs->action_get_representation = menu_action_setting_disp_set_label; break;