Index: ChangeLog
===================================================================
--- ChangeLog	(revision 8446)
+++ ChangeLog	(working copy)
@@ -1,3 +1,26 @@
+2009-02-28  Dennis Cranston  <dennis_cranston@yahoo.com>
+
+	* Makefile.am:
+	* gsearchtool-callbacks.c (file_changed_cb), (move_to_trash_cb),
+	(file_motion_notify_cb):
+	* gsearchtool-callbacks.h: 
+	* gsearchtool-spinner.c (gsearch_spinner_cache_data_load),
+	(bump_spinner_frame_cb): Use process-working spinner animation
+	* gsearchtool-support.c (get_file_type_description),
+	(gsearchtool_get_thumbnail_image), (get_themed_icon_pixbuf),
+	(get_file_pixbuf), (open_file_with_application), (launch_file):
+	* gsearchtool-support.h:
+	* gsearchtool.c (start_animation), (stop_animation),
+	(add_file_to_search_results), (update_search_counts),
+	(intermediate_file_count_update), (tree_model_iter_free_monitor),
+	(create_search_results_section), (gsearch_app_create):  Remove
+	the old animation from the gui and display a small spinner when 
+	searching.
+	* gsearchtool.h:
+	Bug 543713: Port to GIO 
+	Bug 564147 & 567159: Display resize cursor when resizing columns
+	Bug 524574: Use the new gvfs Trash system
+
 2009-02-25  Cosimo Cecchi  <cosimoc@gnome.org>
 
 	* gsearchtool.h: get rid of deprecated GTK_CHECK_* macros.
 
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 8428)
+++ Makefile.am	(working copy)
@@ -4,7 +4,6 @@
 
 INCLUDES = 	\
 	$(GNOME_UTILS_CFLAGS)					\
-	$(GNOMEVFS_CFLAGS)					\
 	$(GNOMEDESKTOP_CFLAGS)					\
 	$(LIBGNOME_CFLAGS)					\
 	-DG_DISABLE_DEPRECATED					\
@@ -33,7 +32,6 @@
 gnome_search_tool_LDADD =   \
 	$(LIBGNOME_LIBS)    \
 	$(GNOME_UTILS_LIBS) \
-	$(GNOMEVFS_LIBS)    \
 	$(GNOMEDESKTOP_LIBS)
 
 man_MANS = gnome-search-tool.1
Index: gsearchtool-callbacks.h
===================================================================
--- gsearchtool-callbacks.h	(revision 8428)
+++ gsearchtool-callbacks.h	(working copy)
@@ -82,10 +82,10 @@
 open_folder_cb (GtkAction * action,
                 gpointer data);
 void
-file_changed_cb (GnomeVFSMonitorHandle * handle,
+file_changed_cb (GFileMonitor * handle,
                  const gchar * monitor_uri,
                  const gchar * info_uri,
-                 GnomeVFSMonitorEventType event_type,
+                 GFileMonitorEvent event_type,
                  gpointer data);
 void
 move_to_trash_cb (GtkAction * action,
@@ -102,13 +102,6 @@
               guint time,
               gpointer data);
 void
-drag_data_animation_cb (GtkWidget * widget,
-                        GdkDragContext * context,
-                        GtkSelectionData * selection_data,
-                        guint info,
-                        guint time,
-                        gpointer data);
-void
 show_file_selector_cb (GtkAction * action,
                        gpointer data);
 void
Index: gsearchtool.h
===================================================================
--- gsearchtool.h	(revision 8428)
+++ gsearchtool.h	(working copy)
@@ -164,7 +164,7 @@
 struct _GSearchMonitor {
 	GSearchWindow         * gsearch;
 	GtkTreeRowReference   * reference;
-	GnomeVFSMonitorHandle * handle;
+	GFileMonitor          * handle;
 };
 
 GType
@@ -200,8 +200,6 @@
                    gchar *** argvp,
                    gpointer client_data,
                    gboolean escape_values);
-gchar *
-get_desktop_item_name (GSearchWindow * gsearch);
 
 void
 update_search_counts (GSearchWindow * gsearch);
Index: gsearchtool-support.h
===================================================================
--- gsearchtool-support.h	(revision 8428)
+++ gsearchtool-support.h	(working copy)
@@ -99,11 +99,10 @@
                              struct tm * time_pieces);
 gchar *
 get_file_type_description (const gchar * file,
-                           GnomeVFSFileInfo * file_info);
+                           GFileInfo * file_info);
 GdkPixbuf *
 get_file_pixbuf (GSearchWindow * gsearch,
-                 const gchar * file,
-                 GnomeVFSFileInfo * file_info);
+                 GFileInfo * file_info);
 gboolean
 open_file_with_nautilus (GtkWidget * window,
                          const gchar * file);
Index: gsearchtool.c
===================================================================
--- gsearchtool.c	(revision 8428)
+++ gsearchtool.c	(working copy)
@@ -40,9 +40,7 @@
 #include <sys/wait.h>
 #include <glib/gi18n.h>
 #include <gdk/gdk.h>
-#include <libgnomevfs/gnome-vfs-mime.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
+#include <gio/gio.h>
 
 #include <gnome.h>
 
@@ -51,7 +49,7 @@
 #include "gsearchtool-support.h"
 #include "gsearchtool-spinner.h"
 
-#define GNOME_SEARCH_TOOL_DEFAULT_ICON_SIZE 48
+#define GNOME_SEARCH_TOOL_DEFAULT_ICON_SIZE 16
 #define GNOME_SEARCH_TOOL_STOCK "panel-searchtool"
 #define GNOME_SEARCH_TOOL_REFRESH_DURATION  50000
 #define LEFT_LABEL_SPACING "     "
@@ -519,6 +517,7 @@
 		gtk_label_set_text (GTK_LABEL (gsearch->files_found_label), "");
 		if (gsearchtool_gconf_get_boolean ("/desktop/gnome/interface/enable_animations")) {
 			gsearch_spinner_start (GSEARCH_SPINNER (gsearch->progress_spinner));
+			gtk_widget_show (gsearch->progress_spinner);
 		}
 		g_free (title);
 
@@ -549,6 +548,7 @@
 	gtk_widget_set_sensitive (gsearch->name_and_folder_table, TRUE);
 	gtk_widget_set_sensitive (gsearch->find_button, TRUE);
 	gtk_widget_set_sensitive (gsearch->search_results_save_results_as_item, TRUE);
+	gtk_widget_hide (gsearch->progress_spinner);
 	gtk_widget_hide (gsearch->stop_button);
 	gtk_widget_show (gsearch->find_button);
 
