[gvfs] google: Report progress when copying and moving
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] google: Report progress when copying and moving
- Date: Wed, 30 Sep 2015 06:59:48 +0000 (UTC)
commit 3a70ae6f9f9ffc48e1e1b9337e57760d2e10e7d6
Author: Ondrej Holy <oholy redhat com>
Date: Tue Sep 29 10:42:34 2015 +0200
google: Report progress when copying and moving
Progress isn't reported currently. However it is guaranteed that
the progress callback will be called at least after all data has
been transferred according the GIO documentation. Nautilus shows
some weird progress info when moving and copying consequently. Emit
progress callback with total size to fix this issue.
https://bugzilla.gnome.org/show_bug.cgi?id=755775
daemon/gvfsbackendgoogle.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 9ef7e93..099be28 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -1118,6 +1118,7 @@ g_vfs_backend_google_copy (GVfsBackend *_self,
const gchar *summary;
gchar *destination_basename = NULL;
gchar *entry_path = NULL;
+ goffset size;
g_rec_mutex_lock (&self->mutex);
g_debug ("+ copy: %s -> %s, %d\n", source, destination, flags);
@@ -1252,6 +1253,9 @@ g_vfs_backend_google_copy (GVfsBackend *_self,
insert_entry (self, GDATA_ENTRY (new_entry));
g_hash_table_foreach (self->monitors, emit_create_event, entry_path);
+
+ size = gdata_documents_entry_get_quota_used (new_entry);
+ g_vfs_job_progress_callback (size, size, job);
g_vfs_job_succeeded (G_VFS_JOB (job));
out:
@@ -1726,6 +1730,7 @@ g_vfs_backend_google_push (GVfsBackend *_self,
const gchar *title;
gchar *destination_basename = NULL;
gchar *entry_path = NULL;
+ goffset size;
g_rec_mutex_lock (&self->mutex);
g_debug ("+ push: %s -> %s, %d\n", local_path, destination, flags);
@@ -1916,6 +1921,8 @@ g_vfs_backend_google_push (GVfsBackend *_self,
}
}
+ size = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (new_document));
+ g_vfs_job_progress_callback (size, size, job);
g_vfs_job_succeeded (G_VFS_JOB (job));
out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]