diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-09-19 11:52:30 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-05 11:22:34 -0400 |
commit | ff378deb69951a53b866f3d3c6ee13022e520436 (patch) | |
tree | 4e608fc9004d225b1121e3545642ab56186d0c0a /apps | |
parent | ead172c05d57568d201709c5fac77cbb8982bbd0 (diff) | |
download | rockbox-ff378deb69951a53b866f3d3c6ee13022e520436.tar.gz rockbox-ff378deb69951a53b866f3d3c6ee13022e520436.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/list.c | 20 | ||||
-rw-r--r-- | apps/gui/list.h | 1 | ||||
-rw-r--r-- | apps/gui/option_select.c | 1 | ||||
-rw-r--r-- | apps/menu.c | 1 | ||||
-rw-r--r-- | apps/menus/display_menu.c | 1 | ||||
-rw-r--r-- | apps/plugin.c | 1 | ||||
-rw-r--r-- | apps/plugin.h | 5 | ||||
-rw-r--r-- | apps/plugins/chessbox/chessbox_pgn.c | 1 | ||||
-rw-r--r-- | apps/plugins/keybox.c | 1 | ||||
-rw-r--r-- | apps/plugins/keyremap.c | 1 | ||||
-rw-r--r-- | apps/plugins/open_plugins.c | 1 | ||||
-rw-r--r-- | apps/plugins/properties.c | 1 | ||||
-rw-r--r-- | apps/plugins/puzzles/rockbox.c | 3 | ||||
-rw-r--r-- | apps/plugins/random_folder_advance_config.c | 1 | ||||
-rw-r--r-- | apps/plugins/rb_info.c | 1 | ||||
-rw-r--r-- | apps/plugins/shopper.c | 1 | ||||
-rw-r--r-- | apps/plugins/shortcuts/shortcuts_view.c | 1 | ||||
-rw-r--r-- | apps/plugins/text_editor.c | 1 |
18 files changed, 10 insertions, 33 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 4779d5309a..713942af18 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -525,11 +525,6 @@ static void gui_synclist_select_previous_page(struct gui_synclist * lists, | |||
525 | gui_list_select_at_offset(lists, -nb_lines); | 525 | gui_list_select_at_offset(lists, -nb_lines); |
526 | } | 526 | } |
527 | 527 | ||
528 | void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll) | ||
529 | { | ||
530 | lists->limit_scroll = scroll; | ||
531 | } | ||
532 | |||
533 | /* | 528 | /* |
534 | * Makes all the item in the list scroll by one step to the right. | 529 | * Makes all the item in the list scroll by one step to the right. |
535 | * Should stop increasing the value when reaching the widest item value | 530 | * Should stop increasing the value when reaching the widest item value |
@@ -650,19 +645,20 @@ bool gui_synclist_do_button(struct gui_synclist * lists, | |||
650 | switch (wrap) | 645 | switch (wrap) |
651 | { | 646 | { |
652 | case LIST_WRAP_ON: | 647 | case LIST_WRAP_ON: |
653 | gui_synclist_limit_scroll(lists, !(lists->wraparound)); | 648 | lists->limit_scroll = !lists->wraparound; |
654 | break; | 649 | break; |
655 | case LIST_WRAP_OFF: | 650 | case LIST_WRAP_OFF: |
656 | gui_synclist_limit_scroll(lists, true); | 651 | lists->limit_scroll = true; |
657 | break; | 652 | break; |
658 | case LIST_WRAP_UNLESS_HELD: | 653 | case LIST_WRAP_UNLESS_HELD: |
659 | if (action == ACTION_STD_PREVREPEAT || | 654 | if (action == ACTION_STD_PREVREPEAT || |
660 | action == ACTION_STD_NEXTREPEAT || | 655 | action == ACTION_STD_NEXTREPEAT || |
661 | action == ACTION_LISTTREE_PGUP || | 656 | action == ACTION_LISTTREE_PGUP || |
662 | action == ACTION_LISTTREE_PGDOWN) | 657 | action == ACTION_LISTTREE_PGDOWN) |
663 | gui_synclist_limit_scroll(lists, true); | 658 | lists->limit_scroll = true; |
664 | else gui_synclist_limit_scroll(lists, !(lists->wraparound)); | 659 | else |
665 | break; | 660 | lists->limit_scroll = !lists->wraparound; |
661 | break; | ||
666 | }; | 662 | }; |
667 | 663 | ||
668 | switch (action) | 664 | switch (action) |
diff --git a/apps/gui/list.h b/apps/gui/list.h index e514f7252e..20410471a2 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -227,7 +227,6 @@ extern void gui_synclist_select_item(struct gui_synclist * lists, | |||
227 | int item_number); | 227 | int item_number); |
228 | extern void gui_synclist_add_item(struct gui_synclist * lists); | 228 | extern void gui_synclist_add_item(struct gui_synclist * lists); |
229 | extern void gui_synclist_del_item(struct gui_synclist * lists); | 229 | extern void gui_synclist_del_item(struct gui_synclist * lists); |
230 | extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll); | ||
231 | extern void gui_synclist_set_title(struct gui_synclist * lists, const char * title, | 230 | extern void gui_synclist_set_title(struct gui_synclist * lists, const char * title, |
232 | enum themable_icons icon); | 231 | enum themable_icons icon); |
233 | extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, | 232 | extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, |
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 7068fee510..3f110ce526 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -506,7 +506,6 @@ bool option_screen(const struct settings_list *setting, | |||
506 | gui_synclist_set_nb_items(&lists, nb_items); | 506 | gui_synclist_set_nb_items(&lists, nb_items); |
507 | gui_synclist_select_item(&lists, selected); | 507 | gui_synclist_select_item(&lists, selected); |
508 | 508 | ||
509 | gui_synclist_limit_scroll(&lists, true); | ||
510 | gui_synclist_draw(&lists); | 509 | gui_synclist_draw(&lists); |
511 | /* talk the item */ | 510 | /* talk the item */ |
512 | gui_synclist_speak_item(&lists); | 511 | gui_synclist_speak_item(&lists); |
diff --git a/apps/menu.c b/apps/menu.c index ab5578dede..fd3c041e36 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -260,7 +260,6 @@ static int init_menu_lists(const struct menu_item_ex *menu, | |||
260 | if(global_settings.talk_menu) | 260 | if(global_settings.talk_menu) |
261 | gui_synclist_set_voice_callback(lists, talk_menu_item); | 261 | gui_synclist_set_voice_callback(lists, talk_menu_item); |
262 | gui_synclist_set_nb_items(lists,current_subitems_count); | 262 | gui_synclist_set_nb_items(lists,current_subitems_count); |
263 | gui_synclist_limit_scroll(lists,true); | ||
264 | gui_synclist_select_item(lists, find_menu_selection(selected)); | 263 | gui_synclist_select_item(lists, find_menu_selection(selected)); |
265 | 264 | ||
266 | get_menu_callback(menu,&menu_callback); | 265 | get_menu_callback(menu,&menu_callback); |
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c index 7823ba4082..b228095bb3 100644 --- a/apps/menus/display_menu.c +++ b/apps/menus/display_menu.c | |||
@@ -344,7 +344,6 @@ static int listwraparound_callback(int action, | |||
344 | switch (action) | 344 | switch (action) |
345 | { | 345 | { |
346 | case ACTION_EXIT_MENUITEM: | 346 | case ACTION_EXIT_MENUITEM: |
347 | gui_synclist_limit_scroll(this_list, !global_settings.list_wraparound); | ||
348 | gui_synclist_init_display_settings(this_list); | 347 | gui_synclist_init_display_settings(this_list); |
349 | break; | 348 | break; |
350 | } | 349 | } |
diff --git a/apps/plugin.c b/apps/plugin.c index 0c780dff6a..2b3b58a654 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -332,7 +332,6 @@ static const struct plugin_api rockbox_api = { | |||
332 | gui_synclist_select_item, | 332 | gui_synclist_select_item, |
333 | gui_synclist_add_item, | 333 | gui_synclist_add_item, |
334 | gui_synclist_del_item, | 334 | gui_synclist_del_item, |
335 | gui_synclist_limit_scroll, | ||
336 | gui_synclist_do_button, | 335 | gui_synclist_do_button, |
337 | gui_synclist_set_title, | 336 | gui_synclist_set_title, |
338 | gui_syncyesno_run, | 337 | gui_syncyesno_run, |
diff --git a/apps/plugin.h b/apps/plugin.h index 686dd48674..6bbad26489 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -157,12 +157,12 @@ int plugin_open(const char *plugin, const char *parameter); | |||
157 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 157 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
158 | 158 | ||
159 | /* increase this every time the api struct changes */ | 159 | /* increase this every time the api struct changes */ |
160 | #define PLUGIN_API_VERSION 252 | 160 | #define PLUGIN_API_VERSION 253 |
161 | 161 | ||
162 | /* update this to latest version if a change to the api struct breaks | 162 | /* update this to latest version if a change to the api struct breaks |
163 | backwards compatibility (and please take the opportunity to sort in any | 163 | backwards compatibility (and please take the opportunity to sort in any |
164 | new function which are "waiting" at the end of the function table) */ | 164 | new function which are "waiting" at the end of the function table) */ |
165 | #define PLUGIN_MIN_API_VERSION 252 | 165 | #define PLUGIN_MIN_API_VERSION 253 |
166 | 166 | ||
167 | /* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */ | 167 | /* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */ |
168 | 168 | ||
@@ -373,7 +373,6 @@ struct plugin_api { | |||
373 | int item_number); | 373 | int item_number); |
374 | void (*gui_synclist_add_item)(struct gui_synclist * lists); | 374 | void (*gui_synclist_add_item)(struct gui_synclist * lists); |
375 | void (*gui_synclist_del_item)(struct gui_synclist * lists); | 375 | void (*gui_synclist_del_item)(struct gui_synclist * lists); |
376 | void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll); | ||
377 | bool (*gui_synclist_do_button)(struct gui_synclist * lists, | 376 | bool (*gui_synclist_do_button)(struct gui_synclist * lists, |
378 | int *action, enum list_wrap wrap); | 377 | int *action, enum list_wrap wrap); |
379 | void (*gui_synclist_set_title)(struct gui_synclist *lists, const char* title, | 378 | void (*gui_synclist_set_title)(struct gui_synclist *lists, const char* title, |
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index 0d9da441b1..ccbcc7e91d 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c | |||
@@ -678,7 +678,6 @@ struct pgn_game_node* pgn_show_game_list(struct pgn_game_node* first_game){ | |||
678 | if (rb->global_settings->talk_menu) | 678 | if (rb->global_settings->talk_menu) |
679 | rb->gui_synclist_set_voice_callback(&games_list, speak_game_selection); | 679 | rb->gui_synclist_set_voice_callback(&games_list, speak_game_selection); |
680 | rb->gui_synclist_set_nb_items(&games_list, i); | 680 | rb->gui_synclist_set_nb_items(&games_list, i); |
681 | rb->gui_synclist_limit_scroll(&games_list, true); | ||
682 | rb->gui_synclist_select_item(&games_list, 0); | 681 | rb->gui_synclist_select_item(&games_list, 0); |
683 | 682 | ||
684 | rb->gui_synclist_draw(&games_list); | 683 | rb->gui_synclist_draw(&games_list); |
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index f8c6800a4d..38783508e7 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c | |||
@@ -659,7 +659,6 @@ enum plugin_status plugin_start(const void *parameter) | |||
659 | rb->gui_synclist_set_title(&kb_list, "Keybox", NOICON); | 659 | rb->gui_synclist_set_title(&kb_list, "Keybox", NOICON); |
660 | rb->gui_synclist_set_icon_callback(&kb_list, NULL); | 660 | rb->gui_synclist_set_icon_callback(&kb_list, NULL); |
661 | rb->gui_synclist_set_nb_items(&kb_list, 0); | 661 | rb->gui_synclist_set_nb_items(&kb_list, 0); |
662 | rb->gui_synclist_limit_scroll(&kb_list, false); | ||
663 | rb->gui_synclist_select_item(&kb_list, 0); | 662 | rb->gui_synclist_select_item(&kb_list, 0); |
664 | 663 | ||
665 | init_ll(); | 664 | init_ll(); |
diff --git a/apps/plugins/keyremap.c b/apps/plugins/keyremap.c index a4ce1c48e6..aaf530318a 100644 --- a/apps/plugins/keyremap.c +++ b/apps/plugins/keyremap.c | |||
@@ -1950,7 +1950,6 @@ static void synclist_set(int id, int selected_item, int items, int sel_size) | |||
1950 | rb->gui_synclist_set_icon_callback(&lists,NULL); | 1950 | rb->gui_synclist_set_icon_callback(&lists,NULL); |
1951 | rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); | 1951 | rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); |
1952 | rb->gui_synclist_set_nb_items(&lists,items); | 1952 | rb->gui_synclist_set_nb_items(&lists,items); |
1953 | rb->gui_synclist_limit_scroll(&lists,true); | ||
1954 | rb->gui_synclist_select_item(&lists, selected_item); | 1953 | rb->gui_synclist_select_item(&lists, selected_item); |
1955 | printcell_enable(&lists, false, false); | 1954 | printcell_enable(&lists, false, false); |
1956 | 1955 | ||
diff --git a/apps/plugins/open_plugins.c b/apps/plugins/open_plugins.c index 3a0c34d8d6..0bd9740fe7 100644 --- a/apps/plugins/open_plugins.c +++ b/apps/plugins/open_plugins.c | |||
@@ -623,7 +623,6 @@ static void synclist_set(char* menu_id, int selection, int items, int sel_size) | |||
623 | rb->gui_synclist_set_icon_callback(&lists,NULL); | 623 | rb->gui_synclist_set_icon_callback(&lists,NULL); |
624 | rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); | 624 | rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); |
625 | rb->gui_synclist_set_nb_items(&lists,items); | 625 | rb->gui_synclist_set_nb_items(&lists,items); |
626 | rb->gui_synclist_limit_scroll(&lists,true); | ||
627 | rb->gui_synclist_select_item(&lists, selection); | 626 | rb->gui_synclist_select_item(&lists, selection); |
628 | list_voice_cb(selection, menu_id); | 627 | list_voice_cb(selection, menu_id); |
629 | } | 628 | } |
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index c4378a0356..89ea722e9e 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -389,7 +389,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
389 | rb->gui_synclist_set_nb_items(&properties_lists, | 389 | rb->gui_synclist_set_nb_items(&properties_lists, |
390 | 2 * (props_type == PROPS_FILE ? NUM_FILE_PROPERTIES : | 390 | 2 * (props_type == PROPS_FILE ? NUM_FILE_PROPERTIES : |
391 | NUM_DIR_PROPERTIES)); | 391 | NUM_DIR_PROPERTIES)); |
392 | rb->gui_synclist_limit_scroll(&properties_lists, true); | ||
393 | rb->gui_synclist_select_item(&properties_lists, 0); | 392 | rb->gui_synclist_select_item(&properties_lists, 0); |
394 | rb->gui_synclist_draw(&properties_lists); | 393 | rb->gui_synclist_draw(&properties_lists); |
395 | rb->gui_synclist_speak_item(&properties_lists); | 394 | rb->gui_synclist_speak_item(&properties_lists); |
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 9a82cdde10..09b247e184 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c | |||
@@ -2450,7 +2450,6 @@ static int list_choose(const char *list_str, const char *title, int sel) | |||
2450 | rb->gui_synclist_init(&list, &config_choices_formatter, (void*)list_str, false, 1, NULL); | 2450 | rb->gui_synclist_init(&list, &config_choices_formatter, (void*)list_str, false, 1, NULL); |
2451 | rb->gui_synclist_set_icon_callback(&list, NULL); | 2451 | rb->gui_synclist_set_icon_callback(&list, NULL); |
2452 | rb->gui_synclist_set_nb_items(&list, n); | 2452 | rb->gui_synclist_set_nb_items(&list, n); |
2453 | rb->gui_synclist_limit_scroll(&list, false); | ||
2454 | 2453 | ||
2455 | rb->gui_synclist_select_item(&list, sel); | 2454 | rb->gui_synclist_select_item(&list, sel); |
2456 | 2455 | ||
@@ -2664,7 +2663,6 @@ static bool config_menu(void) | |||
2664 | rb->gui_synclist_init(&list, &config_formatter, config, false, 1, NULL); | 2663 | rb->gui_synclist_init(&list, &config_formatter, config, false, 1, NULL); |
2665 | rb->gui_synclist_set_icon_callback(&list, NULL); | 2664 | rb->gui_synclist_set_icon_callback(&list, NULL); |
2666 | rb->gui_synclist_set_nb_items(&list, n); | 2665 | rb->gui_synclist_set_nb_items(&list, n); |
2667 | rb->gui_synclist_limit_scroll(&list, false); | ||
2668 | 2666 | ||
2669 | rb->gui_synclist_select_item(&list, 0); | 2667 | rb->gui_synclist_select_item(&list, 0); |
2670 | 2668 | ||
@@ -2750,7 +2748,6 @@ static int do_preset_menu(struct preset_menu *menu, char *title, int selected) | |||
2750 | rb->gui_synclist_init(&list, &preset_formatter, menu, false, 1, NULL); | 2748 | rb->gui_synclist_init(&list, &preset_formatter, menu, false, 1, NULL); |
2751 | rb->gui_synclist_set_icon_callback(&list, NULL); | 2749 | rb->gui_synclist_set_icon_callback(&list, NULL); |
2752 | rb->gui_synclist_set_nb_items(&list, menu->n_entries); | 2750 | rb->gui_synclist_set_nb_items(&list, menu->n_entries); |
2753 | rb->gui_synclist_limit_scroll(&list, false); | ||
2754 | 2751 | ||
2755 | rb->gui_synclist_select_item(&list, selected); | 2752 | rb->gui_synclist_select_item(&list, selected); |
2756 | 2753 | ||
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 2c9fb411ac..2c22298cd4 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -311,7 +311,6 @@ static int edit_list(void) | |||
311 | rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); | 311 | rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); |
312 | rb->gui_synclist_set_icon_callback(&lists,NULL); | 312 | rb->gui_synclist_set_icon_callback(&lists,NULL); |
313 | rb->gui_synclist_set_nb_items(&lists,list->count); | 313 | rb->gui_synclist_set_nb_items(&lists,list->count); |
314 | rb->gui_synclist_limit_scroll(&lists,true); | ||
315 | rb->gui_synclist_select_item(&lists, 0); | 314 | rb->gui_synclist_select_item(&lists, 0); |
316 | 315 | ||
317 | while (!exit) | 316 | while (!exit) |
diff --git a/apps/plugins/rb_info.c b/apps/plugins/rb_info.c index 03c6671843..1385a5a9fc 100644 --- a/apps/plugins/rb_info.c +++ b/apps/plugins/rb_info.c | |||
@@ -514,7 +514,6 @@ static void synclist_set(char* menu_id, int selected_item, int items, int sel_si | |||
514 | rb->gui_synclist_set_icon_callback(&lists,NULL); | 514 | rb->gui_synclist_set_icon_callback(&lists,NULL); |
515 | rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); | 515 | rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); |
516 | rb->gui_synclist_set_nb_items(&lists,items); | 516 | rb->gui_synclist_set_nb_items(&lists,items); |
517 | rb->gui_synclist_limit_scroll(&lists,true); | ||
518 | rb->gui_synclist_select_item(&lists, selected_item); | 517 | rb->gui_synclist_select_item(&lists, selected_item); |
519 | 518 | ||
520 | } | 519 | } |
diff --git a/apps/plugins/shopper.c b/apps/plugins/shopper.c index 7129291c10..31ef44b831 100644 --- a/apps/plugins/shopper.c +++ b/apps/plugins/shopper.c | |||
@@ -304,7 +304,6 @@ enum plugin_status plugin_start(const void* parameter) | |||
304 | /* now dump it in the list */ | 304 | /* now dump it in the list */ |
305 | rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); | 305 | rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); |
306 | rb->gui_synclist_set_icon_callback(&lists, list_get_icon_cb); | 306 | rb->gui_synclist_set_icon_callback(&lists, list_get_icon_cb); |
307 | rb->gui_synclist_limit_scroll(&lists,true); | ||
308 | create_view(&lists); | 307 | create_view(&lists); |
309 | rb->gui_synclist_set_nb_items(&lists,view_item_count); | 308 | rb->gui_synclist_set_nb_items(&lists,view_item_count); |
310 | rb->gui_synclist_select_item(&lists, 0); | 309 | rb->gui_synclist_select_item(&lists, 0); |
diff --git a/apps/plugins/shortcuts/shortcuts_view.c b/apps/plugins/shortcuts/shortcuts_view.c index f4c4b58bc1..9584731989 100644 --- a/apps/plugins/shortcuts/shortcuts_view.c +++ b/apps/plugins/shortcuts/shortcuts_view.c | |||
@@ -115,7 +115,6 @@ int list_sc(void) | |||
115 | rb->gui_synclist_set_title(&gui_sc, | 115 | rb->gui_synclist_set_title(&gui_sc, |
116 | (user_file?"Shortcuts (sealed)":"Shortcuts (editable)"), NOICON); | 116 | (user_file?"Shortcuts (sealed)":"Shortcuts (editable)"), NOICON); |
117 | rb->gui_synclist_set_nb_items(&gui_sc, sc_file.entry_cnt); | 117 | rb->gui_synclist_set_nb_items(&gui_sc, sc_file.entry_cnt); |
118 | rb->gui_synclist_limit_scroll(&gui_sc, false); | ||
119 | rb->gui_synclist_select_item(&gui_sc, 0); | 118 | rb->gui_synclist_select_item(&gui_sc, 0); |
120 | 119 | ||
121 | /* Draw the prepared widget to the LCD now */ | 120 | /* Draw the prepared widget to the LCD now */ |
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index 0cbb61c774..748e872d0b 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c | |||
@@ -214,7 +214,6 @@ static void setup_lists(struct gui_synclist *lists, int sel) | |||
214 | rb->gui_synclist_init(lists,list_get_name_cb,0, false, 1, NULL); | 214 | rb->gui_synclist_init(lists,list_get_name_cb,0, false, 1, NULL); |
215 | rb->gui_synclist_set_icon_callback(lists,NULL); | 215 | rb->gui_synclist_set_icon_callback(lists,NULL); |
216 | rb->gui_synclist_set_nb_items(lists,line_count); | 216 | rb->gui_synclist_set_nb_items(lists,line_count); |
217 | rb->gui_synclist_limit_scroll(lists,true); | ||
218 | rb->gui_synclist_select_item(lists, sel); | 217 | rb->gui_synclist_select_item(lists, sel); |
219 | rb->gui_synclist_draw(lists); | 218 | rb->gui_synclist_draw(lists); |
220 | } | 219 | } |