@@ -828,11 +828,13 @@
 {
 	GdkPixbuf * pixbuf;
 	GSearchMonitor * monitor;
-	GnomeVFSFileInfo * vfs_file_info;
-	GnomeVFSMonitorHandle * handle;
-	GnomeVFSResult result;
-	GtkTreePath *path;
-	GtkTreeRowReference *reference;
+	GFileMonitor * handle;
+	GFileInfo * file_info;
+	GFile * g_file;
+	GError * error = NULL;
+	GTimeVal time_val;
+	GtkTreePath * path;
+	GtkTreeRowReference * reference;
 	gchar * description;
 	gchar * readable_size;
 	gchar * readable_date;
@@ -843,7 +845,6 @@
 	gchar * dir_name;
 	gchar * relative_dir_name;
 	gchar * look_in_folder;
-	gchar * escape_path_string;
 
 	if (g_hash_table_lookup_extended (gsearch->search_results_filename_hash_table, file, NULL, NULL) == TRUE) {
 		return;
@@ -859,21 +860,17 @@
 	if (gtk_tree_view_get_headers_visible (GTK_TREE_VIEW (gsearch->search_results_tree_view)) == FALSE) {
 		gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (gsearch->search_results_tree_view), TRUE);
 	}
+	
+	g_file = g_file_new_for_path (file);
+	file_info = g_file_query_info (g_file, "standard::*,time::modified,thumbnail::path", 0, NULL, NULL);
 
-	vfs_file_info = gnome_vfs_file_info_new ();
-	escape_path_string = gnome_vfs_escape_path_string (file);
-	gnome_vfs_get_file_info (escape_path_string, vfs_file_info,
-	                         GNOME_VFS_FILE_INFO_DEFAULT |
-	                         GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
-	                         GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE |
-	                         GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
+	pixbuf = get_file_pixbuf (gsearch, file_info);
+	description = get_file_type_description (file, file_info);
+	readable_size = g_format_size_for_display (g_file_info_get_size (file_info));
 
-	pixbuf = get_file_pixbuf (gsearch, file, vfs_file_info);
-	description = get_file_type_description (file, vfs_file_info);
+	g_file_info_get_modification_time (file_info, &time_val);
+	readable_date = get_readable_date (gsearch->search_results_date_format_string, time_val.tv_sec); 
 
-	readable_size = gnome_vfs_format_file_size_for_display (vfs_file_info->size);
-	readable_date = get_readable_date (gsearch->search_results_date_format_string, vfs_file_info->mtime);
-
 	base_name = g_path_get_basename (file);
 	dir_name = g_path_get_dirname (file);
 
@@ -908,10 +905,10 @@
 			    COLUMN_RELATIVE_PATH, utf8_relative_dir_name,
 			    COLUMN_PATH, utf8_dir_name,
 			    COLUMN_READABLE_SIZE, readable_size,
-			    COLUMN_SIZE, (-1) * (gdouble) vfs_file_info->size,
-			    COLUMN_TYPE, (description != NULL) ? description : vfs_file_info->mime_type,
+			    COLUMN_SIZE, (-1) * (gdouble) g_file_info_get_size(file_info),
+			    COLUMN_TYPE, (description != NULL) ? description : g_strdup (g_file_info_get_content_type (file_info)),
 			    COLUMN_READABLE_DATE, readable_date,
-			    COLUMN_DATE, (-1) * (gdouble) vfs_file_info->mtime,
+			    COLUMN_DATE, (-1) * (gdouble) time_val.tv_sec,
 			    COLUMN_NO_FILES_FOUND, FALSE,
 			    -1);
 
@@ -921,22 +918,27 @@
 		reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (store), path);
 		gtk_tree_path_free (path);
 
-		result = gnome_vfs_monitor_add (&handle, file, GNOME_VFS_MONITOR_FILE,
-						(GnomeVFSMonitorCallback) file_changed_cb, monitor);
-		if (result == GNOME_VFS_OK) {
+		handle = g_file_monitor_file (g_file, G_FILE_MONITOR_EVENT_DELETED, NULL, &error);
+
+		if (error == NULL) {
 			monitor->gsearch = gsearch;
 			monitor->reference = reference;
 			monitor->handle = handle;
 			gtk_list_store_set (GTK_LIST_STORE (store), iter,
 			                    COLUMN_MONITOR, monitor, -1);
+
+			g_signal_connect (handle, "changed",
+					  G_CALLBACK (file_changed_cb), monitor);
 		}
 		else {
 			gtk_tree_row_reference_free (reference);
 			g_slice_free (GSearchMonitor, monitor);
+			g_clear_error (&error);
 		}
 	}
 
-	gnome_vfs_file_info_unref (vfs_file_info);
+	g_object_unref (g_file);
+	g_object_unref (file_info);
 	g_free (base_name);
 	g_free (dir_name);
 	g_free (relative_dir_name);
@@ -944,7 +946,6 @@
 	g_free (utf8_dir_name);
 	g_free (utf8_relative_dir_name);
 	g_free (look_in_folder);
-	g_free (escape_path_string);
 	g_free (description);
 	g_free (readable_size);
 	g_free (readable_date);
