Add more string representations

This commit is contained in:
twinaphex 2015-02-01 07:39:20 +01:00
parent ca73887f8c
commit bf02055971

View File

@ -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;