Index: gtk/gtkfilechooserentry.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilechooserentry.c,v
retrieving revision 1.20
diff -u -r1.20 gtkfilechooserentry.c
--- gtk/gtkfilechooserentry.c	22 Apr 2004 05:08:19 -0000	1.20
+++ gtk/gtkfilechooserentry.c	27 May 2004 01:38:15 -0000
@@ -22,6 +22,7 @@
 #include <string.h>
 
 #include "gtkcelllayout.h"
+#include "gtkcellrendererpixbuf.h"
 #include "gtkcellrenderertext.h"
 #include "gtkentry.h"
 #include "gtkfilechooserentry.h"
@@ -79,6 +80,11 @@
 						       gint         new_text_length,
 						       gint        *position);
 
+static void	render_mime_icon	  (GtkCellLayout      *layout,
+					   GtkCellRenderer     *cell,
+					   GtkTreeModel	       *model,
+					   GtkTreeIter	       *iter,
+					   gpointer	       user_data);
 static void     clear_completion_callback (GtkFileChooserEntry *chooser_entry,
 					   GParamSpec          *pspec);
 static gboolean match_selected_callback   (GtkEntryCompletion  *completion,
@@ -178,6 +184,14 @@
 				       chooser_entry,
 				       NULL);
 
+  cell = gtk_cell_renderer_pixbuf_new ();
+  gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (comp),
+                              cell, FALSE);
+  gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (comp), 
+				      cell,
+				      render_mime_icon,
+				      chooser_entry, NULL);
+
   cell = gtk_cell_renderer_text_new ();
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (comp),
                               cell, TRUE);
@@ -222,6 +236,38 @@
   g_free (chooser_entry->file_part);
 
   parent_class->finalize (object);
+}
+
+
+static void
+render_mime_icon (GtkCellLayout	      *layout,
+		  GtkCellRenderer     *cell,
+		  GtkTreeModel	      *model,
+		  GtkTreeIter	      *iter,
+		  gpointer	      user_data)
+{
+  GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (user_data);
+  GdkPixbuf *pixbuf;
+  GtkFilePath *path;
+
+  path = NULL;
+  gtk_tree_model_get (model, iter, PATH_COLUMN, &path, -1);
+
+  if (path != NULL)
+    {
+      pixbuf = gtk_file_system_render_icon (chooser_entry->file_system, path,
+					    GTK_WIDGET (chooser_entry), 16,
+					    NULL);
+
+      gtk_file_path_free (path);
+    }
+  else
+    pixbuf = NULL;
+
+  g_object_set (cell, "pixbuf", pixbuf, NULL);
+
+  if (pixbuf != NULL)
+    g_object_unref (pixbuf);
 }
 
 /* Match functions for the GtkEntryCompletion */
