Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: gconf: do not reconstruct tree store when a symbol is changed

There is no need to reconstruct the entire tree store when a symbol's
value changes. Simply call gtk_tree_store_set() to update the row data.

Introduce update_trees() to factor out the common update logic.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+11 -18
+11 -18
scripts/kconfig/gconf.c
··· 296 296 update_row_visibility(); 297 297 } 298 298 299 + static void update_trees(void) 300 + { 301 + if (view_mode == SPLIT_VIEW) 302 + update_tree(tree1); 303 + update_tree(tree2); 304 + } 305 + 299 306 static void set_view_mode(enum view_mode mode) 300 307 { 301 308 view_mode = mode; ··· 387 380 text_insert_msg("Error", 388 381 "Unable to load configuration!"); 389 382 else 390 - display_tree_part(); 383 + update_trees(); 391 384 392 385 g_free(filename); 393 386 } ··· 706 699 707 700 sym_set_string_value(sym, new_def); 708 701 709 - update_tree(tree2); 702 + update_trees(); 710 703 711 704 free: 712 705 gtk_tree_path_free(path); ··· 736 729 if (!sym_tristate_within_range(sym, newval)) 737 730 newval = yes; 738 731 sym_set_tristate_value(sym, newval); 739 - if (view_mode == FULL_VIEW) 740 - update_tree(tree2); 741 - else if (view_mode == SPLIT_VIEW) { 742 - update_tree(tree2); 743 - display_list(); 744 - } 745 - else if (view_mode == SINGLE_VIEW) 746 - display_tree_part(); //fixme: keep exp/coll 732 + update_trees(); 747 733 break; 748 734 case S_INT: 749 735 case S_HEX: ··· 752 752 return; 753 753 754 754 sym_toggle_tristate_value(menu->sym); 755 - if (view_mode == FULL_VIEW) 756 - update_tree(tree2); 757 - else if (view_mode == SPLIT_VIEW) { 758 - update_tree(tree2); 759 - display_list(); 760 - } 761 - else if (view_mode == SINGLE_VIEW) 762 - display_tree_part(); //fixme: keep exp/coll 755 + update_trees(); 763 756 } 764 757 765 758 static gint column2index(GtkTreeViewColumn * column)