GNOME Bugzilla – Bug 543713
Port gsearchtool to GIO
Last modified: 2009-07-11 16:03:15 UTC
See http://live.gnome.org/GioPort for more information. Also see bug 524574. $:andre\> grep -r vfs . ./configure.ac:dnl gnome-vfs/mime-data is need for gsearchtool ./configure.ac:PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0 >= $GNOMEVFS_REQUIRED dnl ./configure.ac: gnome-vfs-module-2.0 >= $GNOMEVFS_REQUIRED) ./gsearchtool/gsearchtool-support.c:#include <libgnomevfs/gnome-vfs-mime.h> ./gsearchtool/gsearchtool-support.c:#include <libgnomevfs/gnome-vfs-mime-handlers.h> ./gsearchtool/gsearchtool-support.c:#include <libgnomevfs/gnome-vfs-ops.h> ./gsearchtool/gsearchtool-support.c:#include <libgnomevfs/gnome-vfs-utils.h> ./gsearchtool/gsearchtool-support.c: return g_strdup (gnome_vfs_mime_get_description (GNOME_VFS_MIME_TYPE_UNKNOWN)); ./gsearchtool/gsearchtool-support.c: desc = g_strdup (gnome_vfs_mime_get_description (file_info->mime_type)); ./gsearchtool/gsearchtool-support.c: uri = gnome_vfs_get_uri_from_local_path (file); ./gsearchtool/gsearchtool-support.c: uri = gnome_vfs_get_uri_from_local_path (file); ./gsearchtool/gsearchtool-support.c: mime = gnome_vfs_get_file_mime_type (file, NULL, FALSE); ./gsearchtool/gsearchtool-support.c: application = gnome_vfs_mime_get_default_application (mime); ./gsearchtool/gsearchtool-support.c: desktop_file = gnome_vfs_mime_application_get_desktop_file_path (application); ./gsearchtool/gsearchtool-support.c: uri = gnome_vfs_get_uri_from_local_path (file); ./gsearchtool/gsearchtool-support.c: result = (gnome_vfs_mime_application_launch (application, uris) == GNOME_VFS_OK); ./gsearchtool/gsearchtool-support.c: gnome_vfs_mime_application_free (application); ./gsearchtool/gsearchtool-support.c: const char * mime = gnome_vfs_get_file_mime_type (file, NULL, FALSE); ./gsearchtool/gsearchtool-callbacks.c:#include <libgnomevfs/gnome-vfs-ops.h> ./gsearchtool/gsearchtool-callbacks.c:#include <libgnomevfs/gnome-vfs-utils.h> ./gsearchtool/gsearchtool-callbacks.c:#include <libgnomevfs/gnome-vfs-find-directory.h> ./gsearchtool/gsearchtool-callbacks.c: filename = gnome_vfs_escape_path_string (file); ./gsearchtool/gsearchtool-callbacks.c: uri = gnome_vfs_uri_new (filename); ./gsearchtool/gsearchtool-callbacks.c: gnome_vfs_find_directory (uri, ./gsearchtool/gsearchtool-callbacks.c: gnome_vfs_uri_unref (uri); ./gsearchtool/gsearchtool-callbacks.c: trash_path = gnome_vfs_uri_to_string (trash_uri, GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD); ./gsearchtool/gsearchtool-callbacks.c: gnome_vfs_uri_unref (trash_uri); ./gsearchtool/gsearchtool-callbacks.c: result = gnome_vfs_move (source_uri, destination_uri, TRUE); ./gsearchtool/gsearchtool-callbacks.c: gnome_vfs_result_to_string (result)); ./gsearchtool/gsearchtool-callbacks.c: result = gnome_vfs_unlink (locale_filename); ./gsearchtool/gsearchtool-callbacks.c: result = gnome_vfs_remove_directory (locale_filename); ./gsearchtool/gsearchtool-callbacks.c: utf8_filename, gnome_vfs_result_to_string (result)); ./gsearchtool/gsearchtool-callbacks.c: uri = gnome_vfs_make_uri_from_input_with_dirs (disk, GNOME_VFS_MAKE_URI_DIR_HOMEDIR); ./gsearchtool/gsearchtool-callbacks.c: scheme = gnome_vfs_get_uri_scheme (uri); ./gsearchtool/gsearchtool-callbacks.c: uri = gnome_vfs_get_uri_from_local_path (path); ./gsearchtool/gsearchtool.c:#include <libgnomevfs/gnome-vfs-mime.h> ./gsearchtool/gsearchtool.c:#include <libgnomevfs/gnome-vfs-ops.h> ./gsearchtool/gsearchtool.c:#include <libgnomevfs/gnome-vfs-utils.h> ./gsearchtool/gsearchtool.c: GnomeVFSFileInfo * vfs_file_info; ./gsearchtool/gsearchtool.c: vfs_file_info = gnome_vfs_file_info_new (); ./gsearchtool/gsearchtool.c: escape_path_string = gnome_vfs_escape_path_string (file); ./gsearchtool/gsearchtool.c: gnome_vfs_get_file_info (escape_path_string, vfs_file_info, ./gsearchtool/gsearchtool.c: pixbuf = get_file_pixbuf (gsearch, file, vfs_file_info); ./gsearchtool/gsearchtool.c: description = get_file_type_description (file, vfs_file_info); ./gsearchtool/gsearchtool.c: readable_size = gnome_vfs_format_file_size_for_display (vfs_file_info->size); ./gsearchtool/gsearchtool.c: readable_date = get_readable_date (gsearch->search_results_date_format_string, vfs_file_info->mtime); ./gsearchtool/gsearchtool.c: COLUMN_SIZE, (-1) * (gdouble) vfs_file_info->size, ./gsearchtool/gsearchtool.c: COLUMN_TYPE, (description != NULL) ? description : vfs_file_info->mime_type, ./gsearchtool/gsearchtool.c: COLUMN_DATE, (-1) * (gdouble) vfs_file_info->mtime, ./gsearchtool/gsearchtool.c: result = gnome_vfs_monitor_add (&handle, file, GNOME_VFS_MONITOR_FILE, ./gsearchtool/gsearchtool.c: gnome_vfs_file_info_unref (vfs_file_info); ./gsearchtool/gsearchtool.c: gnome_vfs_monitor_cancel (monitor->handle);
*** Bug 572335 has been marked as a duplicate of this bug. ***
Created attachment 129761 [details] [review] gnome-utils/configure.ac patch -- removes gnome-vfs 2009-02-28 Dennis Cranston <dennis_cranston@yahoo.com> * configure.ac: gnome-search-tool uses gio, remove gnome-vfs
Created attachment 129762 [details] [review] gsearchtool patch -- removes gnome-vfs, uses gio 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
I plan to commit the above two patches after the 2.27 development cycle begins.
Cool.
Patch applied on 3/16/09 to version 2.27.1.