summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-color-notebook.cpp
diff options
context:
space:
mode:
authorFelipe Corr??a da Silva Sanches <juca@members.fsf.org>2009-08-11 04:58:32 +0000
committerJucaBlues <JucaBlues@users.sourceforge.net>2009-08-11 04:58:32 +0000
commit6391c5291f744ab260ad3d2f661eab6d101f6b23 (patch)
tree5fb71f8a37685d6f0f15f6c1a8783c7d40538c72 /src/widgets/sp-color-notebook.cpp
parentadding color management icons to fill&stroke dialog (diff)
downloadinkscape-6391c5291f744ab260ad3d2f661eab6d101f6b23.tar.gz
inkscape-6391c5291f744ab260ad3d2f661eab6d101f6b23.zip
setting sensibility of "color management icon" depending on icc-color usage
(bzr r8050.1.7)
Diffstat (limited to 'src/widgets/sp-color-notebook.cpp')
-rw-r--r--src/widgets/sp-color-notebook.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp
index 58974131e..44de40115 100644
--- a/src/widgets/sp-color-notebook.cpp
+++ b/src/widgets/sp-color-notebook.cpp
@@ -326,21 +326,21 @@ void ColorNotebook::init()
GtkWidget *rgbabox = gtk_hbox_new (FALSE, 0);
/* Create color management icons */
- GtkWidget *box_colormanaged = gtk_event_box_new ();
+ _box_colormanaged = gtk_event_box_new ();
GtkWidget *colormanaged = gtk_image_new_from_icon_name ("color-management-icon", GTK_ICON_SIZE_SMALL_TOOLBAR);
- gtk_container_add (GTK_CONTAINER (box_colormanaged), colormanaged);
+ gtk_container_add (GTK_CONTAINER (_box_colormanaged), colormanaged);
GtkTooltips *tooltips_colormanaged = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips_colormanaged, box_colormanaged, _("Color Managed"), "");
- //gtk_widget_hide (GTK_WIDGET (box_colormanaged));
- gtk_box_pack_start(GTK_BOX(rgbabox), box_colormanaged, TRUE, FALSE, 2);
+ gtk_tooltips_set_tip (tooltips_colormanaged, _box_colormanaged, _("Color Managed"), "");
+ gtk_widget_set_sensitive (_box_colormanaged, false);
+ gtk_box_pack_start(GTK_BOX(rgbabox), _box_colormanaged, TRUE, FALSE, 2);
- GtkWidget *box_outofgamut = gtk_event_box_new ();
+ _box_outofgamut = gtk_event_box_new ();
GtkWidget *outofgamut = gtk_image_new_from_icon_name ("out-of-gamut-icon", GTK_ICON_SIZE_SMALL_TOOLBAR);
- gtk_container_add (GTK_CONTAINER (box_outofgamut), outofgamut);
+ gtk_container_add (GTK_CONTAINER (_box_outofgamut), outofgamut);
GtkTooltips *tooltips_outofgamut = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips_outofgamut, box_outofgamut, _("Out of gamut!"), "");
- //gtk_widget_hide (GTK_WIDGET (box_outofgamut));
- gtk_box_pack_start(GTK_BOX(rgbabox), box_outofgamut, TRUE, FALSE, 2);
+ gtk_tooltips_set_tip (tooltips_outofgamut, _box_outofgamut, _("Out of gamut!"), "");
+ gtk_widget_set_sensitive (_box_outofgamut, false);
+ gtk_box_pack_start(GTK_BOX(rgbabox), _box_outofgamut, TRUE, FALSE, 2);
/* Create RGBA entry and color preview */
_rgbal = gtk_label_new_with_mnemonic (_("RGBA_:"));
@@ -500,6 +500,9 @@ void ColorNotebook::_rgbaEntryChanged(GtkEntry* entry)
void ColorNotebook::_updateRgbaEntry( const SPColor& color, gfloat alpha )
{
g_return_if_fail( ( 0.0 <= alpha ) && ( alpha <= 1.0 ) );
+
+ /* update color management icon*/
+ gtk_widget_set_sensitive (_box_colormanaged, color.icc != NULL);
if ( !_updatingrgba )
{