[gnome-shell/wip/carlosg/issue-1017] shell: Fallback on ISO 8601 datetime string for screenshot date info
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/issue-1017] shell: Fallback on ISO 8601 datetime string for screenshot date info
- Date: Mon, 1 Apr 2019 16:16:29 +0000 (UTC)
commit b13d25653246a86618a630a04ed229826495607f
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Apr 1 18:06:49 2019 +0200
shell: Fallback on ISO 8601 datetime string for screenshot date info
If the locale doesn't honor strftime()'s %c argument, we would end up
feeding NULLs into GdkPixbuf tagging. Fallback to a sensible (although
not nicely localized) datetime string.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1017
src/shell-screenshot.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/shell-screenshot.c b/src/shell-screenshot.c
index 61fdc1d1e..c9743f42d 100644
--- a/src/shell-screenshot.c
+++ b/src/shell-screenshot.c
@@ -202,6 +202,9 @@ write_screenshot_thread (GTask *result,
cairo_image_surface_get_height (priv->image));
creation_time = g_date_time_format (priv->datetime, "%c");
+ if (!creation_time)
+ creation_time = g_date_time_format (priv->datetime, "%FT%T%z");
+
if (gdk_pixbuf_save_to_stream (pixbuf, stream, "png", NULL, NULL,
"tEXt::Software", "gnome-screenshot",
"tEXt::Creation Time", creation_time,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]