talkatu/talkatu

Parents 132882e70996
Children f6ba5e577516
Don't use g_datetime_format_iso8601 as it was added after our minimum glib version

Fallback to just %I:%M %P for the time stamp since g_datetime_format_iso8601 was added after our minimum glib version

Testing Done:
compiled and ran the demo to verify.

Reviewed at https://reviews.imfreedom.org/r/99/
--- a/talkatu/talkatuhistoryrow.c Sat Aug 29 04:22:58 2020 -0500
+++ b/talkatu/talkatuhistoryrow.c Thu Sep 03 02:18:02 2020 -0500
@@ -73,7 +73,7 @@
} else {
GDateTime *timestamp = NULL;
TalkatuContentType content_type;
- gchar *author = NULL, *contents = NULL, *iso8601 = NULL;
+ gchar *author = NULL, *contents = NULL, *datetime = NULL;
gboolean edited = FALSE;
g_object_get(
@@ -86,10 +86,10 @@
NULL
);
- iso8601 = g_date_time_format_iso8601(timestamp);
+ datetime = g_date_time_format(timestamp, "%I:%M %P");
gtk_label_set_text(GTK_LABEL(row->author), author);
- gtk_label_set_text(GTK_LABEL(row->timestamp), iso8601);
+ gtk_label_set_text(GTK_LABEL(row->timestamp), datetime);
if(edited) {
gtk_widget_show(row->edited);
@@ -104,7 +104,7 @@
}
g_free(author);
- g_free(iso8601);
+ g_free(datetime);
g_free(contents);
g_clear_pointer(&timestamp, g_date_time_unref);
}