static gboolean gimp_levels_config_serialize (GimpConfig *config, GimpConfigWriter *writer, gpointer data) { GimpLevelsConfig *l_config = GIMP_LEVELS_CONFIG (config); GimpHistogramChannel channel; GimpHistogramChannel old_channel; gboolean success = TRUE; if (! gimp_config_serialize_property_by_name (config, "time", writer)) return FALSE; old_channel = l_config->channel; for (channel = GIMP_HISTOGRAM_VALUE; channel <= GIMP_HISTOGRAM_ALPHA; channel++) { l_config->channel = channel; success = gimp_config_serialize_properties (config, writer); if (! success) break; } l_config->channel = old_channel; return success; }
static gboolean gimp_curves_config_serialize (GimpConfig *config, GimpConfigWriter *writer, gpointer data) { GimpCurvesConfig *c_config = GIMP_CURVES_CONFIG (config); GimpHistogramChannel channel; GimpHistogramChannel old_channel; gboolean success = TRUE; if (! gimp_config_serialize_property_by_name (config, "time", writer)) return FALSE; old_channel = c_config->channel; for (channel = GIMP_HISTOGRAM_VALUE; channel <= GIMP_HISTOGRAM_ALPHA; channel++) { c_config->channel = channel; /* Serialize the channel properties manually (not using * gimp_config_serialize_properties()), so the parent class' * "time" property doesn't end up in the config file once per * channel. See bug #700653. */ success = (gimp_config_serialize_property_by_name (config, "channel", writer) && gimp_config_serialize_property_by_name (config, "curve", writer)); if (! success) break; } c_config->channel = old_channel; return success; }
static gboolean gimp_levels_config_serialize (GimpConfig *config, GimpConfigWriter *writer, gpointer data) { GimpLevelsConfig *l_config = GIMP_LEVELS_CONFIG (config); GimpHistogramChannel channel; GimpHistogramChannel old_channel; gboolean success = TRUE; if (! gimp_config_serialize_property_by_name (config, "time", writer)) return FALSE; old_channel = l_config->channel; for (channel = GIMP_HISTOGRAM_VALUE; channel <= GIMP_HISTOGRAM_ALPHA; channel++) { l_config->channel = channel; /* serialize the channel properties manually (not using * gimp_config_serialize_properties()), so the parent class' * "time" property doesn't end up in the config file one per * channel. See bug #700653. */ success = (gimp_config_serialize_property_by_name (config, "channel", writer) && gimp_config_serialize_property_by_name (config, "gamma", writer) && gimp_config_serialize_property_by_name (config, "low-input", writer) && gimp_config_serialize_property_by_name (config, "high-input", writer) && gimp_config_serialize_property_by_name (config, "low-output", writer) && gimp_config_serialize_property_by_name (config, "high-output", writer)); if (! success) break; } l_config->channel = old_channel; return success; }
static gboolean gimp_color_balance_config_serialize (GimpConfig *config, GimpConfigWriter *writer, gpointer data) { GimpColorBalanceConfig *bc_config = GIMP_COLOR_BALANCE_CONFIG (config); GimpTransferMode range; GimpTransferMode old_range; gboolean success = TRUE; if (! gimp_config_serialize_property_by_name (config, "time", writer)) return FALSE; old_range = bc_config->range; for (range = GIMP_TRANSFER_SHADOWS; range <= GIMP_TRANSFER_HIGHLIGHTS; range++) { bc_config->range = range; success = (gimp_config_serialize_property_by_name (config, "range", writer) && gimp_config_serialize_property_by_name (config, "cyan-red", writer) && gimp_config_serialize_property_by_name (config, "magenta-green", writer) && gimp_config_serialize_property_by_name (config, "yellow-blue", writer)); if (! success) break; } if (success) success = gimp_config_serialize_property_by_name (config, "preserve-luminosity", writer); bc_config->range = old_range; return success; }
static gboolean gimp_hue_saturation_config_serialize (GimpConfig *config, GimpConfigWriter *writer, gpointer data) { GimpHueSaturationConfig *hs_config = GIMP_HUE_SATURATION_CONFIG (config); GimpHueRange range; GimpHueRange old_range; gboolean success = TRUE; if (! gimp_config_serialize_property_by_name (config, "time", writer)) return FALSE; old_range = hs_config->range; for (range = GIMP_HUE_RANGE_ALL; range <= GIMP_HUE_RANGE_MAGENTA; range++) { hs_config->range = range; success = (gimp_config_serialize_property_by_name (config, "range", writer) && gimp_config_serialize_property_by_name (config, "hue", writer) && gimp_config_serialize_property_by_name (config, "saturation", writer) && gimp_config_serialize_property_by_name (config, "lightness", writer)); if (! success) break; } if (success) success = gimp_config_serialize_property_by_name (config, "overlap", writer); hs_config->range = old_range; return success; }