forked from len0rd/rockbox
plugins: properties: make file info displayable in fullscreen
Extend functionality for displaying info in fullscreen to folders or files that aren't audio tracks (e.g., to display the full length of a file name) Change-Id: I73617e2fd7c291a3c49ddd1b108e418cf069d179
This commit is contained in:
parent
1468649258
commit
15b18e478c
1 changed files with 27 additions and 4 deletions
|
@ -187,12 +187,35 @@ static int browse_file_or_dir(struct dir_stats *stats)
|
||||||
continue;
|
continue;
|
||||||
switch(button)
|
switch(button)
|
||||||
{
|
{
|
||||||
case ACTION_STD_OK:
|
case ACTION_STD_OK:;
|
||||||
|
int sel_pos = rb->gui_synclist_get_sel_pos(&properties_lists);
|
||||||
|
|
||||||
|
/* "Show Track Info..." selected? */
|
||||||
if ((props_type == PROPS_PLAYLIST || props_type == PROPS_DIR) &&
|
if ((props_type == PROPS_PLAYLIST || props_type == PROPS_DIR) &&
|
||||||
rb->gui_synclist_get_sel_pos(&properties_lists)
|
sel_pos == (props_type == PROPS_DIR ?
|
||||||
== (props_type == PROPS_DIR ?
|
|
||||||
ARRAY_SIZE(props_dir) : ARRAY_SIZE(props_file)) - 2)
|
ARRAY_SIZE(props_dir) : ARRAY_SIZE(props_file)) - 2)
|
||||||
return -1;
|
return -1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Display field in fullscreen */
|
||||||
|
FOR_NB_SCREENS(i)
|
||||||
|
rb->viewportmanager_theme_enable(i, false, NULL);
|
||||||
|
if (props_type == PROPS_DIR)
|
||||||
|
view_text((char *) p2str(props_dir[sel_pos]),
|
||||||
|
(char *) props_dir[sel_pos + 1]);
|
||||||
|
else
|
||||||
|
view_text((char *) p2str(props_file[sel_pos]),
|
||||||
|
(char *) props_file[sel_pos + 1]);
|
||||||
|
FOR_NB_SCREENS(i)
|
||||||
|
rb->viewportmanager_theme_undo(i, false);
|
||||||
|
|
||||||
|
rb->gui_synclist_set_title(&properties_lists,
|
||||||
|
rb->str(props_type == PROPS_DIR ?
|
||||||
|
LANG_PROPERTIES_DIRECTORY_PROPERTIES :
|
||||||
|
LANG_PROPERTIES_FILE_PROPERTIES),
|
||||||
|
NOICON);
|
||||||
|
rb->gui_synclist_draw(&properties_lists);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_STD_CANCEL:
|
case ACTION_STD_CANCEL:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue