Commit 50871ba1 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

ellipsize the profile label. If possible, use the profile description as

2007-10-18  Sven Neumann  <sven@gimp.org>

	* modules/colorsel_cmyk_lcms.c: ellipsize the profile label. If
	possible, use the profile description as we do in other places.



svn path=/trunk/; revision=23877
parent 251fbfd8
2007-10-18 Sven Neumann <sven@gimp.org>
* modules/colorsel_cmyk_lcms.c: ellipsize the profile label. If
possible, use the profile description as we do in other places.
2007-10-18 Michael Natterer <mitch@gimp.org>
* libgimpmodule/gimpmoduledb.c (gimp_module_db_module_initialize):
......@@ -221,9 +221,9 @@ colorsel_cmyk_init (ColorselCmyk *module)
module->name_label = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (module->name_label), 0.0, 0.5);
gtk_label_set_ellipsize (GTK_LABEL (module->name_label), PANGO_ELLIPSIZE_END);
gimp_label_set_attributes (GTK_LABEL (module->name_label),
PANGO_ATTR_SCALE, PANGO_SCALE_SMALL,
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
gtk_box_pack_start (GTK_BOX (module), module->name_label, FALSE, FALSE, 0);
gtk_widget_show (module->name_label);
......@@ -403,10 +403,17 @@ colorsel_cmyk_config_changed (ColorselCmyk *module)
! (cmyk_profile = cmsOpenProfileFromFile (config->cmyk_profile, "r")))
goto out;
name = cmsTakeProductName (cmyk_profile);
if (! g_utf8_validate (name, -1, NULL))
name = cmsTakeProductDesc (cmyk_profile);
if (name && ! g_utf8_validate (name, -1, NULL))
name = _("(invalid UTF-8 string)");
if (! name)
{
name = cmsTakeProductName (cmyk_profile);
if (name && ! g_utf8_validate (name, -1, NULL))
name = _("(invalid UTF-8 string)");
}
text = g_strdup_printf (_("Profile: %s"), name);
gtk_label_set_text (GTK_LABEL (module->name_label), text);
g_free (text);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment