[gimp] libgimpcolor: don't return a profile's model as fallback for it's description



commit f6f91bcc99281436e9e93bc4773c88926aa8588e
Author: Michael Natterer <mitch gimp org>
Date:   Sat Aug 22 21:59:30 2015 +0200

    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 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/libgimpcolor/gimpcolorprofile.c b/libgimpcolor/gimpcolorprofile.c
index 498a3f5..df2081b 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.
  *
@@ -518,9 +521,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)");
 
       profile->priv->label = g_strdup (label);
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]