@@ -997,12 +998,12 @@
 		add_no_files_found_message (gsearch);
 	}
 	else {
-		title_bar_string = g_strdup_printf (ngettext ("%d File Found",
-					                      "%d Files Found",
+		title_bar_string = g_strdup_printf (ngettext ("%'d File Found",
+					                      "%'d Files Found",
 					                      total_files),
 						    total_files);
-		message_string = g_strdup_printf (ngettext ("%d file found",
-					                    "%d files found",
+		message_string = g_strdup_printf (ngettext ("%'d file found",
+					                    "%'d files found",
 					                    total_files),
 						  total_files);
 	}
@@ -1039,8 +1040,8 @@
 
 	if (count > 0) {
 
-		string = g_strdup_printf (ngettext ("%d file found",
-		                                    "%d files found",
+		string = g_strdup_printf (ngettext ("%'d file found",
+		                                    "%'d files found",
 		                                    count),
 		                          count);
 
@@ -1061,7 +1062,7 @@
 
 	gtk_tree_model_get (model, iter, COLUMN_MONITOR, &monitor, -1);
 	if (monitor) {
-		gnome_vfs_monitor_cancel (monitor->handle);
+		g_file_monitor_cancel (monitor->handle);
 		gtk_tree_row_reference_free (monitor->reference);
 		g_slice_free (GSearchMonitor, monitor);
 	}
@@ -1284,97 +1285,6 @@
 
 }
 
-gchar *
-get_desktop_item_name (GSearchWindow * gsearch)
-{
-
-	GString * gs;
-	gchar * file_is_named_utf8;
-	gchar * file_is_named_locale;
-	gchar * look_in_folder_utf8;
-	gchar * look_in_folder_locale;
-	GList * list;
-
-	gs = g_string_new ("");
-	g_string_append (gs, _("Search for Files"));
-	g_string_append (gs, " (");
-
-	file_is_named_utf8 = (gchar *) gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry (GNOME_ENTRY (gsearch->name_contains_entry))));
-	file_is_named_locale = g_locale_from_utf8 (file_is_named_utf8 != NULL ? file_is_named_utf8 : "" ,
-	                                           -1, NULL, NULL, NULL);
-	g_string_append_printf (gs, "named=%s", file_is_named_locale);
-	g_free (file_is_named_locale);
-
-	look_in_folder_utf8 = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (gsearch->look_in_folder_button));
-	look_in_folder_locale = g_locale_from_utf8 (look_in_folder_utf8 != NULL ? look_in_folder_utf8 : "",
-	                                            -1, NULL, NULL, NULL);
-	g_string_append_printf (gs, "&path=%s", look_in_folder_locale);
-	g_free (look_in_folder_locale);
-	g_free (look_in_folder_utf8);
-
-	if (GTK_WIDGET_VISIBLE (gsearch->available_options_vbox)) {
-		for (list = gsearch->available_options_selected_list; list != NULL; list = g_list_next (list)) {
-			GSearchConstraint * constraint = list->data;
-			gchar * locale = NULL;
-
-			switch (constraint->constraint_id) {
-			case SEARCH_CONSTRAINT_CONTAINS_THE_TEXT:
-				locale = g_locale_from_utf8 (constraint->data.text, -1, NULL, NULL, NULL);
-				g_string_append_printf (gs, "&contains=%s", locale);
-				break;
-			case SEARCH_CONSTRAINT_DATE_MODIFIED_BEFORE:
-				g_string_append_printf (gs, "&mtimeless=%d", constraint->data.time);
-				break;
-			case SEARCH_CONSTRAINT_DATE_MODIFIED_AFTER:
-				g_string_append_printf (gs, "&mtimemore=%d", constraint->data.time);
-				break;
-			case SEARCH_CONSTRAINT_SIZE_IS_MORE_THAN:
-				g_string_append_printf (gs, "&sizemore=%u", constraint->data.number);
-				break;
-			case SEARCH_CONSTRAINT_SIZE_IS_LESS_THAN:
-				g_string_append_printf (gs, "&sizeless=%u", constraint->data.number);
-				break;
-			case SEARCH_CONSTRAINT_FILE_IS_EMPTY:
-				g_string_append (gs, "&empty");
-				break;
-			case SEARCH_CONSTRAINT_OWNED_BY_USER:
-				locale = g_locale_from_utf8 (constraint->data.text, -1, NULL, NULL, NULL);
-				g_string_append_printf (gs, "&user=%s", locale);
-				break;
-			case SEARCH_CONSTRAINT_OWNED_BY_GROUP:
-				locale = g_locale_from_utf8 (constraint->data.text, -1, NULL, NULL, NULL);
-				g_string_append_printf (gs, "&group=%s", locale);
-				break;
-			case SEARCH_CONSTRAINT_OWNER_IS_UNRECOGNIZED:
-				g_string_append (gs, "&nouser");
-				break;
-			case SEARCH_CONSTRAINT_FILE_IS_NOT_NAMED:
-				locale = g_locale_from_utf8 (constraint->data.text, -1, NULL, NULL, NULL);
-				g_string_append_printf (gs, "&notnamed=%s", locale);
-				break;
-			case SEARCH_CONSTRAINT_FILE_MATCHES_REGULAR_EXPRESSION:
-				locale = g_locale_from_utf8 (constraint->data.text, -1, NULL, NULL, NULL);
-				g_string_append_printf (gs, "&regex=%s", locale);
-				break;
-			case SEARCH_CONSTRAINT_SHOW_HIDDEN_FILES_AND_FOLDERS:
-				g_string_append (gs, "&hidden");
-				break;
-			case SEARCH_CONSTRAINT_FOLLOW_SYMBOLIC_LINKS:
-				g_string_append (gs, "&follow");
-				break;
-			case SEARCH_CONSTRAINT_SEARCH_OTHER_FILESYSTEMS:
-				g_string_append (gs, "&allmounts");
-				break;
-			default:
-				break;
-			}
-		g_free (locale);
-		}
-	}
-	g_string_append_c (gs, ')');
-	return g_string_free (gs, FALSE);
-}
-
 static void
 gsearch_setup_goption_descriptions (void)
 {
@@ -2368,17 +2278,21 @@
 
 	vbox = gtk_vbox_new (FALSE, 6);
 
-	hbox = gtk_hbox_new (FALSE, 12);
+	hbox = gtk_hbox_new (FALSE, 6);
 	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
 	label = gtk_label_new_with_mnemonic (_("S_earch results:"));
 	g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
-	gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
 
+	gsearch->progress_spinner = gsearch_spinner_new ();
+	gsearch_spinner_set_size ((GSearchSpinner *)gsearch->progress_spinner, GTK_ICON_SIZE_MENU);
+	gtk_box_pack_start (GTK_BOX (hbox), gsearch->progress_spinner, FALSE, FALSE, 0);
+
 	gsearch->files_found_label = gtk_label_new (NULL);
 	gtk_label_set_selectable (GTK_LABEL (gsearch->files_found_label), TRUE);
 	g_object_set (G_OBJECT (gsearch->files_found_label), "xalign", 1.0, NULL);
-	gtk_box_pack_start (GTK_BOX (hbox), gsearch->files_found_label, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (hbox), gsearch->files_found_label, TRUE, TRUE, 0);
 
 	window = gtk_scrolled_window_new (NULL, NULL);
 	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (window), GTK_SHADOW_IN);
@@ -2853,7 +2767,6 @@
 static GtkWidget *
 gsearch_app_create (GSearchWindow * gsearch)
 {
-	GtkTargetEntry drag_types[] = {{ "text/uri-list", 0, 0 }};
 	gchar * locale_string;
 	gchar * utf8_string;
 	GtkWidget * hbox;
@@ -2862,7 +2775,6 @@
 	GtkWidget * label;
 	GtkWidget * button;
 	GtkWidget * container;
-	GdkPixbuf * pixbuf;
 
 	gsearch->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 	gsearch->is_window_maximized = gsearchtool_gconf_get_boolean ("/apps/gnome-search-tool/default_window_maximized");
@@ -2891,39 +2803,9 @@
 	gtk_container_add (GTK_CONTAINER (gsearch->window), container);
 	gtk_container_set_border_width (GTK_CONTAINER (container), 12);
 
-	hbox = gtk_hbox_new (FALSE, 12);
+	hbox = gtk_hbox_new (FALSE, 6);
 	gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0);
 
-	vbox = gtk_vbox_new (FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
-
-	gsearch->progress_spinner = gsearch_spinner_new ();
-	gtk_widget_show (gsearch->progress_spinner);
-	gtk_box_pack_start (GTK_BOX (vbox), gsearch->progress_spinner, FALSE, FALSE, 0);
-
-	gtk_drag_source_set (gsearch->progress_spinner,
-			     GDK_BUTTON1_MASK,
-			     drag_types,
-			     G_N_ELEMENTS (drag_types),
-			     GDK_ACTION_COPY);
-
-	pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
-	                                   GNOME_SEARCH_TOOL_ICON,
-	                                   GNOME_SEARCH_TOOL_DEFAULT_ICON_SIZE,
-	                                   0,
-	                                   NULL);
-	if (pixbuf) {
-		gtk_drag_source_set_icon_pixbuf (gsearch->progress_spinner, pixbuf);
-	}
-	else {
-		gtk_drag_source_set_icon_stock (gsearch->progress_spinner, GTK_STOCK_FIND);
-	}
-
-	g_signal_connect (G_OBJECT (gsearch->progress_spinner),
-			  "drag_data_get",
-			  G_CALLBACK (drag_data_animation_cb),
-			  (gpointer) gsearch);
-
 	gsearch->name_and_folder_table = gtk_table_new (2, 2, FALSE);
 	gtk_table_set_row_spacings (GTK_TABLE (gsearch->name_and_folder_table), 6);
 	gtk_table_set_col_spacings (GTK_TABLE (gsearch->name_and_folder_table), 12);
@@ -3045,6 +2927,7 @@
 
 	gtk_widget_show_all (container);
 	gtk_widget_hide (gsearch->available_options_vbox);
+	gtk_widget_hide (gsearch->progress_spinner);
 	gtk_widget_hide (gsearch->stop_button);
 
 	gtk_window_set_focus (GTK_WINDOW (gsearch->window),
Index: gsearchtool-callbacks.c
===================================================================
--- gsearchtool-callbacks.c	(revision 8428)
+++ gsearchtool-callbacks.c	(working copy)
@@ -35,9 +35,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <libgnomevfs/gnome-vfs-find-directory.h>
+#include <gio/gio.h>
 #include <libgnome/gnome-desktop-item.h>
 
 #include <gnome.h>
@@ -607,10 +605,10 @@
 }
 
 void
-file_changed_cb (GnomeVFSMonitorHandle * handle,
+file_changed_cb (GFileMonitor * handle,
                  const gchar * monitor_uri,
                  const gchar * info_uri,
-                 GnomeVFSMonitorEventType event_type,
+                 GFileMonitorEvent event_type,
                  gpointer data)
 {
 	GSearchMonitor * monitor = data;
@@ -620,7 +618,7 @@
 	GtkTreeIter iter;
 
 	switch (event_type) {
-	case GNOME_VFS_MONITOR_EVENT_DELETED:
+	case G_FILE_MONITOR_EVENT_DELETED:
 		path = gtk_tree_row_reference_get_path (monitor->reference);
 		model = gtk_tree_row_reference_get_model (monitor->reference);
 		gtk_tree_model_get_iter (model, &iter, path);
@@ -735,36 +733,6 @@
 	g_free (primary);
 }
 
-static char *
-get_trash_path (const gchar * file)
-{
-	GnomeVFSURI * trash_uri;
-	GnomeVFSURI * uri;
-	gchar       * filename;
-
-	filename = gnome_vfs_escape_path_string (file);
-	uri = gnome_vfs_uri_new (filename);
-	g_free (filename);
-
-	gnome_vfs_find_directory (uri,
-				  GNOME_VFS_DIRECTORY_KIND_TRASH,
-				  &trash_uri,
-				  TRUE,
-				  TRUE,
-				  0777);
-	gnome_vfs_uri_unref (uri);
-
-	if (trash_uri == NULL) {
-		return NULL;
-	}
-	else {
-		gchar * trash_path;
-		trash_path = gnome_vfs_uri_to_string (trash_uri, GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD);
-		gnome_vfs_uri_unref (trash_uri);
-		return trash_path;
-	}
-}
-
 void
 move_to_trash_cb (GtkAction * action,
                   gpointer data)
@@ -784,12 +752,15 @@
 		gboolean no_files_found = FALSE;
 		GtkTreeModel * model;
 		GtkTreeIter iter;
+		GFile * g_file;
+		GError * error;
 		GList * list;
 		gchar * utf8_basename;
 		gchar * utf8_basepath;
 		gchar * utf8_filename;
 		gchar * locale_filename;
-		gchar * trash_path;
+		gchar * source_uri;
+		gboolean result;
 
 		list = gtk_tree_selection_get_selected_rows (GTK_TREE_SELECTION (gsearch->search_results_selection),
  		                                             &model);
@@ -815,7 +786,6 @@
 
 		utf8_filename = g_build_filename (utf8_basepath, utf8_basename, NULL);
 		locale_filename = g_locale_from_utf8 (utf8_filename, -1, NULL, NULL, NULL);
-		trash_path = get_trash_path (locale_filename);
 
 		if ((!g_file_test (locale_filename, G_FILE_TEST_EXISTS)) &&
 		    (!g_file_test (locale_filename, G_FILE_TEST_IS_SYMLINK))) {
@@ -823,55 +793,19 @@
 			display_dialog_could_not_move_to_trash (gsearch->window, utf8_basename,
 			                                        _("The document does not exist."));
 		}
-		else if (trash_path != NULL) {
-			GnomeVFSResult result;
-			gchar * basename;
-			gchar * destination;
-			gchar * destination_uri;
-			gchar * source_uri;
 
-			basename = g_locale_from_utf8 (utf8_basename, -1, NULL, NULL, NULL);
-			destination = g_build_filename (trash_path, basename, NULL);
+		source_uri = g_filename_to_uri (locale_filename, NULL, NULL);
+		g_file = g_file_new_for_uri (source_uri);
+		g_free (source_uri);
 
-			/* Bugzilla #404158: Do not overwrite existing files in the trash folder */
-			while (g_file_test (destination, G_FILE_TEST_EXISTS)) {
-				gchar * temp;
+		result = g_file_trash (g_file, NULL, &error);
+		gtk_tree_selection_unselect_iter (GTK_TREE_SELECTION (gsearch->search_results_selection), &iter);
+		g_object_unref (g_file);
 
-				temp = g_strdup (basename);
-				g_free (basename);
-
-				basename = gsearchtool_get_next_duplicate_name (temp);
-				g_free (destination);
-				g_free (temp);
-
-				destination = g_build_filename (trash_path, basename, NULL);
-			}
-			
-			destination_uri = g_filename_to_uri (destination, NULL, NULL);
-			source_uri = g_filename_to_uri (locale_filename, NULL, NULL);
-
-			result = gnome_vfs_move (source_uri, destination_uri, TRUE);
-			gtk_tree_selection_unselect_iter (GTK_TREE_SELECTION (gsearch->search_results_selection), &iter);
-
-			if (result == GNOME_VFS_OK) {
-				tree_model_iter_free_monitor (GTK_TREE_MODEL (gsearch->search_results_list_store),
-							      NULL, &iter, NULL);
-				gtk_list_store_remove (GTK_LIST_STORE (gsearch->search_results_list_store), &iter);
-			}
-			else {
-				gchar * message;
-
-				message = g_strdup_printf (_("Moving \"%s\" failed: %s."),
-				                           utf8_filename,
-				                           gnome_vfs_result_to_string (result));
-				display_dialog_could_not_move_to_trash (gsearch->window, utf8_basename,
- 				                                        message);
-				g_free (message);
-			}
-			g_free (basename);
-			g_free (destination);
-			g_free (destination_uri);
-			g_free (source_uri);			
+		if (result == TRUE) {
+			tree_model_iter_free_monitor (GTK_TREE_MODEL (gsearch->search_results_list_store),
+						      NULL, &iter, NULL);
+			gtk_list_store_remove (GTK_LIST_STORE (gsearch->search_results_list_store), &iter);
 		}
 		else {
 			gint response;
@@ -880,16 +814,19 @@
 			response = display_dialog_delete_permanently (gsearch->window, utf8_filename);
 
 			if (response == GTK_RESPONSE_OK) {
-				GnomeVFSResult result;
+				gboolean result;
+				GError * error;
+				GFile * g_file;
+				gchar * source_uri;
 
-				if (!g_file_test (locale_filename, G_FILE_TEST_IS_DIR)) {
-					result = gnome_vfs_unlink (locale_filename);
-				}
-				else {
-					result = gnome_vfs_remove_directory (locale_filename);
-				}
+				source_uri = g_filename_to_uri (locale_filename, NULL, NULL);
+				g_file = g_file_new_for_uri (source_uri);
+				g_free (source_uri);
 
-				if (result == GNOME_VFS_OK) {
+				result = g_file_delete (g_file, NULL, &error);
+				g_object_unref (g_file);
+
+				if (result == TRUE) {
 					tree_model_iter_free_monitor (GTK_TREE_MODEL (gsearch->search_results_list_store),
 								      NULL, &iter, NULL);
 					gtk_list_store_remove (GTK_LIST_STORE (gsearch->search_results_list_store), &iter);
@@ -898,13 +835,25 @@
 					gchar * message;
 
 					message = g_strdup_printf (_("Deleting \"%s\" failed: %s."),
-					                             utf8_filename, gnome_vfs_result_to_string (result));
+					                             utf8_filename, error->message);
 
 					display_dialog_could_not_delete (gsearch->window, utf8_basename, message);
 
+					g_error_free (error);
 					g_free (message);
 				}
 			}
+			else {
+				gchar * message;
+
+				message = g_strdup_printf (_("Moving \"%s\" failed: %s."),
+				                           utf8_filename,
+				                           error->message);
+				display_dialog_could_not_move_to_trash (gsearch->window, utf8_basename,
+				                                        message);
+				g_error_free (error);
+				g_free (message);
+			}
 		}
 		g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
 		g_list_free (list);
@@ -912,7 +861,6 @@
 		g_free (utf8_filename);
 		g_free (utf8_basename);
 		g_free (utf8_basepath);
-		g_free (trash_path);
 	}
 
 	/* Bugzilla #397945: Select next row in the search results list */
@@ -1092,12 +1040,10 @@
 	GtkTreeIter iter;
 
 	if (gsearch->is_search_results_single_click_to_activate == FALSE) {
-		gdk_window_set_cursor (event->window, NULL);
 		return FALSE;
 	}
 
 	if (event->window != gtk_tree_view_get_bin_window (GTK_TREE_VIEW (gsearch->search_results_tree_view))) {
-		gdk_window_set_cursor (event->window, NULL);
                 return FALSE;
 	}
 
@@ -1274,76 +1220,7 @@
 	g_free (uri_list);
 }
 
-void
-drag_data_animation_cb (GtkWidget * widget,
-                        GdkDragContext * context,
-                        GtkSelectionData * selection_data,
-                        guint info,
-                        guint time,
-                        gpointer data)
-{
-	GSearchWindow * gsearch = data;
-	GnomeDesktopItem * ditem;
-	GString * command = g_string_new ("");
-	gchar ** argv;
-	gchar * desktop_item_name = NULL;
-	gchar * uri;
-	gchar * path;
-	gchar * disk;
-	gchar * scheme;
-	gint argc;
-	gint index;
 
-	set_clone_command (gsearch, &argc, &argv, "gnome-search-tool", TRUE);
-
-	if (argc == 0) {
-		return;
-	}
-
-	for (index = 0; index < argc; index++) {
-		command = g_string_append (command, argv[index]);
-		command = g_string_append_c (command, ' ');
-	}
-	command = g_string_append (command, "--start");
-
-	disk = g_locale_from_utf8 (command->str, -1, NULL, NULL, NULL);
-	uri = gnome_vfs_make_uri_from_input_with_dirs (disk, GNOME_VFS_MAKE_URI_DIR_HOMEDIR);
-	scheme = gnome_vfs_get_uri_scheme (uri);
-
-	ditem = gnome_desktop_item_new ();
-
-	gnome_desktop_item_set_entry_type (ditem, GNOME_DESKTOP_ITEM_TYPE_APPLICATION);
-	gnome_desktop_item_set_string (ditem, GNOME_DESKTOP_ITEM_EXEC, command->str);
-
-	desktop_item_name = get_desktop_item_name (gsearch);
-
-	gnome_desktop_item_set_string (ditem, GNOME_DESKTOP_ITEM_NAME, desktop_item_name);
-	gnome_desktop_item_set_boolean (ditem, GNOME_DESKTOP_ITEM_TERMINAL, FALSE);
-	gnome_desktop_item_set_string (ditem, GNOME_DESKTOP_ITEM_ICON, GNOME_SEARCH_TOOL_ICON);
-	gnome_desktop_item_set_boolean (ditem, "StartupNotify", TRUE);
-
-	g_string_free (command, TRUE);
-	g_free (desktop_item_name);
-	g_free (uri);
-
-	path = gsearchtool_get_unique_filename (g_get_tmp_dir (), ".desktop");
-	gnome_desktop_item_set_location (ditem, path);
-
-	uri = gnome_vfs_get_uri_from_local_path (path);
-
-	if (gnome_desktop_item_save (ditem, NULL, FALSE, NULL)) {
-		gtk_selection_data_set (selection_data,
-					selection_data->target, 8,
-					(guchar *) uri, strlen (uri));
-	}
-	gnome_desktop_item_unref (ditem);
-
-	g_free (uri);
-	g_free (path);
-	g_free (disk);
-	g_free (scheme);
-}
-
 void
 show_file_selector_cb (GtkAction * action,
                        gpointer data)
Index: gsearchtool-spinner.c
===================================================================
--- gsearchtool-spinner.c	(revision 8428)
+++ gsearchtool-spinner.c	(working copy)
@@ -194,7 +194,7 @@
 
 	/* Load the animation */
 	icon_info = gtk_icon_theme_lookup_icon (data->icon_theme,
-						"gnome-searchtool-animation", -1, 0);
+						"process-working", -1, 0);
 	if (icon_info == NULL)
 	{
 		g_warning ("Throbber animation not found\n");
@@ -245,37 +245,23 @@
 	images->images = g_list_reverse (images->images);
 
 	gtk_icon_info_free (icon_info);
-	g_object_unref (icon_pixbuf);
 
-	/* Load the rest icon */
-	icon_info = gtk_icon_theme_lookup_icon (data->icon_theme,
-						"gnome-searchtool-animation-rest", -1, 0);
-	if (icon_info == NULL)
-	{
-		g_warning ("Throbber rest icon not found\n");
-		return;
-	}
+	pixbuf = extract_frame (icon_pixbuf, 0, 0, size);
 
-	size = gtk_icon_info_get_base_size (icon_info);
-	icon = gtk_icon_info_get_filename (icon_info);
-	g_return_if_fail (icon != NULL);
-
-	icon_pixbuf = gdk_pixbuf_new_from_file (icon, NULL);
-	gtk_icon_info_free (icon_info);
-
-	if (icon_pixbuf == NULL)
+	if (pixbuf == NULL)
 	{
 		g_warning ("Could not load spinner rest icon\n");
 		gsearch_spinner_images_free (images);
 		return;
 	}
 
-	images->quiescent_pixbuf = icon_pixbuf;
+	images->quiescent_pixbuf = pixbuf;
 
-	w = gdk_pixbuf_get_width (icon_pixbuf);
-	h = gdk_pixbuf_get_height (icon_pixbuf);
+	w = gdk_pixbuf_get_width (pixbuf);
+	h = gdk_pixbuf_get_height (pixbuf);
 	images->width = MAX (images->width, w);
 	images->height = MAX (images->height, h);
+	g_object_unref (icon_pixbuf);
 }
 
 static GSearchSpinnerCacheData *
@@ -474,7 +460,7 @@
 
 /* Spinner implementation */
 
-#define SPINNER_TIMEOUT 175 /* ms */
+#define SPINNER_TIMEOUT 50 /* ms */
 
 #define GSEARCH_SPINNER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GSEARCH_TYPE_SPINNER, GSearchSpinnerDetails))
 
@@ -685,7 +671,7 @@
 	}
 	else
 	{
-		frame = g_list_first (frame);
+		frame = g_list_first (frame)->next;
 	}
 
 	details->current_image = frame;
Index: gsearchtool-support.c
===================================================================
--- gsearchtool-support.c	(revision 8428)
+++ gsearchtool-support.c	(working copy)
@@ -34,12 +34,8 @@
 #include <glib.h>
 #include <regex.h>
 #include <gdk/gdkx.h>
-#include <libgnomevfs/gnome-vfs-mime.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
+#include <gio/gio.h>
 #include <libgnome/gnome-desktop-item.h>
-#include <libgnomeui/gnome-thumbnail.h>
 
 #include <gnome.h>
 
@@ -51,16 +47,13 @@
 #define C_STANDARD_NUMERIC_STRFTIME_CHARACTERS "dHIjmMSUwWyY"
 #define SUS_EXTENDED_STRFTIME_MODIFIERS "EO"
 #define BINARY_EXEC_MIME_TYPE      "application/x-executable"
-#define ICON_THEME_EXECUTABLE_ICON "gnome-fs-executable"
-#define ICON_THEME_REGULAR_ICON    "gnome-fs-regular"
-#define ICON_THEME_CHAR_DEVICE     "gnome-fs-chardev"
-#define ICON_THEME_BLOCK_DEVICE    "gnome-fs-blockdev"
-#define ICON_THEME_SOCKET          "gnome-fs-socket"
-#define ICON_THEME_FIFO            "gnome-fs-fifo"
-#define MAX_SYMLINKS_FOLLOWED      32
 #define GSEARCH_DATE_FORMAT_LOCALE "locale"
 #define GSEARCH_DATE_FORMAT_ISO    "iso"
 
+GtkTreeViewColumn *
+gsearchtool_gtk_tree_view_get_column_with_sort_column_id (GtkTreeView * treeview,
+                                                          gint id);
+
 /* START OF THE GCONF FUNCTIONS */
 
 static gboolean
@@ -791,42 +784,50 @@
 
 gchar *
 get_file_type_description (const gchar * file,
-                           GnomeVFSFileInfo * file_info)
+                           GFileInfo * file_info)
 {
+	const char * content_type = NULL;
 	gchar * desc;
 
-	if (file == NULL || file_info->mime_type == NULL) {
-		return g_strdup (gnome_vfs_mime_get_description (GNOME_VFS_MIME_TYPE_UNKNOWN));
+	if (file != NULL) {
+		content_type = g_file_info_get_content_type (file_info);
 	}
 
-	desc = g_strdup (gnome_vfs_mime_get_description (file_info->mime_type));
+	if (content_type == NULL || g_content_type_is_unknown (content_type) == TRUE) {
+		return g_strdup (g_content_type_get_description ("application/octet-stream"));
+	}	
 
-	if (file_info->symlink_name != NULL) {
+	desc = g_strdup (g_content_type_get_description (content_type));
 
+	if (g_file_info_get_is_symlink (file_info) == TRUE) {
+
+		const gchar * symlink_target;
 		gchar * absolute_symlink = NULL;
 		gchar * str = NULL;
 
-		if (g_path_is_absolute (file_info->symlink_name) != TRUE) {
+		symlink_target = g_file_info_get_symlink_target (file_info);
+
+		if (g_path_is_absolute (symlink_target) != TRUE) {
 			gchar *dirname;
 
 			dirname = g_path_get_dirname (file);
-			absolute_symlink = g_strconcat (dirname, G_DIR_SEPARATOR_S, file_info->symlink_name, NULL);
+			absolute_symlink = g_strconcat (dirname, G_DIR_SEPARATOR_S, symlink_target, NULL);
 			g_free (dirname);
 		}
 		else {
-			absolute_symlink = g_strdup (file_info->symlink_name);
+			absolute_symlink = g_strdup (symlink_target);
 		}
 
 		if (g_file_test (absolute_symlink, G_FILE_TEST_EXISTS) != TRUE) {
-                       if ((g_ascii_strcasecmp (file_info->mime_type, "x-special/socket") != 0) &&
-                           (g_ascii_strcasecmp (file_info->mime_type, "x-special/fifo") != 0)) {
+                       if ((g_ascii_strcasecmp (content_type, "x-special/socket") != 0) &&
+                           (g_ascii_strcasecmp (content_type, "x-special/fifo") != 0)) {
 				g_free (absolute_symlink);
 				g_free (desc);
 				return g_strdup (_("link (broken)"));
 			}
 		}
 
-		str = g_strdup_printf (_("link to %s"), (desc != NULL) ? desc : file_info->mime_type);
+		str = g_strdup_printf (_("link to %s"), (desc != NULL) ? desc : content_type);
 		g_free (absolute_symlink);
 		g_free (desc);
 		return str;
@@ -1020,25 +1021,20 @@
 }
 
 static GdkPixbuf *
-gsearchtool_get_thumbnail_image (const gchar * file)
+gsearchtool_get_thumbnail_image (const gchar * thumbnail)
 {
 	GdkPixbuf * pixbuf = NULL;
-	gchar * thumbnail_path;
-	gchar * uri;
 
-	uri = gnome_vfs_get_uri_from_local_path (file);
-	thumbnail_path = gnome_thumbnail_path_for_uri (uri, GNOME_THUMBNAIL_SIZE_NORMAL);
+	if (thumbnail != NULL) {
+		if (g_file_test (thumbnail, G_FILE_TEST_EXISTS)) {
 
-	if (thumbnail_path != NULL) {
-		if (g_file_test (thumbnail_path, G_FILE_TEST_EXISTS)) {
-
 			GdkPixbuf * thumbnail_pixbuf = NULL;
 			gfloat scale_factor_x = 1.0;
 			gfloat scale_factor_y = 1.0;
 			gint scale_x;
 			gint scale_y;
 
-			thumbnail_pixbuf = gdk_pixbuf_new_from_file (thumbnail_path, NULL);
+			thumbnail_pixbuf = gdk_pixbuf_new_from_file (thumbnail, NULL);
 			gsearchtool_thumbnail_frame_image (&thumbnail_pixbuf);
 
 			if (gdk_pixbuf_get_width (thumbnail_pixbuf) > ICON_SIZE) {
@@ -1060,159 +1056,71 @@
 			pixbuf = gdk_pixbuf_scale_simple (thumbnail_pixbuf, scale_x, scale_y, GDK_INTERP_BILINEAR);
 			g_object_unref (thumbnail_pixbuf);
 		}
-		g_free (thumbnail_path);
 	}
-	g_free (uri);
 	return pixbuf;
 }
 
-static gchar *
-gsearchtool_icon_lookup (GSearchWindow * gsearch,
-                         const gchar * file,
-                         const gchar * mime,
-                         GnomeVFSFileInfo * file_info,
-                         gboolean enable_thumbnails)
+static GdkPixbuf *
+get_themed_icon_pixbuf (GThemedIcon * icon,
+                        int size,
+                        GtkIconTheme * icon_theme)
 {
-	GnomeIconLookupFlags lookup_flags = GNOME_ICON_LOOKUP_FLAGS_NONE;
-	gchar * icon_name = NULL;
-	gchar * uri;
+	char ** icon_names;
+	GtkIconInfo * icon_info;
+	GdkPixbuf * pixbuf;
+	GError * error = NULL;
 
-	uri = gnome_vfs_get_uri_from_local_path (file);
+	g_object_get (icon, "names", &icon_names, NULL);
 
-	if ((enable_thumbnails == TRUE) && (gsearch->show_thumbnails == TRUE)) {
-		if ((strncmp (file_info->mime_type, "image/", 6) != 0) ||
-	    	    (file_info->size < gsearch->show_thumbnails_file_size_limit)) {
-		    	if (gsearch->thumbnail_factory == NULL) {
-			    	gsearch->thumbnail_factory = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
-			}
-			lookup_flags = GNOME_ICON_LOOKUP_FLAGS_SHOW_SMALL_IMAGES_AS_THEMSELVES |
-			               GNOME_ICON_LOOKUP_FLAGS_ALLOW_SVG_AS_THEMSELVES;
-		}
+	icon_info = gtk_icon_theme_choose_icon (icon_theme, (const char **)icon_names, size, 0);
+	if (icon_info == NULL) {
+		icon_info = gtk_icon_theme_lookup_icon (icon_theme, "text-x-generic", size, GTK_ICON_LOOKUP_USE_BUILTIN);
 	}
+	pixbuf = gtk_icon_info_load_icon (icon_info, &error);
+	if (pixbuf == NULL) {
+		g_warning ("Could not load icon pixbuf: %s\n", error->message);
+		g_clear_error (&error);
+	}
 
-	icon_name = gnome_icon_lookup (gtk_icon_theme_get_default (),
-	                               gsearch->thumbnail_factory,
-				       uri,
-				       NULL,
-				       file_info,
-				       mime,
-				       lookup_flags,
-				       NULL);
-	g_free (uri);
-	return icon_name;
+	gtk_icon_info_free (icon_info);
+	g_strfreev (icon_names);
+
+	return pixbuf;
 }
 
+
+
 GdkPixbuf *
 get_file_pixbuf (GSearchWindow * gsearch,
-                 const gchar * file,
-                 GnomeVFSFileInfo * file_info)
+                 GFileInfo * file_info)
 {
 	GdkPixbuf * pixbuf;
-	gchar * icon_name = NULL;
+	GIcon * icon = NULL;
+	const gchar * content_type = NULL;
+	const gchar * thumbnail_path = NULL;
 
-	if (file == NULL || file_info->mime_type == NULL) {
-		icon_name = g_strdup (ICON_THEME_REGULAR_ICON);
+	if (file_info == NULL) {
+		return NULL;
 	}
-	else if ((g_file_test (file, G_FILE_TEST_IS_EXECUTABLE)) &&
-	         (g_ascii_strcasecmp (file_info->mime_type, "application/x-executable-binary") == 0)) {
-		icon_name = g_strdup (ICON_THEME_EXECUTABLE_ICON);
+
+	content_type = g_file_info_get_content_type (file_info);
+	icon = g_file_info_get_icon (file_info);
+
+	if (gsearch->show_thumbnails == TRUE) {
+		thumbnail_path = g_file_info_get_attribute_byte_string (file_info, G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
 	}
-	else if (g_ascii_strcasecmp (file_info->mime_type, "x-special/device-char") == 0) {
-		icon_name = g_strdup (ICON_THEME_CHAR_DEVICE);
+
+	if (thumbnail_path != NULL) {
+		pixbuf = gsearchtool_get_thumbnail_image (thumbnail_path);
 	}
-	else if (g_ascii_strcasecmp (file_info->mime_type, "x-special/device-block") == 0) {
-		icon_name = g_strdup (ICON_THEME_BLOCK_DEVICE);
-	}
-	else if (g_ascii_strcasecmp (file_info->mime_type, "x-special/socket") == 0) {
-		icon_name = g_strdup (ICON_THEME_SOCKET);
-	}
-	else if (g_ascii_strcasecmp (file_info->mime_type, "x-special/fifo") == 0) {
-		icon_name = g_strdup (ICON_THEME_FIFO);
-	}
 	else {
-		icon_name = gsearchtool_icon_lookup (gsearch, file, file_info->mime_type, file_info, TRUE);
-	}
+		pixbuf = (GdkPixbuf *) g_hash_table_lookup (gsearch->search_results_filename_hash_table, content_type);
 
-	pixbuf = (GdkPixbuf *) g_hash_table_lookup (gsearch->search_results_filename_hash_table, icon_name);
-
-	if (pixbuf == NULL) {
-
-		if (gsearch->show_thumbnails == TRUE) {
-
-			if ((strncmp (file_info->mime_type, "image/", 6) != 0) ||
-	    		    (file_info->size < gsearch->show_thumbnails_file_size_limit)) {
-
-				if (strcmp (icon_name, file) == 0) {
-					pixbuf = gdk_pixbuf_new_from_file_at_scale (file, ICON_SIZE, ICON_SIZE, TRUE, NULL);
-
-					if (pixbuf == NULL) {
-						icon_name = gsearchtool_icon_lookup (gsearch, file, file_info->mime_type, file_info, FALSE);
-					}
-				}
-
-				if (pixbuf == NULL) {
-					pixbuf = gsearchtool_get_thumbnail_image (file);
-				}
-			}
-		}
-
 		if (pixbuf == NULL) {
-
-			GdkPixbuf * thumbnail_pixbuf = NULL;
-
-			thumbnail_pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), icon_name,
-			                                             ICON_SIZE, 0, NULL);
-
-			if (thumbnail_pixbuf != NULL) {
-
-				/*  The following is a workaround for bugzilla report #311318,                   */
-				/*  "gtk_icon_theme_load_icon () can return pixbufs larger than requested size". */
-				/*  Please see the url, http://bugzilla.gnome.org/show_bug.cgi?id=311318.        */
-
-				if ((gdk_pixbuf_get_width (thumbnail_pixbuf) > ICON_SIZE) ||
-				    (gdk_pixbuf_get_height (thumbnail_pixbuf) > ICON_SIZE)) {
-
-					gfloat scale_factor_x = 1.0;
-					gfloat scale_factor_y = 1.0;
-					gint scale_x;
-					gint scale_y;
-
-					if (gdk_pixbuf_get_width (thumbnail_pixbuf) > ICON_SIZE) {
-						scale_factor_x = (gfloat) ICON_SIZE / (gfloat) gdk_pixbuf_get_width (thumbnail_pixbuf);
-					}
-					if (gdk_pixbuf_get_height (thumbnail_pixbuf) > ICON_SIZE) {
-						scale_factor_y = (gfloat) ICON_SIZE / (gfloat) gdk_pixbuf_get_height (thumbnail_pixbuf);
-					}
-
-					if (gdk_pixbuf_get_width (thumbnail_pixbuf) > gdk_pixbuf_get_height (thumbnail_pixbuf)) {
-						scale_x = ICON_SIZE;
-						scale_y = (gint) (gdk_pixbuf_get_height (thumbnail_pixbuf) * scale_factor_x);
-					}
-					else {
-						scale_x = (gint) (gdk_pixbuf_get_width (thumbnail_pixbuf) * scale_factor_y);
-						scale_y = ICON_SIZE;
-					}
-
-					pixbuf = gdk_pixbuf_scale_simple (thumbnail_pixbuf, scale_x, scale_y, GDK_INTERP_BILINEAR);
-					g_object_unref (thumbnail_pixbuf);
-				}
-				else {
-					pixbuf = thumbnail_pixbuf;
-				}
-			}
+			pixbuf = get_themed_icon_pixbuf (G_THEMED_ICON (icon), ICON_SIZE, gtk_icon_theme_get_default ());
+			g_hash_table_insert (gsearch->search_results_filename_hash_table, g_strdup (content_type), pixbuf);	
 		}
-
-		if (pixbuf != NULL) {
-			g_hash_table_insert (gsearch->search_results_filename_hash_table, icon_name, pixbuf);
-		}
-		else {
-			g_free (icon_name);
-		}
 	}
-	else {
-		g_free (icon_name);
-	}
-
 	return pixbuf;
 }
 
@@ -1283,55 +1191,18 @@
 open_file_with_application (GtkWidget * window,
                             const gchar * file)
 {
-	GnomeVFSMimeApplication * application;
-	const char * mime;
+	GdkAppLaunchContext * context;
+	gboolean result;
+	gchar * uri;
 
-	mime = gnome_vfs_get_file_mime_type (file, NULL, FALSE);
-	application = gnome_vfs_mime_get_default_application (mime);
-
 	if (!g_file_test (file, G_FILE_TEST_IS_DIR)) {
-		if (application) {
-			const char *desktop_file;
-			GnomeDesktopItem *ditem;
-		 	GdkScreen *screen;
-		 	GError *error = NULL;
-			GList *uris = NULL;
-			gboolean result;
-			char *uri;
 
-			desktop_file = gnome_vfs_mime_application_get_desktop_file_path (application);
+		context = gdk_app_launch_context_new ();
+		uri = g_filename_to_uri (file, NULL, NULL);
+		result = g_app_info_launch_default_for_uri (uri, (GAppLaunchContext *)context, NULL);
+		g_free (uri);
 
-			uri = gnome_vfs_get_uri_from_local_path (file);
-			uris = g_list_append (uris, uri);
-
-			if (!g_file_test (desktop_file, G_FILE_TEST_EXISTS)) {
-				result = (gnome_vfs_mime_application_launch (application, uris) == GNOME_VFS_OK);
-			}
-			else {
-				result = TRUE;
-				ditem = gnome_desktop_item_new_from_file (desktop_file, 0, &error);
-				if (error) {
-					result = FALSE;
-					g_error_free (error);
-				}
-				else {
-				 	screen = gtk_widget_get_screen (window);
-					gnome_desktop_item_set_launch_time (ditem, gtk_get_current_event_time ());
-					gnome_desktop_item_launch_on_screen (ditem, uris,
-						GNOME_DESKTOP_ITEM_LAUNCH_APPEND_PATHS, screen, -1, &error);
-					if (error) {
-						result = FALSE;
-						g_error_free (error);
-					}
-				}
-				gnome_desktop_item_unref (ditem);
-			}
-			gnome_vfs_mime_application_free (application);
-			g_list_free (uris);
-			g_free (uri);
-
-			return result;
-		}
+		return result;
 	}
 	return FALSE;
 }
@@ -1339,11 +1210,11 @@
 gboolean
 launch_file (const gchar * file)
 {
-	const char * mime = gnome_vfs_get_file_mime_type (file, NULL, FALSE);
+	const char * content_type = g_content_type_guess (file, NULL, 0, NULL);
 	gboolean result = FALSE;
 
 	if ((g_file_test (file, G_FILE_TEST_IS_EXECUTABLE)) &&
-	    (g_ascii_strcasecmp (mime, BINARY_EXEC_MIME_TYPE) == 0)) {
+	    (g_ascii_strcasecmp (content_type, BINARY_EXEC_MIME_TYPE) == 0)) {
 		result = g_spawn_command_line_async (file, NULL);
 	}
 
