Ethereal-dev: [Ethereal-dev] A small patch to gtk/dfilter_expr_dlg.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Paul Ionescu <paul@xxxxxxxx>
Date: Fri, 28 Dec 2001 21:23:54 +0200
Hello all,

Attached is a small patch to keep consistency between the line/expander
style of "Add expresion" from display filters and the rest of saved
option for line/expander style.
I think this is a nice thing to have.
Please commit if it is OK.


-- 

Air conditioned. Do _NOT_ open Windows.
--- gtk/dfilter_expr_dlg.c.old	Fri Dec 28 21:11:26 2001
+++ gtk/dfilter_expr_dlg.c	Fri Dec 28 21:10:42 2001
@@ -973,11 +973,18 @@
 	gtk_widget_set_usize(tree_scrolled_win, 300, 400);
 	gtk_box_pack_start(GTK_BOX(col1_vb), tree_scrolled_win, FALSE, FALSE, 0);
 	gtk_widget_show(tree_scrolled_win);
 
 	tree = gtk_ctree_new(1, 0);
-	gtk_ctree_set_line_style(GTK_CTREE(tree), GTK_CTREE_LINES_NONE);
+	g_assert(prefs.gui_ptree_line_style >= GTK_CTREE_LINES_NONE &&
+		prefs.gui_ptree_line_style <= GTK_CTREE_LINES_TABBED);
+	gtk_ctree_set_line_style(GTK_CTREE(tree), prefs.gui_ptree_line_style);
+	g_assert(prefs.gui_ptree_expander_style >= GTK_CTREE_EXPANDER_NONE &&
+		prefs.gui_ptree_expander_style <= GTK_CTREE_EXPANDER_CIRCULAR);
+	gtk_ctree_set_expander_style(GTK_CTREE(tree),
+		prefs.gui_ptree_expander_style);
+
 	gtk_signal_connect(GTK_OBJECT(tree), "tree-select-row",
 			     GTK_SIGNAL_FUNC(field_select_row_cb), tree);
 	gtk_container_add(GTK_CONTAINER(tree_scrolled_win), tree);
 
 	/*