summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--daemon/gvfsbackendgoogle.c20
2 files changed, 21 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 1b993d39..32ef98e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -391,6 +391,11 @@ if test "x$enable_google" != "xno" ; then
if test "x$msg_google" = "xyes"; then
PKG_CHECK_MODULES([GOOGLE], [goa-1.0 libgdata])
AC_DEFINE([HAVE_GOOGLE], 1, [Define to 1 if Google is going to be built])
+
+ PKG_CHECK_MODULES(LIBGDATA_0_17_7, libgdata >= 0.17.7,
+ AC_DEFINE(HAVE_LIBGDATA_0_17_7, 1, [Define to 1 if libgdata 0.17.7 is available]),
+ []
+ )
fi
fi
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index ef1b4ad1..376c2309 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -947,10 +947,14 @@ build_file_info (GVfsBackendGoogle *self,
}
else
{
- goffset quota_used;
-
- quota_used = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (entry));
- g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE, (guint64) quota_used);
+ goffset size;
+
+#if HAVE_LIBGDATA_0_17_7
+ size = gdata_documents_entry_get_file_size (GDATA_DOCUMENTS_ENTRY (entry));
+#else
+ size = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (entry));
+#endif
+ g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE, (guint64) size);
}
}
@@ -1275,7 +1279,11 @@ 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);
+#if HAVE_LIBGDATA_0_17_7
+ size = gdata_documents_entry_get_file_size (new_entry);
+#else
size = gdata_documents_entry_get_quota_used (new_entry);
+#endif
g_vfs_job_progress_callback (size, size, job);
g_vfs_job_succeeded (G_VFS_JOB (job));
@@ -1942,7 +1950,11 @@ g_vfs_backend_google_push (GVfsBackend *_self,
}
}
+#if HAVE_LIBGDATA_0_17_7
+ size = gdata_documents_entry_get_file_size (GDATA_DOCUMENTS_ENTRY (new_document));
+#else
size = gdata_documents_entry_get_quota_used (GDATA_DOCUMENTS_ENTRY (new_document));
+#endif
g_vfs_job_progress_callback (size, size, job);
g_vfs_job_succeeded (G_VFS_JOB (job));