Lines Matching +full:- +full:- +full:tree +full:- +full:view
1 /* Hey EMACS -*- linux-c -*- */
4 * Copyright (C) 2002-2003 Romain Lievin <roms@tilp.info>
57 GtkTreeStore *tree1, *tree2, *tree; variable
62 static struct menu *current; // current node for SINGLE view
63 static struct menu *browsed; // browsed node for SPLIT view
107 buf[strlen(buf) - 1] = '\0'; in dbg_sym_flags()
121 &style->bg[GTK_STATE_NORMAL], in replace_button_icon()
172 replace_button_icon(xml, main_wnd->window, style, in init_main_window()
174 replace_button_icon(xml, main_wnd->window, style, in init_main_window()
176 replace_button_icon(xml, main_wnd->window, style, in init_main_window()
188 gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text); in init_main_window()
197 tree = tree2 = gtk_tree_store_new(COL_NUMBER, in init_tree_model()
225 GtkTreeView *view = GTK_TREE_VIEW(tree1_w); in init_left_tree() local
230 gtk_tree_view_set_model(view, model1); in init_left_tree()
231 gtk_tree_view_set_headers_visible(view, TRUE); in init_left_tree()
232 gtk_tree_view_set_rules_hint(view, TRUE); in init_left_tree()
235 gtk_tree_view_append_column(view, column); in init_left_tree()
253 "foreground-gdk", in init_left_tree()
256 sel = gtk_tree_view_get_selection(view); in init_left_tree()
267 GtkTreeView *view = GTK_TREE_VIEW(tree2_w); in init_right_tree() local
273 gtk_tree_view_set_model(view, model2); in init_right_tree()
274 gtk_tree_view_set_headers_visible(view, TRUE); in init_right_tree()
275 gtk_tree_view_set_rules_hint(view, TRUE); in init_right_tree()
278 gtk_tree_view_append_column(view, column); in init_right_tree()
303 "foreground-gdk", in init_right_tree()
307 gtk_tree_view_insert_column_with_attributes(view, -1, in init_right_tree()
310 "foreground-gdk", in init_right_tree()
313 gtk_tree_view_insert_column_with_attributes(view, -1, in init_right_tree()
316 "foreground-gdk", in init_right_tree()
319 gtk_tree_view_insert_column_with_attributes(view, -1, in init_right_tree()
322 "foreground-gdk", in init_right_tree()
325 gtk_tree_view_insert_column_with_attributes(view, -1, in init_right_tree()
328 "foreground-gdk", in init_right_tree()
331 gtk_tree_view_insert_column_with_attributes(view, -1, in init_right_tree()
336 "foreground-gdk", in init_right_tree()
341 column = gtk_tree_view_get_column(view, COL_NAME); in init_right_tree()
343 column = gtk_tree_view_get_column(view, COL_NO); in init_right_tree()
345 column = gtk_tree_view_get_column(view, COL_MOD); in init_right_tree()
347 column = gtk_tree_view_get_column(view, COL_YES); in init_right_tree()
349 column = gtk_tree_view_get_column(view, COL_VALUE); in init_right_tree()
354 column = gtk_tree_view_get_column(view, i); in init_right_tree()
359 sel = gtk_tree_view_get_selection(view); in init_right_tree()
382 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, in text_insert_help()
386 gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2, in text_insert_help()
404 gtk_text_buffer_insert_with_tags(buffer, &end, title, -1, tag1, in text_insert_msg()
408 gtk_text_buffer_insert_with_tags(buffer, &end, msg, -1, tag2, in text_insert_msg()
440 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); in on_window1_delete_event()
474 if (widget->window == NULL) in on_window1_size_request()
477 gdk_window_get_size(widget->window, &w, &h); in on_window1_size_request()
509 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), in on_load1_activate()
513 (GTK_FILE_SELECTION(fs)->ok_button), in on_load1_activate()
517 (GTK_FILE_SELECTION(fs)->cancel_button), in on_load1_activate()
550 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), in on_save_as1_activate()
554 (GTK_FILE_SELECTION(fs)->ok_button), in on_save_as1_activate()
558 (GTK_FILE_SELECTION(fs)->cancel_button), in on_save_as1_activate()
576 show_name = GTK_CHECK_MENU_ITEM(menuitem)->active; in on_show_name1_activate()
587 show_range = GTK_CHECK_MENU_ITEM(menuitem)->active; in on_show_range1_activate()
605 show_value = GTK_CHECK_MENU_ITEM(menuitem)->active; in on_show_data1_activate()
617 display_tree(&rootmenu); /* instead of update_tree to speed-up */ in on_set_option_mode1_activate()
626 display_tree(&rootmenu); /* instead of update_tree to speed-up */ in on_set_option_mode2_activate()
635 display_tree(&rootmenu); /* instead of update_tree to speed-up */ in on_set_option_mode3_activate()
653 "are interested in, you can still view the help of a grayed-out\n" in on_introduction1_activate()
711 current = current->parent; in on_back_clicked()
712 ptype = current->prompt ? current->prompt->type : P_UNKNOWN; in on_back_clicked()
714 current = current->parent; in on_back_clicked()
792 gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); in renderer_edited()
793 sym = menu->sym; in renderer_edited()
795 gtk_tree_model_get(model2, &iter, COL_VALUE, &old_def, -1); in renderer_edited()
805 /* Change the value of a symbol and update the tree */
808 struct symbol *sym = menu->sym; in change_sym_value()
848 if (!menu->sym) in toggle_sym_value()
851 sym_toggle_tristate_value(menu->sym); in toggle_sym_value()
874 return -1; in column2index()
883 GtkTreeView *view = GTK_TREE_VIEW(widget); in on_treeview2_button_press_event() local
891 gint tx = (gint) event->x; in on_treeview2_button_press_event()
892 gint ty = (gint) event->y; in on_treeview2_button_press_event()
895 gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, in on_treeview2_button_press_event()
898 gtk_tree_view_get_cursor(view, &path, &column); in on_treeview2_button_press_event()
905 gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); in on_treeview2_button_press_event()
908 if (event->type == GDK_2BUTTON_PRESS) { in on_treeview2_button_press_event()
910 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; in on_treeview2_button_press_event()
919 gtk_tree_view_expand_row(view, path, TRUE); in on_treeview2_button_press_event()
924 gtk_tree_view_expand_row(view, path, TRUE); in on_treeview2_button_press_event()
928 gtk_tree_view_expand_row(view, path, TRUE); in on_treeview2_button_press_event()
940 GtkTreeView *view = GTK_TREE_VIEW(widget); in on_treeview2_key_press_event() local
947 gtk_tree_view_get_cursor(view, &path, &column); in on_treeview2_key_press_event()
951 if (event->keyval == GDK_space) { in on_treeview2_key_press_event()
952 if (gtk_tree_view_row_expanded(view, path)) in on_treeview2_key_press_event()
953 gtk_tree_view_collapse_row(view, path); in on_treeview2_key_press_event()
955 gtk_tree_view_expand_row(view, path, FALSE); in on_treeview2_key_press_event()
958 if (event->keyval == GDK_KP_Enter) { in on_treeview2_key_press_event()
964 gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); in on_treeview2_key_press_event()
966 if (!strcasecmp(event->string, "n")) in on_treeview2_key_press_event()
968 else if (!strcasecmp(event->string, "m")) in on_treeview2_key_press_event()
970 else if (!strcasecmp(event->string, "y")) in on_treeview2_key_press_event()
973 col = -1; in on_treeview2_key_press_event()
990 gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); in on_treeview2_cursor_changed()
996 /* User click: display sub-tree in the right frame. */
1001 GtkTreeView *view = GTK_TREE_VIEW(widget); in on_treeview1_button_press_event() local
1007 gint tx = (gint) event->x; in on_treeview1_button_press_event()
1008 gint ty = (gint) event->y; in on_treeview1_button_press_event()
1011 gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, in on_treeview1_button_press_event()
1017 gtk_tree_model_get(model1, &iter, COL_MENU, &menu, -1); in on_treeview1_button_press_event()
1019 if (event->type == GDK_2BUTTON_PRESS) { in on_treeview1_button_press_event()
1029 gtk_tree_view_set_cursor(view, path, NULL, FALSE); in on_treeview1_button_press_event()
1040 struct symbol *sym = menu->sym; in fill_row()
1063 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; in fill_row()
1085 row[COL_NAME] = g_strdup(sym->name); in fill_row()
1088 sym->flags &= ~SYMBOL_CHANGED; in fill_row()
1097 for (child = menu->list; child; child = child->next) { in fill_row()
1099 && child->sym == def_sym) in fill_row()
1107 if (sym->flags & SYMBOL_CHOICEVAL) in fill_row()
1175 gtk_tree_store_set(tree, node, in set_node()
1191 -1); in set_node()
1197 /* Add a node to the tree */
1200 GtkTreeIter *parent = parents[indent - 1]; in place_node()
1203 gtk_tree_store_append(tree, node, parent); in place_node()
1208 /* Find a node in the GTK+ tree */
1226 gtk_tree_model_get(model2, child, 6, &menu, -1); in gtktree_iter_find_node()
1245 * Update the tree by adding/removing entries
1262 for (child1 = src->list; child1; child1 = child1->next) { in update_tree()
1264 sym = child1->sym; in update_tree()
1270 &menu2, -1); in update_tree()
1320 } else if (sym && (sym->flags & SYMBOL_CHANGED)) { in update_tree()
1326 indent--; in update_tree()
1333 /* Display the whole tree (single/split/full view) */
1346 for (child = menu->list; child; child = child->next) { in display_tree()
1347 prop = child->prompt; in display_tree()
1348 sym = child->sym; in display_tree()
1349 ptype = prop ? prop->type : P_UNKNOWN; in display_tree()
1352 sym->flags &= ~SYMBOL_CHANGED; in display_tree()
1355 && !(child->flags & MENU_ROOT) && (tree == tree1)) in display_tree()
1358 if ((view_mode == SPLIT_VIEW) && (child->flags & MENU_ROOT) in display_tree()
1359 && (tree == tree2)) in display_tree()
1368 printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : ""); in display_tree()
1372 printf("%s", sym_type_name(sym->type)); in display_tree()
1374 printf("%s", dbg_sym_flags(sym->flags)); in display_tree()
1380 && (tree == tree2)) in display_tree()
1383 if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) in display_tree()
1387 /* Change paned position if the view is not in 'split mode' */ in display_tree()
1392 if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) in display_tree()
1397 indent--; in display_tree()
1402 /* Display a part of the tree starting at current node (single/split view) */
1414 /* Display the list in the left frame (split view) */
1420 tree = tree1; in display_list()
1423 tree = tree2; in display_list()
1431 menu->flags |= MENU_ROOT; in fixup_rootmenu()
1432 for (child = menu->list; child; child = child->next) { in fixup_rootmenu()
1433 if (child->prompt && child->prompt->type == P_MENU) { in fixup_rootmenu()
1436 menu_cnt--; in fixup_rootmenu()
1451 bind_textdomain_codeset(PACKAGE, "UTF-8"); in main()
1472 if (ac > 1 && av[1][0] == '-') { in main()
1482 printf("%s [-s] <config>\n", av[0]); in main()