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.
This commit is contained in:
Ell 2019-10-26 22:30:08 +03:00
parent 6b87e2f90c
commit 549a606b2f
1 changed files with 10 additions and 10 deletions

View File

@ -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;