changeset 1595:de111f20d4ae

better tooltip for disabled lcms
author nadvornik
date Fri, 08 May 2009 18:29:09 +0000
parents f43e1d1299db
children cc74cb8bbe3f
files src/layout_util.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/layout_util.c	Thu May 07 20:24:35 2009 +0000
+++ b/src/layout_util.c	Fri May 08 18:29:09 2009 +0000
@@ -2069,8 +2069,8 @@
 	use_color = layout_image_color_profile_get_use(lw);
 
 	action = gtk_action_group_get_action(lw->action_group, "UseColorProfiles");
+#ifdef HAVE_LCMS
 	gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), use_color);
-	
 	if (layout_image_color_profile_get_status(lw, &image_profile, &screen_profile))
 		{
 		gchar *buf;
@@ -2084,6 +2084,11 @@
 		{
 		g_object_set(G_OBJECT(action), "tooltip", _("Click to enable color management"), NULL);
 		}
+#else
+	gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), FALSE);
+	gtk_action_set_sensitive(action, FALSE);
+	g_object_set(G_OBJECT(action), "tooltip", _("Color profiles not supported"), NULL);
+#endif
 
 	action = gtk_action_group_get_action(lw->action_group, "UseImageProfile");
 	gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), use_image);