summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Villenave <[email protected]>2021-10-26 18:42:52 +0200
committerraveit65 <[email protected]>2021-11-12 21:40:49 +0100
commit9e5f1dd9e1807737958fd0ec8ecea5df14108b0a (patch)
tree2e2754da67cd978e920d6ccd7a12b3c8e9b7ce87
parente0c613af6e5befeba28018bee805e46a94eeb658 (diff)
downloadatril-9e5f1dd9e1807737958fd0ec8ecea5df14108b0a.tar.bz2
atril-9e5f1dd9e1807737958fd0ec8ecea5df14108b0a.tar.xz
Preserve compatibility with older GLib versions
This is a rather non-invasive change, that will be easy to remove whenever we go ahead and stop supporting older systems.
-rw-r--r--configure.ac2
-rw-r--r--shell/ev-window.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c25f2e80..d8815a09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,7 +91,7 @@ GLIB_GSETTINGS
dnl Specify required versions of dependencies
CAIRO_REQUIRED=1.14.0
-GLIB_REQUIRED=2.62.0
+GLIB_REQUIRED=2.54.0
GTK_REQUIRED=3.22.0
WEBKIT_REQUIRED=2.6.0
LIBSECRET_REQUIRED=0.5
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 79afaa37..f520ae88 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -2174,6 +2174,19 @@ show_loading_progress (EvWindow *ev_window)
return FALSE;
}
+#if !GLIB_CHECK_VERSION(2, 62, 0)
+/* Non-year-2038-proof compatibility with GLib < 2.62 */
+static GDateTime *
+_g_file_info_get_modification_date_time (GFileInfo *info)
+{
+ GTimeVal mtime;
+
+ g_file_info_get_modification_time (info, &mtime);
+ return g_date_time_new_from_timeval_utc (&mtime);
+}
+#define g_file_info_get_modification_date_time _g_file_info_get_modification_date_time
+#endif
+
static void
ev_window_load_remote_failed (EvWindow *ev_window,
GError *error)