diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2023-03-08 16:31:00 +0100 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2023-03-08 21:10:05 +0100 |
commit | 3271e1c11a923a4e97f6657665f522344c61737f (patch) | |
tree | 963f3b9ea383fde2f4ddabd1f2f910d3fe48f1d9 /src/adwaita | |
parent | bb8c88486cfebd2bf583bbb870f16ba455eaade8 (diff) |
Generate the appstream news.
Diffstat (limited to 'src/adwaita')
-rw-r--r-- | src/adwaita/disfluid-about.c | 97 |
1 files changed, 51 insertions, 46 deletions
diff --git a/src/adwaita/disfluid-about.c b/src/adwaita/disfluid-about.c index c54b085..ac860d3 100644 --- a/src/adwaita/disfluid-about.c +++ b/src/adwaita/disfluid-about.c @@ -27,29 +27,29 @@ some_developers (void) for (size_t i = 0; i < disfluid_count_authors (); i++) { if (disfluid_author_is_developer (i)) - { - if (first_developer == NULL) - { - first_developer = g_strdup (disfluid_author_name (i)); - } - else - { - and_others = true; - } - } + { + if (first_developer == NULL) + { + first_developer = g_strdup (disfluid_author_name (i)); + } + else + { + and_others = true; + } + } } char *ret = NULL; if (first_developer != NULL) { if (and_others) - { - asprintf (&ret, _ ("%s and others"), first_developer); - free (first_developer); - } + { + asprintf (&ret, _("%s and others"), first_developer); + free (first_developer); + } else - { - ret = first_developer; - } + { + ret = first_developer; + } } return ret; } @@ -67,28 +67,30 @@ enumerate_credits (int (*check) (size_t)) for (size_t i = 0; i < n; i++) { if (check (i)) - { - if (disfluid_author_uri (i)) - { - asprintf (& (ret[n_relevant]), "%s %s", disfluid_author_name (i), disfluid_author_uri (i)); - } - else if (disfluid_author_email (i)) - { - asprintf (& (ret[n_relevant]), "%s <%s>", disfluid_author_name (i), disfluid_author_email (i)); - } - else - { - asprintf (& (ret[n_relevant]), "%s", disfluid_author_name (i)); - } - n_relevant++; - } + { + if (disfluid_author_uri (i)) + { + asprintf (&(ret[n_relevant]), "%s %s", disfluid_author_name (i), + disfluid_author_uri (i)); + } + else if (disfluid_author_email (i)) + { + asprintf (&(ret[n_relevant]), "%s <%s>", + disfluid_author_name (i), disfluid_author_email (i)); + } + else + { + asprintf (&(ret[n_relevant]), "%s", disfluid_author_name (i)); + } + n_relevant++; + } } ret[n_relevant] = NULL; return ret; } void -disfluid_adw_show_about (GtkApplication *app) +disfluid_adw_show_about (GtkApplication * app) { char *developer = some_developers (); char **developers = enumerate_credits (disfluid_author_is_developer); @@ -96,18 +98,21 @@ disfluid_adw_show_about (GtkApplication *app) char **artists = enumerate_credits (disfluid_author_is_artist); char **documenters = enumerate_credits (disfluid_author_is_documenter); adw_show_about_window (gtk_application_get_active_window (app), - "application-name", _ ("Experiences"), - "application-icon", "eu.planete_kraus.Disfluid", - "version", disfluid_version (), - "copyright", _ ("Copyright © 2023 Vivien Kraus"), - "developer-name", developer, - "website", disfluid_website (), - "developers", developers, - "designers", designers, - "artists", artists, - "documenters", documenters, - "translator-credits", disfluid_translation_credits (), - "license-type", GTK_LICENSE_AGPL_3_0, - NULL); + "application-name", _("Experiences"), + "application-icon", "eu.planete_kraus.Disfluid", + "version", disfluid_version (), + "copyright", _("Copyright © 2023 Vivien Kraus"), + "developer-name", developer, + "website", disfluid_website (), + "developers", developers, + "designers", designers, + "artists", artists, + "documenters", documenters, + "translator-credits", + disfluid_translation_credits (), "license-type", + GTK_LICENSE_AGPL_3_0, + "release-notes", disfluid_whats_new (), + "release-notes-version", disfluid_major_version (), + NULL); free (developer); } |