From c56141f59efa11edee8d9b4f99a2e37ff64f92ba Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 20 Mar 2019 18:13:45 +0100 Subject: mate-dictionary: Use g_strjoin to build license text full stop at end of sentence in license paragraphs --- mate-dictionary/src/gdict-about.c | 41 ++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'mate-dictionary/src') diff --git a/mate-dictionary/src/gdict-about.c b/mate-dictionary/src/gdict-about.c index dbd13698..ac8bd073 100644 --- a/mate-dictionary/src/gdict-about.c +++ b/mate-dictionary/src/gdict-about.c @@ -54,25 +54,28 @@ gdict_show_about_dialog (GtkWidget *parent) const gchar *translator_credits = _("translator-credits"); const gchar *comments = _("Look up words in dictionaries"); - - const gchar *license = - "This program is free software; you can redistribute it and/or " - "modify it under the terms of the GNU General Public License as " - "published by the Free Software Foundation; either version 2 of " - "the License, or (at your option) any later version.\n" - "\n" - "This program is distributed in the hope that it will be useful, " - "but WITHOUT ANY WARRANTY; without even the implied warranty of " - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " - "General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU General Public License " - "along with this program; if not, write to the Free Software " - "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA " - "02110-1301, USA.\n"; + + const gchar* license[] = { + N_("This program is free software; you can redistribute it and/or " + "modify it under the terms of the GNU General Public License as " + "published by the Free Software Foundation; either version 2 of " + "the License, or (at your option) any later version."), + + N_("This program is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " + "General Public License for more details."), + + N_("You should have received a copy of the GNU General Public License " + "along with this program; if not, write to the Free Software " + "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA " + "02110-1301, USA") + }; g_return_if_fail (GTK_IS_WIDGET (parent)); - + + char *license_trans = g_strjoin ("\n\n", _(license[0]), _(license[1]), _(license[2]), NULL); + gtk_show_about_dialog (GTK_IS_WINDOW (parent) ? GTK_WINDOW (parent) : NULL, "program-name", _("Dictionary"), "version", VERSION, @@ -84,8 +87,10 @@ gdict_show_about_dialog (GtkWidget *parent) "documenters", documenters, "translator-credits", translator_credits, "logo-icon-name", "accessories-dictionary", - "license", license, + "license", license_trans, "wrap-license", TRUE, "screen", gtk_widget_get_screen (parent), NULL); + + g_free(license_trans); } -- cgit v1.2.1