[gimp] app: don't use the deprecated GTimeVal in gimp-test-session-utils.c
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't use the deprecated GTimeVal in gimp-test-session-utils.c
- Date: Sat, 26 Oct 2019 19:35:27 +0000 (UTC)
commit 549a606b2fdd912e81813f6721d015d85efd8440
Author: Ell <ell_se yahoo com>
Date: Sat Oct 26 22:30:08 2019 +0300
app: don't use the deprecated GTimeVal in gimp-test-session-utils.c
GTimeVal, as well as g_file_info_get_modification_time(), have been
deprecated in GLib 2.62. Use g_file_info_get_attribute_uint64()
instead.
app/tests/gimp-test-session-utils.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/app/tests/gimp-test-session-utils.c b/app/tests/gimp-test-session-utils.c
index ffc9f0fc3a..3649b481f9 100644
--- a/app/tests/gimp-test-session-utils.c
+++ b/app/tests/gimp-test-session-utils.c
@@ -42,9 +42,9 @@
typedef struct
{
- GFile *file;
- gchar *md5;
- GTimeVal modtime;
+ GFile *file;
+ gchar *md5;
+ guint64 modtime;
} GimpTestFileState;
@@ -88,7 +88,8 @@ gimp_test_get_file_state_verbose (GFile *file,
NULL, NULL);
if (info)
{
- g_file_info_get_modification_time (info, &filestate->modtime);
+ filestate->modtime = g_file_info_get_attribute_uint64 (
+ info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
success = TRUE;
g_object_unref (info);
}
@@ -110,8 +111,7 @@ gimp_test_file_state_changes (GFile *file,
GimpTestFileState *state1,
GimpTestFileState *state2)
{
- if (state1->modtime.tv_sec == state2->modtime.tv_sec &&
- state1->modtime.tv_usec == state2->modtime.tv_usec)
+ if (state1->modtime == state2->modtime)
{
g_printerr ("A new '%s' was not created\n",
gimp_file_get_utf8_name (file));
@@ -174,10 +174,10 @@ gimp_test_session_load_and_write_session_files (const gchar *loaded_sessionrc,
gboolean single_window_mode)
{
Gimp *gimp;
- GimpTestFileState initial_sessionrc_state = { NULL, NULL, { 0, 0 } };
- GimpTestFileState initial_dockrc_state = { NULL, NULL, { 0, 0 } };
- GimpTestFileState final_sessionrc_state = { NULL, NULL, { 0, 0 } };
- GimpTestFileState final_dockrc_state = { NULL, NULL, { 0, 0 } };
+ GimpTestFileState initial_sessionrc_state = { NULL, NULL, 0 };
+ GimpTestFileState initial_dockrc_state = { NULL, NULL, 0 };
+ GimpTestFileState final_sessionrc_state = { NULL, NULL, 0 };
+ GimpTestFileState final_dockrc_state = { NULL, NULL, 0 };
GFile *sessionrc_file = NULL;
GFile *dockrc_file = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]