[gvfs/wip/oholy/gtimeval-gdatetime: 4/11] gphoto2: Remove usage of deprecated GTimeVal
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/gtimeval-gdatetime: 4/11] gphoto2: Remove usage of deprecated GTimeVal
- Date: Fri, 20 Sep 2019 11:54:21 +0000 (UTC)
commit 356302839b1fcf42c9071da1f21a7e9d6dc8fc17
Author: Ondrej Holy <oholy redhat com>
Date: Mon Sep 16 17:03:21 2019 +0200
gphoto2: Remove usage of deprecated GTimeVal
GTimeVal is deprecated. Let's remove it in order to prevent the
deprecation warnings.
daemon/gvfsbackendgphoto2.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index 7e50194a..ae59691e 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -807,7 +807,6 @@ file_get_info (GVfsBackendGphoto2 *gphoto2_backend,
CameraFileInfo gp_info;
char *full_path;
GFileInfo *cached_info;
- GTimeVal mtime;
char *mime_type;
GIcon *icon;
unsigned int n;
@@ -1011,12 +1010,10 @@ file_get_info (GVfsBackendGphoto2 *gphoto2_backend,
}
g_free (mime_type);
- if (gp_info.file.fields & GP_FILE_INFO_MTIME)
- mtime.tv_sec = gp_info.file.mtime;
- else
- mtime.tv_sec = 0;
- mtime.tv_usec = 0;
- g_file_info_set_modification_time (info, &mtime);
+ if (gp_info.file.fields & GP_FILE_INFO_MTIME) {
+ g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, gp_info.file.mtime);
+ g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, 0);
+ }
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, gphoto2_backend->can_write);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]