[gvfs] gphoto2: Use G_FILESYSTEM_PREVIEW_TYPE_NEVER



commit 983186766060ec82e260f8cd9a5160b93b2ae958
Author: Pierre Ossman <ossman mjolnir ossman eu>
Date:   Sat Apr 30 13:04:49 2016 +0200

    gphoto2: Use G_FILESYSTEM_PREVIEW_TYPE_NEVER
    
    PTP/MTP devices can only transfer complete files, which means that
    generating a thumbnail can often take multiple minutes, and any
    other operation is blocked until this is done. In practice this can
    often prevent meaningful use of the device. So change the hint to
    applications, advising them it is a bad idea to generate thumbnails
    for these devices.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765843

 daemon/gvfsbackendgphoto2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index 07c4258..bfa85ac 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -2389,7 +2389,7 @@ do_query_fs_info (GVfsBackend *backend,
   g_debug ("query_fs_info (%s)\n", filename);
 
   g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, "gphoto2");
-  g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW, 
G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL);
+  g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW, 
G_FILESYSTEM_PREVIEW_TYPE_NEVER);
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, 
!gphoto2_backend->can_write);
 
   rc = gp_camera_get_storageinfo (gphoto2_backend->camera, &storage_info, &num_storage_info, 
gphoto2_backend->context);
@@ -2455,7 +2455,7 @@ try_query_fs_info (GVfsBackend *backend,
   g_debug ("  YAY got info from cache for try_query_fs_info (%s)\n", filename);
 
   g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, "gphoto2");
-  g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW, 
G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL);
+  g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW, 
G_FILESYSTEM_PREVIEW_TYPE_NEVER);
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, 
!gphoto2_backend->can_write);
   g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, (guint64) capacity);
   g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE, (guint64) free_space);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]