mirror of https://github.com/GNOME/gimp.git
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
This commit is contained in:
parent
251fbfd8b0
commit
50871ba1c5
|
@ -1,3 +1,8 @@
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue