From 6d19214eeb13835f3343675417651e2eb03e270f Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 28 Jul 2024 15:32:43 +0200 Subject: list: remove redundant setting of icon callback to NULL gui_synclist_init already does this for us Change-Id: I1288d389c6191416cbc3da37a333b1cad84ee779 --- apps/gui/option_select.c | 1 - apps/playlist_viewer.c | 1 - apps/plugins/chessbox/chessbox_pgn.c | 1 - apps/plugins/keybox.c | 1 - apps/plugins/open_plugins.c | 1 - apps/plugins/puzzles/rockbox.c | 3 --- apps/plugins/random_folder_advance_config.c | 1 - apps/plugins/rb_info.c | 1 - apps/plugins/tagcache/tagcache.c | 1 - apps/plugins/text_editor.c | 1 - apps/radio/presets.c | 1 - apps/screens.c | 1 - 12 files changed, 14 deletions(-) diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 1ce7fd5026..6d1d2df370 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c @@ -504,7 +504,6 @@ bool option_screen(const struct settings_list *setting, title = P2STR(option_title); gui_synclist_set_title(&lists, title, Icon_Questionmark); - gui_synclist_set_icon_callback(&lists, NULL); if(global_settings.talk_menu) gui_synclist_set_voice_callback(&lists, option_talk); diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index b0435365e2..70072f59f5 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -1219,7 +1219,6 @@ bool search_playlist(void) gui_synclist_init(&playlist_lists, playlist_search_callback_name, &s_data, false, 1, NULL); gui_synclist_set_title(&playlist_lists, str(LANG_SEARCH_RESULTS), NOICON); - gui_synclist_set_icon_callback(&playlist_lists, NULL); if(global_settings.talk_file) gui_synclist_set_voice_callback(&playlist_lists, global_settings.talk_file? diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index bb35bec726..d6da369b9e 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c @@ -674,7 +674,6 @@ struct pgn_game_node* pgn_show_game_list(struct pgn_game_node* first_game){ rb->gui_synclist_init(&games_list, &get_game_text, first_game, false, 1, NULL); rb->gui_synclist_set_title(&games_list, rb->str(LANG_CHESSBOX_GAMES), NOICON); - rb->gui_synclist_set_icon_callback(&games_list, NULL); if (rb->global_settings->talk_menu) rb->gui_synclist_set_voice_callback(&games_list, speak_game_selection); rb->gui_synclist_set_nb_items(&games_list, i); diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index cb2e23a94a..749d76af74 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c @@ -657,7 +657,6 @@ enum plugin_status plugin_start(const void *parameter) rb->gui_synclist_init(&kb_list, &kb_list_cb, NULL, false, 1, NULL); rb->gui_synclist_set_title(&kb_list, "Keybox", NOICON); - rb->gui_synclist_set_icon_callback(&kb_list, NULL); rb->gui_synclist_set_nb_items(&kb_list, 0); rb->gui_synclist_select_item(&kb_list, 0); diff --git a/apps/plugins/open_plugins.c b/apps/plugins/open_plugins.c index 66200df8a5..7206fe2a49 100644 --- a/apps/plugins/open_plugins.c +++ b/apps/plugins/open_plugins.c @@ -643,7 +643,6 @@ static void synclist_set(char* menu_id, int selection, int items, int sel_size) rb->gui_synclist_init(&lists,list_get_name_cb, menu_id, false, sel_size, NULL); - rb->gui_synclist_set_icon_callback(&lists,NULL); rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); rb->gui_synclist_set_nb_items(&lists,items); rb->gui_synclist_select_item(&lists, selection); diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index a3fe1c6e96..60e6548826 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c @@ -2455,7 +2455,6 @@ static int list_choose(const char *list_str, const char *title, int sel) struct gui_synclist list; rb->gui_synclist_init(&list, &config_choices_formatter, (void*)list_str, false, 1, NULL); - rb->gui_synclist_set_icon_callback(&list, NULL); rb->gui_synclist_set_nb_items(&list, n); rb->gui_synclist_select_item(&list, sel); @@ -2668,7 +2667,6 @@ static bool config_menu_core(int which) struct gui_synclist list; rb->gui_synclist_init(&list, &config_formatter, config, false, 1, NULL); - rb->gui_synclist_set_icon_callback(&list, NULL); rb->gui_synclist_set_nb_items(&list, n); rb->gui_synclist_select_item(&list, 0); @@ -2763,7 +2761,6 @@ static int do_preset_menu(struct preset_menu *menu, char *title, int selected) struct gui_synclist list; rb->gui_synclist_init(&list, &preset_formatter, menu, false, 1, NULL); - rb->gui_synclist_set_icon_callback(&list, NULL); rb->gui_synclist_set_nb_items(&list, menu->n_entries); rb->gui_synclist_select_item(&list, selected); diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 5688ff93d3..3d762c6db7 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c @@ -309,7 +309,6 @@ static int edit_list(void) dirs_count = list->count; rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); - rb->gui_synclist_set_icon_callback(&lists,NULL); rb->gui_synclist_set_nb_items(&lists,list->count); rb->gui_synclist_select_item(&lists, 0); diff --git a/apps/plugins/rb_info.c b/apps/plugins/rb_info.c index a89cc658cc..31b06d6f75 100644 --- a/apps/plugins/rb_info.c +++ b/apps/plugins/rb_info.c @@ -518,7 +518,6 @@ static void synclist_set(char* menu_id, int selected_item, int items, int sel_si { rb->gui_synclist_set_title(&lists, NULL,-1); } - rb->gui_synclist_set_icon_callback(&lists,NULL); rb->gui_synclist_set_voice_callback(&lists, list_voice_cb); rb->gui_synclist_set_nb_items(&lists,items); rb->gui_synclist_select_item(&lists, selected_item); diff --git a/apps/plugins/tagcache/tagcache.c b/apps/plugins/tagcache/tagcache.c index cce9efbed9..23651a4471 100644 --- a/apps/plugins/tagcache/tagcache.c +++ b/apps/plugins/tagcache/tagcache.c @@ -761,7 +761,6 @@ static int commit_menu(void) int selection, ret = 0; rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL); - rb->gui_synclist_set_icon_callback(&lists, NULL); rb->gui_synclist_set_nb_items(&lists, 9); rb->gui_synclist_select_item(&lists, 0); diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index 8740606c58..f7d62ca07a 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c @@ -212,7 +212,6 @@ static bool save_changes(int overwrite) static void setup_lists(struct gui_synclist *lists, int sel) { rb->gui_synclist_init(lists,list_get_name_cb,0, false, 1, NULL); - rb->gui_synclist_set_icon_callback(lists,NULL); rb->gui_synclist_set_nb_items(lists,line_count); rb->gui_synclist_select_item(lists, sel); rb->gui_synclist_draw(lists); diff --git a/apps/radio/presets.c b/apps/radio/presets.c index 046525c3b6..b87d2dd285 100644 --- a/apps/radio/presets.c +++ b/apps/radio/presets.c @@ -485,7 +485,6 @@ int handle_radio_presets(void) gui_synclist_init(&lists, presets_get_name, NULL, false, 1, NULL); gui_synclist_set_title(&lists, str(LANG_PRESET), NOICON); - gui_synclist_set_icon_callback(&lists, NULL); if(global_settings.talk_file) gui_synclist_set_voice_callback(&lists, presets_speak_name); gui_synclist_set_nb_items(&lists, num_presets); diff --git a/apps/screens.c b/apps/screens.c index d6f3ea6304..e3a73f3de2 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -900,7 +900,6 @@ int view_runtime(void) gui_synclist_set_title(&lists, str(LANG_RUNNING_TIME), NOICON); if(global_settings.talk_menu) gui_synclist_set_voice_callback(&lists, runtime_speak_data); - gui_synclist_set_icon_callback(&lists, NULL); gui_synclist_set_nb_items(&lists, 4); while(1) -- cgit v1.2.3