Change hex/int/string value in the cell */
| 770 | |
| 771 | /* Change hex/int/string value in the cell */ |
| 772 | static void renderer_edited(GtkCellRendererText * cell, |
| 773 | const gchar * path_string, |
| 774 | const gchar * new_text, gpointer user_data) |
| 775 | { |
| 776 | GtkTreePath *path = gtk_tree_path_new_from_string(path_string); |
| 777 | GtkTreeIter iter; |
| 778 | const char *old_def, *new_def; |
| 779 | struct menu *menu; |
| 780 | struct symbol *sym; |
| 781 | |
| 782 | if (!gtk_tree_model_get_iter(model2, &iter, path)) |
| 783 | return; |
| 784 | |
| 785 | gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); |
| 786 | sym = menu->sym; |
| 787 | |
| 788 | gtk_tree_model_get(model2, &iter, COL_VALUE, &old_def, -1); |
| 789 | new_def = new_text; |
| 790 | |
| 791 | sym_set_string_value(sym, new_def); |
| 792 | |
| 793 | update_tree(&rootmenu, NULL); |
| 794 | |
| 795 | gtk_tree_path_free(path); |
| 796 | } |
| 797 | |
| 798 | /* Change the value of a symbol and update the tree */ |
| 799 | static void change_sym_value(struct menu *menu, gint col) |
nothing calls this directly
no test coverage detected