mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
gui: Remove gui_synclist_limit_scroll()
Since gui_synclist_do_button() overrides the setting at runtime there is no reason to have a public API call to set it. Really it should be a local variable, but it will be simpler to do that after refactoring how list wraparound behavior is handled. Change-Id: Id09d42197814102693752a9f64db8325118ca796
This commit is contained in:
parent
ead172c05d
commit
ff378deb69
19 changed files with 10 additions and 39 deletions
|
|
@ -525,11 +525,6 @@ static void gui_synclist_select_previous_page(struct gui_synclist * lists,
|
|||
gui_list_select_at_offset(lists, -nb_lines);
|
||||
}
|
||||
|
||||
void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll)
|
||||
{
|
||||
lists->limit_scroll = scroll;
|
||||
}
|
||||
|
||||
/*
|
||||
* Makes all the item in the list scroll by one step to the right.
|
||||
* Should stop increasing the value when reaching the widest item value
|
||||
|
|
@ -650,19 +645,20 @@ bool gui_synclist_do_button(struct gui_synclist * lists,
|
|||
switch (wrap)
|
||||
{
|
||||
case LIST_WRAP_ON:
|
||||
gui_synclist_limit_scroll(lists, !(lists->wraparound));
|
||||
break;
|
||||
lists->limit_scroll = !lists->wraparound;
|
||||
break;
|
||||
case LIST_WRAP_OFF:
|
||||
gui_synclist_limit_scroll(lists, true);
|
||||
break;
|
||||
lists->limit_scroll = true;
|
||||
break;
|
||||
case LIST_WRAP_UNLESS_HELD:
|
||||
if (action == ACTION_STD_PREVREPEAT ||
|
||||
action == ACTION_STD_NEXTREPEAT ||
|
||||
action == ACTION_LISTTREE_PGUP ||
|
||||
action == ACTION_LISTTREE_PGDOWN)
|
||||
gui_synclist_limit_scroll(lists, true);
|
||||
else gui_synclist_limit_scroll(lists, !(lists->wraparound));
|
||||
break;
|
||||
lists->limit_scroll = true;
|
||||
else
|
||||
lists->limit_scroll = !lists->wraparound;
|
||||
break;
|
||||
};
|
||||
|
||||
switch (action)
|
||||
|
|
|
|||
|
|
@ -227,7 +227,6 @@ extern void gui_synclist_select_item(struct gui_synclist * lists,
|
|||
int item_number);
|
||||
extern void gui_synclist_add_item(struct gui_synclist * lists);
|
||||
extern void gui_synclist_del_item(struct gui_synclist * lists);
|
||||
extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll);
|
||||
extern void gui_synclist_set_title(struct gui_synclist * lists, const char * title,
|
||||
enum themable_icons icon);
|
||||
extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
|
||||
|
|
|
|||
|
|
@ -506,7 +506,6 @@ bool option_screen(const struct settings_list *setting,
|
|||
gui_synclist_set_nb_items(&lists, nb_items);
|
||||
gui_synclist_select_item(&lists, selected);
|
||||
|
||||
gui_synclist_limit_scroll(&lists, true);
|
||||
gui_synclist_draw(&lists);
|
||||
/* talk the item */
|
||||
gui_synclist_speak_item(&lists);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue