static gboolean key_gamutcheck_callback(GtkAccelGroup *accel_group, GObject *acceleratable, guint keyval, GdkModifierType modifier, gpointer data) { dt_iop_module_t* self = (dt_iop_module_t*)data; dt_iop_colorout_gui_data_t *g = (dt_iop_colorout_gui_data_t *)self->gui_data; dt_iop_colorout_params_t *p = (dt_iop_colorout_params_t *)self->params; if(p->softproof_enabled == DT_SOFTPROOF_GAMUTCHECK) p->softproof_enabled = DT_SOFTPROOF_DISABLED; else p->softproof_enabled = DT_SOFTPROOF_GAMUTCHECK; g->softproof_enabled = p->softproof_enabled; if(p->softproof_enabled) { int pos = dt_bauhaus_combobox_get(g->cbox5); gchar *filename = _get_profile_from_pos(g->profiles, pos); if (filename) g_strlcpy(p->softproofprofile, filename, sizeof(p->softproofprofile)); } dt_dev_add_history_item(darktable.develop, self, TRUE); dt_control_queue_redraw_center(); return TRUE; }
static void softproof_profile_changed(GtkWidget *widget, gpointer user_data) { dt_iop_module_t *self = (dt_iop_module_t *)user_data; if(self->dt->gui->reset) return; dt_iop_colorout_params_t *p = (dt_iop_colorout_params_t *)self->params; dt_iop_colorout_gui_data_t *g = (dt_iop_colorout_gui_data_t *)self->gui_data; int pos = dt_bauhaus_combobox_get(widget); gchar *filename = _get_profile_from_pos(g->profiles, pos); if(filename) { g_strlcpy(p->softproofprofile, filename, sizeof(p->softproofprofile)); dt_dev_add_history_item(darktable.develop, self, TRUE); return; } fprintf(stderr, "[colorout] softprofile %s seems to have disappeared!\n", p->softproofprofile); }