summaryrefslogtreecommitdiffstats
path: root/apps/gui
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-02-08 19:59:57 -0500
committerSolomon Peachy <pizza@shaftnet.org>2019-07-28 14:57:14 +0200
commit4beafe16fafc2e5c59734ef065a6f8d23766520d (patch)
treec1f293d0a6807f993a24e6efb06537a254f7f445 /apps/gui
parentddf612c84b558bc3343d413c04cdddf59b23a2ed (diff)
downloadrockbox-4beafe16fafc2e5c59734ef065a6f8d23766520d.tar.gz
rockbox-4beafe16fafc2e5c59734ef065a6f8d23766520d.zip
Show time, date, and recording directory in the info screen
Patch by Igor Poretsky Change-Id: I5db0d018742c11dd9bf3ca4c9539cd91f94d4c2e
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/list.c7
-rw-r--r--apps/gui/list.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index b0d7829f9a..425cab9a0f 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -880,6 +880,13 @@ bool list_do_action(int context, int timeout,
return gui_synclist_do_button(lists, action, wrap);
}
+bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
+ enum screen_type screen, int item)
+{
+ int nb_lines = list_get_nb_lines(lists, screen);
+ return (unsigned)(item - lists->start_item[screen]) < (unsigned) nb_lines;
+}
+
/* Simple use list implementation */
static int simplelist_line_count = 0, simplelist_line_remaining;
static int simplelist_line_pos;
diff --git a/apps/gui/list.h b/apps/gui/list.h
index ef08a9e220..1be9da496a 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -167,6 +167,8 @@ extern void gui_synclist_set_title(struct gui_synclist * lists, char * title,
enum themable_icons icon);
extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists,
bool hide);
+extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
+ enum screen_type screen, int item);
#if CONFIG_CODEC == SWCODEC
extern bool gui_synclist_keyclick_callback(int action, void* data);