Index: src/gconf-editor-window.c
===================================================================
RCS file: /cvs/gnome/gconf-editor/src/gconf-editor-window.c,v
retrieving revision 1.67
diff -u -r1.67 gconf-editor-window.c
--- src/gconf-editor-window.c	21 Jun 2004 14:36:18 -0000	1.67
+++ src/gconf-editor-window.c	25 Jun 2004 15:42:55 -0000
@@ -774,6 +774,44 @@
 	return FALSE;
 }
 
+static gboolean
+list_model_filter_visible_func (GtkTreeModel *model,
+				GtkTreeIter  *iter,
+				gpointer      window)
+{
+	const gchar *filter_text;
+	gchar       *key_name, *value_string;
+	GConfValue  *value;
+	guint ret = 0;
+
+	filter_text = gtk_entry_get_text (GTK_ENTRY (GCONF_EDITOR_WINDOW (window)->filter_entry));
+	if (!filter_text)
+		return 1;
+
+	gtk_tree_model_get (model, iter,
+			    GCONF_LIST_MODEL_KEY_NAME_COLUMN, &key_name,
+			    GCONF_LIST_MODEL_VALUE_COLUMN, &value,
+			    -1);
+
+	if (g_strrstr (key_name, filter_text))
+		ret = 1;
+	else if (value) {
+		value_string = gconf_value_to_string (value);
+
+		if (g_strrstr (value_string, filter_text))
+			ret = 1;
+
+		g_free (value_string);
+	}
+
+	g_free (key_name);
+
+	if (value)
+		gconf_value_free (value);
+
+	return ret;
+}
+
 static void
 gconf_editor_gconf_value_changed (GConfCellRenderer *cell, const gchar *path_str, GConfValue *new_value, GConfEditorWindow *window)
 {
@@ -1153,7 +1191,7 @@
 static void
 gconf_editor_window_init (GConfEditorWindow *window)
 {
-	GtkWidget *hpaned, *vpaned, *scrolled_window, *vbox;
+	GtkWidget *hpaned, *vpaned, *scrolled_window, *vbox, *list_vbox, *hbox;
 	GdkPixbuf *icon;
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *cell;
@@ -1220,7 +1258,7 @@
 	/* Create status bar */
 	window->statusbar = gtk_statusbar_new ();
 	gtk_box_pack_start (GTK_BOX (vbox), window->statusbar, FALSE, FALSE, 0);
-	
+
 	/* Create tree model and tree view */
 	window->tree_model = gconf_tree_model_new ();
 	window->sorted_tree_model = gtk_tree_model_sort_new_with_model (window->tree_model);
@@ -1266,13 +1304,32 @@
 	gtk_container_add (GTK_CONTAINER (scrolled_window), window->tree_view);
 	gtk_paned_add1 (GTK_PANED (hpaned), scrolled_window);
 
+	/* Create filter entry */
+	hbox = gtk_hbox_new (FALSE, 12);
+	label = gtk_label_new_with_mnemonic ("_Search:");
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+	window->filter_entry = gtk_entry_new ();
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), window->filter_entry);
+	gtk_container_add (GTK_CONTAINER (hbox), window->filter_entry);
+
+	/* Create key list/filter container */
+	list_vbox = gtk_vbox_new (FALSE, 6);
+	gtk_box_pack_start (GTK_BOX (list_vbox), hbox, FALSE, FALSE, 0);
+
 	/* Create list model and list view */
 	window->list_model = gconf_list_model_new ();
-	window->sorted_list_model = gtk_tree_model_sort_new_with_model (window->list_model);
+	window->filter_list_model = gtk_tree_model_filter_new (window->list_model, NULL);
+	window->sorted_list_model = gtk_tree_model_sort_new_with_model (window->filter_list_model);
 	window->list_view = gtk_tree_view_new_with_model (window->sorted_list_model);
 	g_object_unref (G_OBJECT (window->list_model));
+	g_object_unref (G_OBJECT (window->filter_list_model));
 	g_object_unref (G_OBJECT (window->sorted_list_model));
 
+	gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (window->filter_list_model),
+						list_model_filter_visible_func,
+						window, NULL);
+
 	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (window->sorted_list_model),
 					      GCONF_LIST_MODEL_KEY_NAME_COLUMN, GTK_SORT_ASCENDING);
 
@@ -1280,6 +1337,8 @@
 			  G_CALLBACK (gconf_editor_window_list_view_popup_menu), window);
 	g_signal_connect (window->list_view, "row_activated",
 			  G_CALLBACK (gconf_editor_window_list_view_row_activated), window);
+	g_signal_connect_swapped (window->filter_entry, "changed",
+				  G_CALLBACK (gtk_tree_model_filter_refilter), window->filter_list_model);
 
 	g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (window->list_view)), "changed",
 			  G_CALLBACK (gconf_editor_window_update_list_selection), window);
@@ -1328,11 +1387,12 @@
 					GTK_POLICY_AUTOMATIC,
 					GTK_POLICY_AUTOMATIC);
 	gtk_container_add (GTK_CONTAINER (scrolled_window), window->list_view);
+	gtk_container_add (GTK_CONTAINER (list_vbox), scrolled_window);
 
 	vpaned = gtk_vpaned_new ();
 	gtk_paned_add2 (GTK_PANED (hpaned), vpaned);
 
-	gtk_paned_pack1 (GTK_PANED (vpaned), scrolled_window, TRUE, FALSE);
+	gtk_paned_pack1 (GTK_PANED (vpaned), list_vbox, TRUE, FALSE);
 
 	/* Create details area */
 	label = gtk_label_new (NULL);
Index: src/gconf-editor-window.h
===================================================================
RCS file: /cvs/gnome/gconf-editor/src/gconf-editor-window.h,v
retrieving revision 1.15
diff -u -r1.15 gconf-editor-window.h
--- src/gconf-editor-window.h	18 Jun 2004 17:38:24 -0000	1.15
+++ src/gconf-editor-window.h	25 Jun 2004 15:42:56 -0000
@@ -47,9 +47,12 @@
 	GtkWidget *tree_view;
 	GtkTreeModel *tree_model;
 	GtkTreeModel *sorted_tree_model;
-	
+
+	GtkWidget *filter_entry;
+
 	GtkWidget *list_view;
 	GtkTreeModel *list_model;
+	GtkTreeModel *filter_list_model;
 	GtkTreeModel *sorted_list_model;
 	
 	GtkWidget *statusbar;
