[recipes] Show unreleased info in 'what's new'
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Show unreleased info in 'what's new'
- Date: Sun, 28 May 2017 12:38:59 +0000 (UTC)
commit 972ea76f798c0ed313f78beac3edbe3489074bf2
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 28 08:35:51 2017 -0400
Show unreleased info in 'what's new'
This makes the dialog more useful for nightly builds,
provided we update the appdata more often than we do
snapshot releases.
src/gr-window.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/gr-window.c b/src/gr-window.c
index 7dda952..12f287f 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -1429,10 +1429,16 @@ gr_release_info_new (const char *version,
if (date) {
g_autofree char *formatted = NULL;
g_autofree char *release = NULL;
+ g_autoptr(GDateTime) now = g_date_time_new_now_utc ();
- formatted = g_date_time_format (date, "%F");
- /* TRANSLATORS: %s gets replaced by a date */
- release = g_strdup_printf (_("Released: %s"), formatted);
+ if (g_date_time_compare (date, now) < 0) {
+ formatted = g_date_time_format (date, "%F");
+ /* TRANSLATORS: %s gets replaced by a date */
+ release = g_strdup_printf (_("Released: %s"), formatted);
+ }
+ else {
+ release = g_strdup_printf (_("Unreleased"));
+ }
label = gtk_label_new (release);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_container_add (GTK_CONTAINER (box), label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]