diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2024-12-16 02:38:46 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2024-12-16 01:44:53 -0500 |
commit | 15b18e478cff8503a5976f4e56db28b1e4dff819 (patch) | |
tree | 897d693edba31cdddcf77ce235afaf909718604a | |
parent | 1468649258f29102f494b31429edadc137f87d3a (diff) | |
download | rockbox-15b18e478c.tar.gz rockbox-15b18e478c.zip |
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
-rw-r--r-- | apps/plugins/properties.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 18ce2174c4..316b33292a 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c @@ -187,12 +187,35 @@ static int browse_file_or_dir(struct dir_stats *stats) continue; 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) && - rb->gui_synclist_get_sel_pos(&properties_lists) - == (props_type == PROPS_DIR ? - ARRAY_SIZE(props_dir) : ARRAY_SIZE(props_file)) - 2) + sel_pos == (props_type == PROPS_DIR ? + ARRAY_SIZE(props_dir) : ARRAY_SIZE(props_file)) - 2) 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; case ACTION_STD_CANCEL: return 0; |