index 2872dace0a6fd8099c19ec7c8d76264fb21b9ed6..3b4b6b7114fa1effaa8383a959f83c5c49d9c78e 100644 (file)
#endif
#include <math.h>
#include <gtk/gtkbutton.h>
-#include <gtk/gtkcombobox.h>
+#include <gtk/gtk.h>
#include <gtk/gtksignal.h>
#include <gtk/gtklabel.h>
#include <gtk/gtktable.h>
_profileSel = gtk_combo_box_new_text();
- gtk_combo_box_append_text( GTK_COMBO_BOX(_profileSel), "<none>" );
+ gtk_combo_box_append_text( GTK_COMBO_BOX(_profileSel), _("<none>") );
gtk_widget_show( _profileSel );
gtk_combo_box_set_active( GTK_COMBO_BOX(_profileSel), 0 );
gtk_table_attach( GTK_TABLE(t), _profileSel, 1, 2, row, row + 1, GTK_FILL, GTK_FILL, XPAD, YPAD );
gtk_combo_box_remove_text( combo, 0 );
}
- gtk_combo_box_append_text( combo, "<none>");
+ gtk_combo_box_append_text( combo, _("<none>"));
gtk_combo_box_set_active( combo, 0 );
tmp[i] = val * 0x0ffff;
}
guchar post[4] = {0,0,0,0};
- cmsDoTransform( _prof->getTransfToSRGB8(), tmp, post, 1 );
- guint32 other = SP_RGBA32_U_COMPOSE(post[0], post[1], post[2], 255 );
- if ( other != _color.toRGBA32(255) ) {
- _fixupNeeded = other;
- gtk_widget_set_sensitive( _fixupBtn, TRUE );
+ cmsHTRANSFORM trans = _prof->getTransfToSRGB8();
+ if ( trans ) {
+ cmsDoTransform( trans, tmp, post, 1 );
+ guint32 other = SP_RGBA32_U_COMPOSE(post[0], post[1], post[2], 255 );
+ if ( other != _color.toRGBA32(255) ) {
+ _fixupNeeded = other;
+ gtk_widget_set_sensitive( _fixupBtn, TRUE );
#ifdef DEBUG_LCMS
- g_message("Color needs to change 0x%06x to 0x%06x", _color.toRGBA32(255) >> 8, other >> 8 );
+ g_message("Color needs to change 0x%06x to 0x%06x", _color.toRGBA32(255) >> 8, other >> 8 );
#endif // DEBUG_LCMS
+ }
}
}
#else
gtk_adjustment_set_value( _fooAdj[i], val );
}
- if ( _prof->getTransfToSRGB8() ) {
+ if ( _prof && _prof->getTransfToSRGB8() ) {
for ( guint i = 0; i < _profChannelCount; i++ ) {
if ( static_cast<gint>(i) != ignore ) {
icUInt16Number* scratch = getScratch();
}
}
- cmsDoTransform( _prof->getTransfToSRGB8(), scratch, _fooMap[i], 1024 );
- sp_color_slider_set_map( SP_COLOR_SLIDER(_fooSlider[i]), _fooMap[i] );
+ cmsHTRANSFORM trans = _prof->getTransfToSRGB8();
+ if ( trans ) {
+ cmsDoTransform( trans, scratch, _fooMap[i], 1024 );
+ sp_color_slider_set_map( SP_COLOR_SLIDER(_fooSlider[i]), _fooMap[i] );
+ }
}
}
}
@@ -840,7 +846,10 @@ void ColorICCSelector::_adjustmentChanged( GtkAdjustment *adjustment, SPColorICC
}
guchar post[4] = {0,0,0,0};
- cmsDoTransform( iccSelector->_prof->getTransfToSRGB8(), tmp, post, 1 );
+ cmsHTRANSFORM trans = iccSelector->_prof->getTransfToSRGB8();
+ if ( trans ) {
+ cmsDoTransform( trans, tmp, post, 1 );
+ }
SPColor other( SP_RGBA32_U_COMPOSE(post[0], post[1], post[2], 255) );
other.icc = new SVGICCColor();