diff options
author | Valentin Villenave <[email protected]> | 2021-10-26 18:42:52 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-11-12 21:39:24 +0100 |
commit | 706b21d5cfda91dcc7a55d3f5d01d0a56d44eb35 (patch) | |
tree | 98e442aca27ffbdccfabb0ca30010810d270357b /shell | |
parent | 268ed59da718f619acc4b85573b892b0fe7ffd1d (diff) | |
download | atril-706b21d5cfda91dcc7a55d3f5d01d0a56d44eb35.tar.bz2 atril-706b21d5cfda91dcc7a55d3f5d01d0a56d44eb35.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.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-window.c | 13 |
1 files changed, 13 insertions, 0 deletions
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) |