From f6f91bcc99281436e9e93bc4773c88926aa8588e Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 22 Aug 2015 21:59:30 +0200 Subject: [PATCH] libgimpcolor: don't return a profile's model as fallback for it's description in gimp_color_profile_get_label(). Also, make gimp_color_profile_get_summary() more verbose. --- libgimpcolor/gimpcolorprofile.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libgimpcolor/gimpcolorprofile.c b/libgimpcolor/gimpcolorprofile.c index 498a3f5663..df2081b718 100644 --- a/libgimpcolor/gimpcolorprofile.c +++ b/libgimpcolor/gimpcolorprofile.c @@ -502,6 +502,9 @@ gimp_color_profile_get_copyright (GimpColorProfile *profile) * This function returns a string containing @profile's "title", a * string that can be used to label the profile in a user interface. * + * Unlike gimp_color_profile_get_description(), this function always + * returns a string (as a fallback, it returns "(unnamed profile)". + * * Return value: the @profile's label. The returned value belongs to * @profile and must not be modified or freed. * @@ -517,9 +520,6 @@ gimp_color_profile_get_label (GimpColorProfile *profile) { const gchar *label = gimp_color_profile_get_description (profile); - if (! label || ! strlen (label)) - label = gimp_color_profile_get_model (profile); - if (! label || ! strlen (label)) label = _("(unnamed profile)"); @@ -563,7 +563,7 @@ gimp_color_profile_get_summary (GimpColorProfile *profile) if (string->len > 0) g_string_append (string, "\n"); - g_string_append (string, text); + g_string_append_printf (string, _("Model: %s"), text); } text = gimp_color_profile_get_manufacturer (profile); @@ -572,7 +572,7 @@ gimp_color_profile_get_summary (GimpColorProfile *profile) if (string->len > 0) g_string_append (string, "\n"); - g_string_append (string, text); + g_string_append_printf (string, _("Manufacturer: %s"), text); } text = gimp_color_profile_get_copyright (profile); @@ -580,6 +580,8 @@ gimp_color_profile_get_summary (GimpColorProfile *profile) { if (string->len > 0) g_string_append (string, "\n"); + + g_string_append_printf (string, _("Copyright: %s"), text); } profile->priv->summary = g_string_free (string, FALSE);