Commit edaab6c3 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/base/base-enums.[ch] changed CurvesType enum GimpCurveType and

2003-03-14  Sven Neumann  <sven@gimp.org>

	* app/base/base-enums.[ch]
	* app/base/curves.[ch]: changed CurvesType enum GimpCurveType and
	register it with the type system.

	* app/tools/gimpcurvestool.c: use an enum menu here.
parent 9589037b
2003-03-14 Sven Neumann <sven@gimp.org>
* app/base/base-enums.[ch]
* app/base/curves.[ch]: changed CurvesType enum GimpCurveType and
register it with the type system.
* app/tools/gimpcurvestool.c: use an enum menu here.
2003-03-14 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdock.c: fiddle with the color of the dock
......@@ -8,126 +8,145 @@
/* enumerations from "./base-enums.h" */
static const GEnumValue gimp_interpolation_type_enum_values[] =
static const GEnumValue gimp_check_size_enum_values[] =
{
{ GIMP_INTERPOLATION_NONE, N_("None (Fastest)"), "none" },
{ GIMP_INTERPOLATION_LINEAR, N_("Linear"), "linear" },
{ GIMP_INTERPOLATION_CUBIC, N_("Cubic (Best)"), "cubic" },
{ GIMP_SMALL_CHECKS, N_("Small"), "small-checks" },
{ GIMP_MEDIUM_CHECKS, N_("Medium"), "medium-checks" },
{ GIMP_LARGE_CHECKS, N_("Large"), "large-checks" },
{ 0, NULL, NULL }
};
GType
gimp_interpolation_type_get_type (void)
gimp_check_size_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpInterpolationType", gimp_interpolation_type_enum_values);
enum_type = g_enum_register_static ("GimpCheckSize", gimp_check_size_enum_values);
return enum_type;
}
static const GEnumValue gimp_layer_mode_effects_enum_values[] =
static const GEnumValue gimp_check_type_enum_values[] =
{
{ GIMP_NORMAL_MODE, "GIMP_NORMAL_MODE", "normal-mode" },
{ GIMP_DISSOLVE_MODE, "GIMP_DISSOLVE_MODE", "dissolve-mode" },
{ GIMP_BEHIND_MODE, "GIMP_BEHIND_MODE", "behind-mode" },
{ GIMP_MULTIPLY_MODE, "GIMP_MULTIPLY_MODE", "multiply-mode" },
{ GIMP_SCREEN_MODE, "GIMP_SCREEN_MODE", "screen-mode" },
{ GIMP_OVERLAY_MODE, "GIMP_OVERLAY_MODE", "overlay-mode" },
{ GIMP_DIFFERENCE_MODE, "GIMP_DIFFERENCE_MODE", "difference-mode" },
{ GIMP_ADDITION_MODE, "GIMP_ADDITION_MODE", "addition-mode" },
{ GIMP_SUBTRACT_MODE, "GIMP_SUBTRACT_MODE", "subtract-mode" },
{ GIMP_DARKEN_ONLY_MODE, "GIMP_DARKEN_ONLY_MODE", "darken-only-mode" },
{ GIMP_LIGHTEN_ONLY_MODE, "GIMP_LIGHTEN_ONLY_MODE", "lighten-only-mode" },
{ GIMP_HUE_MODE, "GIMP_HUE_MODE", "hue-mode" },
{ GIMP_SATURATION_MODE, "GIMP_SATURATION_MODE", "saturation-mode" },
{ GIMP_COLOR_MODE, "GIMP_COLOR_MODE", "color-mode" },
{ GIMP_VALUE_MODE, "GIMP_VALUE_MODE", "value-mode" },
{ GIMP_DIVIDE_MODE, "GIMP_DIVIDE_MODE", "divide-mode" },
{ GIMP_DODGE_MODE, "GIMP_DODGE_MODE", "dodge-mode" },
{ GIMP_BURN_MODE, "GIMP_BURN_MODE", "burn-mode" },
{ GIMP_HARDLIGHT_MODE, "GIMP_HARDLIGHT_MODE", "hardlight-mode" },
{ GIMP_SOFTLIGHT_MODE, "GIMP_SOFTLIGHT_MODE", "softlight-mode" },
{ GIMP_GRAIN_EXTRACT_MODE, "GIMP_GRAIN_EXTRACT_MODE", "grain-extract-mode" },
{ GIMP_GRAIN_MERGE_MODE, "GIMP_GRAIN_MERGE_MODE", "grain-merge-mode" },
{ GIMP_COLOR_ERASE_MODE, "GIMP_COLOR_ERASE_MODE", "color-erase-mode" },
{ GIMP_LIGHT_CHECKS, N_("Light Checks"), "light-checks" },
{ GIMP_GRAY_CHECKS, N_("Mid-Tone Checks"), "gray-checks" },
{ GIMP_DARK_CHECKS, N_("Dark Checks"), "dark-checks" },
{ GIMP_WHITE_ONLY, N_("White Only"), "white-only" },
{ GIMP_GRAY_ONLY, N_("Gray Only"), "gray-only" },
{ GIMP_BLACK_ONLY, N_("Black Only"), "black-only" },
{ 0, NULL, NULL }
};
GType
gimp_layer_mode_effects_get_type (void)
gimp_check_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpLayerModeEffects", gimp_layer_mode_effects_enum_values);
enum_type = g_enum_register_static ("GimpCheckType", gimp_check_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_check_size_enum_values[] =
static const GEnumValue gimp_curve_type_enum_values[] =
{
{ GIMP_SMALL_CHECKS, N_("Small"), "small-checks" },
{ GIMP_MEDIUM_CHECKS, N_("Medium"), "medium-checks" },
{ GIMP_LARGE_CHECKS, N_("Large"), "large-checks" },
{ GIMP_CURVE_SMOOTH, N_("Smooth"), "smooth" },
{ GIMP_CURVE_FREE, N_("Freehand"), "free" },
{ 0, NULL, NULL }
};
GType
gimp_check_size_get_type (void)
gimp_curve_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpCheckSize", gimp_check_size_enum_values);
enum_type = g_enum_register_static ("GimpCurveType", gimp_curve_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_check_type_enum_values[] =
static const GEnumValue gimp_histogram_channel_enum_values[] =
{
{ GIMP_LIGHT_CHECKS, N_("Light Checks"), "light-checks" },
{ GIMP_GRAY_CHECKS, N_("Mid-Tone Checks"), "gray-checks" },
{ GIMP_DARK_CHECKS, N_("Dark Checks"), "dark-checks" },
{ GIMP_WHITE_ONLY, N_("White Only"), "white-only" },
{ GIMP_GRAY_ONLY, N_("Gray Only"), "gray-only" },
{ GIMP_BLACK_ONLY, N_("Black Only"), "black-only" },
{ GIMP_HISTOGRAM_VALUE, N_("Value"), "value" },
{ GIMP_HISTOGRAM_RED, N_("Red"), "red" },
{ GIMP_HISTOGRAM_GREEN, N_("Green"), "green" },
{ GIMP_HISTOGRAM_BLUE, N_("Blue"), "blue" },
{ GIMP_HISTOGRAM_ALPHA, N_("Alpha"), "alpha" },
{ 0, NULL, NULL }
};
GType
gimp_check_type_get_type (void)
gimp_histogram_channel_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpCheckType", gimp_check_type_enum_values);
enum_type = g_enum_register_static ("GimpHistogramChannel", gimp_histogram_channel_enum_values);
return enum_type;
}
static const GEnumValue gimp_histogram_channel_enum_values[] =
static const GEnumValue gimp_interpolation_type_enum_values[] =
{
{ GIMP_HISTOGRAM_VALUE, N_("Value"), "value" },
{ GIMP_HISTOGRAM_RED, N_("Red"), "red" },
{ GIMP_HISTOGRAM_GREEN, N_("Green"), "green" },
{ GIMP_HISTOGRAM_BLUE, N_("Blue"), "blue" },
{ GIMP_HISTOGRAM_ALPHA, N_("Alpha"), "alpha" },
{ GIMP_INTERPOLATION_NONE, N_("None (Fastest)"), "none" },
{ GIMP_INTERPOLATION_LINEAR, N_("Linear"), "linear" },
{ GIMP_INTERPOLATION_CUBIC, N_("Cubic (Best)"), "cubic" },
{ 0, NULL, NULL }
};
GType
gimp_histogram_channel_get_type (void)
gimp_interpolation_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpHistogramChannel", gimp_histogram_channel_enum_values);
enum_type = g_enum_register_static ("GimpInterpolationType", gimp_interpolation_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_layer_mode_effects_enum_values[] =
{
{ GIMP_NORMAL_MODE, "GIMP_NORMAL_MODE", "normal-mode" },
{ GIMP_DISSOLVE_MODE, "GIMP_DISSOLVE_MODE", "dissolve-mode" },
{ GIMP_BEHIND_MODE, "GIMP_BEHIND_MODE", "behind-mode" },
{ GIMP_MULTIPLY_MODE, "GIMP_MULTIPLY_MODE", "multiply-mode" },
{ GIMP_SCREEN_MODE, "GIMP_SCREEN_MODE", "screen-mode" },
{ GIMP_OVERLAY_MODE, "GIMP_OVERLAY_MODE", "overlay-mode" },
{ GIMP_DIFFERENCE_MODE, "GIMP_DIFFERENCE_MODE", "difference-mode" },
{ GIMP_ADDITION_MODE, "GIMP_ADDITION_MODE", "addition-mode" },
{ GIMP_SUBTRACT_MODE, "GIMP_SUBTRACT_MODE", "subtract-mode" },
{ GIMP_DARKEN_ONLY_MODE, "GIMP_DARKEN_ONLY_MODE", "darken-only-mode" },
{ GIMP_LIGHTEN_ONLY_MODE, "GIMP_LIGHTEN_ONLY_MODE", "lighten-only-mode" },
{ GIMP_HUE_MODE, "GIMP_HUE_MODE", "hue-mode" },
{ GIMP_SATURATION_MODE, "GIMP_SATURATION_MODE", "saturation-mode" },
{ GIMP_COLOR_MODE, "GIMP_COLOR_MODE", "color-mode" },
{ GIMP_VALUE_MODE, "GIMP_VALUE_MODE", "value-mode" },
{ GIMP_DIVIDE_MODE, "GIMP_DIVIDE_MODE", "divide-mode" },
{ GIMP_DODGE_MODE, "GIMP_DODGE_MODE", "dodge-mode" },
{ GIMP_BURN_MODE, "GIMP_BURN_MODE", "burn-mode" },
{ GIMP_HARDLIGHT_MODE, "GIMP_HARDLIGHT_MODE", "hardlight-mode" },
{ GIMP_SOFTLIGHT_MODE, "GIMP_SOFTLIGHT_MODE", "softlight-mode" },
{ GIMP_GRAIN_EXTRACT_MODE, "GIMP_GRAIN_EXTRACT_MODE", "grain-extract-mode" },
{ GIMP_GRAIN_MERGE_MODE, "GIMP_GRAIN_MERGE_MODE", "grain-merge-mode" },
{ GIMP_COLOR_ERASE_MODE, "GIMP_COLOR_ERASE_MODE", "color-erase-mode" },
{ 0, NULL, NULL }
};
GType
gimp_layer_mode_effects_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpLayerModeEffects", gimp_layer_mode_effects_enum_values);
return enum_type;
}
......
......@@ -36,6 +36,58 @@
* these enums that are registered with the type system
*/
#define GIMP_TYPE_CHECK_SIZE (gimp_check_size_get_type ())
GType gimp_check_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_SMALL_CHECKS = 0, /*< desc="Small" >*/
GIMP_MEDIUM_CHECKS = 1, /*< desc="Medium" >*/
GIMP_LARGE_CHECKS = 2 /*< desc="Large" >*/
} GimpCheckSize;
#define GIMP_TYPE_CHECK_TYPE (gimp_check_type_get_type ())
GType gimp_check_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_LIGHT_CHECKS = 0, /*< desc="Light Checks" >*/
GIMP_GRAY_CHECKS = 1, /*< desc="Mid-Tone Checks" >*/
GIMP_DARK_CHECKS = 2, /*< desc="Dark Checks" >*/
GIMP_WHITE_ONLY = 3, /*< desc="White Only" >*/
GIMP_GRAY_ONLY = 4, /*< desc="Gray Only" >*/
GIMP_BLACK_ONLY = 5 /*< desc="Black Only" >*/
} GimpCheckType;
#define GIMP_TYPE_CURVE_TYPE (gimp_curve_type_get_type ())
GType gimp_curve_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CURVE_SMOOTH, /*< desc="Smooth" >*/
GIMP_CURVE_FREE /*< desc="Freehand" >*/
} GimpCurveType;
#define GIMP_TYPE_HISTOGRAM_CHANNEL (gimp_histogram_channel_get_type ())
GType gimp_histogram_channel_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_HISTOGRAM_VALUE = 0, /*< desc="Value" >*/
GIMP_HISTOGRAM_RED = 1, /*< desc="Red" >*/
GIMP_HISTOGRAM_GREEN = 2, /*< desc="Green" >*/
GIMP_HISTOGRAM_BLUE = 3, /*< desc="Blue" >*/
GIMP_HISTOGRAM_ALPHA = 4 /*< desc="Alpha" >*/
} GimpHistogramChannel;
#define GIMP_TYPE_INTERPOLATION_TYPE (gimp_interpolation_type_get_type ())
GType gimp_interpolation_type_get_type (void) G_GNUC_CONST;
......@@ -83,47 +135,6 @@ typedef enum
} GimpLayerModeEffects;
#define GIMP_TYPE_CHECK_SIZE (gimp_check_size_get_type ())
GType gimp_check_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_SMALL_CHECKS = 0, /*< desc="Small" >*/
GIMP_MEDIUM_CHECKS = 1, /*< desc="Medium" >*/
GIMP_LARGE_CHECKS = 2 /*< desc="Large" >*/
} GimpCheckSize;
#define GIMP_TYPE_CHECK_TYPE (gimp_check_type_get_type ())
GType gimp_check_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_LIGHT_CHECKS = 0, /*< desc="Light Checks" >*/
GIMP_GRAY_CHECKS = 1, /*< desc="Mid-Tone Checks" >*/
GIMP_DARK_CHECKS = 2, /*< desc="Dark Checks" >*/
GIMP_WHITE_ONLY = 3, /*< desc="White Only" >*/
GIMP_GRAY_ONLY = 4, /*< desc="Gray Only" >*/
GIMP_BLACK_ONLY = 5 /*< desc="Black Only" >*/
} GimpCheckType;
#define GIMP_TYPE_HISTOGRAM_CHANNEL (gimp_histogram_channel_get_type ())
GType gimp_histogram_channel_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_HISTOGRAM_VALUE = 0, /*< desc="Value" >*/
GIMP_HISTOGRAM_RED = 1, /*< desc="Red" >*/
GIMP_HISTOGRAM_GREEN = 2, /*< desc="Green" >*/
GIMP_HISTOGRAM_BLUE = 3, /*< desc="Blue" >*/
GIMP_HISTOGRAM_ALPHA = 4 /*< desc="Alpha" >*/
} GimpHistogramChannel;
#define GIMP_TYPE_TRANSFER_MODE (gimp_transfer_mode_get_type ())
GType gimp_transfer_mode_get_type (void) G_GNUC_CONST;
......
......@@ -69,7 +69,7 @@ curves_init (Curves *curves)
channel <= GIMP_HISTOGRAM_ALPHA;
channel++)
{
curves->curve_type[channel] = CURVES_SMOOTH;
curves->curve_type[channel] = GIMP_CURVE_SMOOTH;
curves_channel_reset (curves, channel);
}
......@@ -111,10 +111,10 @@ curves_calculate_curve (Curves *curves,
switch (curves->curve_type[channel])
{
case CURVES_FREE:
case GIMP_CURVE_FREE:
break;
case CURVES_SMOOTH:
case GIMP_CURVE_SMOOTH:
/* cycle through the curves */
num_pts = 0;
for (i = 0; i < 17; i++)
......
......@@ -20,18 +20,11 @@
#define __CURVES_H__
typedef enum
{
CURVES_SMOOTH,
CURVES_FREE,
} CurvesType;
struct _Curves
{
CurvesType curve_type[5];
gint points[5][17][2];
guchar curve[5][256];
GimpCurveType curve_type[5];
gint points[5][17][2];
guchar curve[5][256];
};
......@@ -40,10 +33,10 @@ void curves_channel_reset (Curves *curves,
GimpHistogramChannel channel);
void curves_calculate_curve (Curves *curves,
GimpHistogramChannel channel);
gfloat curves_lut_func (Curves *curves,
gint nchannels,
gint channel,
gfloat value);
gfloat curves_lut_func (Curves *curves,
gint nchannels,
gint channel,
gfloat value);
#endif /* __CURVES_H__ */
......@@ -131,11 +131,8 @@ static void curves_channel_reset_callback (GtkWidget *widget,
static gboolean curves_set_sensitive_callback (gpointer item_data,
GimpCurvesTool *c_tool);
static void curves_smooth_callback (GtkWidget *widget,
static void curves_type_callback (GtkWidget *widget,
GimpCurvesTool *c_tool);
static void curves_free_callback (GtkWidget *widget,
GimpCurvesTool *c_tool);
static void curves_load_callback (GtkWidget *widget,
GimpCurvesTool *c_tool);
static void curves_save_callback (GtkWidget *widget,
......@@ -522,7 +519,7 @@ curves_add_point (GimpCurvesTool *c_tool,
switch (c_tool->curves->curve_type[cchan])
{
case CURVES_SMOOTH:
case GIMP_CURVE_SMOOTH:
curvex = c_tool->col_value[cchan];
distance = G_MAXINT;
......@@ -543,7 +540,7 @@ curves_add_point (GimpCurvesTool *c_tool,
c_tool->curves->points[cchan][closest_point][1] = c_tool->curves->curve[cchan][curvex];
break;
case CURVES_FREE:
case GIMP_CURVE_FREE:
c_tool->curves->curve[cchan][x] = 255 - y;
break;
}
......@@ -621,17 +618,11 @@ gimp_curves_tool_dialog (GimpImageMapTool *image_map_tool)
_("Modify Curves for Channel:"), 1.0, 0.5,
hbox, 1, FALSE);
/* The option menu for selecting the drawing method */
/* The option menu for selecting the curve type */
c_tool->curve_type_menu =
gimp_option_menu_new (FALSE,
_("Smooth"), curves_smooth_callback,
c_tool, GINT_TO_POINTER (CURVES_SMOOTH), NULL, TRUE,
_("Free"), curves_free_callback,
c_tool, GINT_TO_POINTER (CURVES_FREE), NULL, FALSE,
NULL);
gimp_enum_option_menu_new (GIMP_TYPE_CURVE_TYPE,
G_CALLBACK (curves_type_callback),
c_tool);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Curve Type:"), 1.0, 0.5,
......@@ -931,45 +922,36 @@ curves_set_sensitive_callback (gpointer item_data,
}
static void
curves_smooth_callback (GtkWidget *widget,
GimpCurvesTool *c_tool)
curves_type_callback (GtkWidget *widget,
GimpCurvesTool *c_tool)
{
if (c_tool->curves->curve_type[c_tool->channel] != CURVES_SMOOTH)
{
gint i;
gint32 index;
c_tool->curves->curve_type[c_tool->channel] = CURVES_SMOOTH;
/* pick representative points from the curve
* and make them control points
*/
for (i = 0; i <= 8; i++)
{
index = CLAMP0255 (i * 32);
c_tool->curves->points[c_tool->channel][i * 2][0] = index;
c_tool->curves->points[c_tool->channel][i * 2][1] = c_tool->curves->curve[c_tool->channel][index];
}
curves_calculate_curve (c_tool->curves, c_tool->channel);
curves_update (c_tool, XRANGE_TOP);
gtk_widget_queue_draw (c_tool->graph);
GimpCurveType curve_type;
gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (c_tool));
}
}
gimp_menu_item_update (widget, &curve_type);
static void
curves_free_callback (GtkWidget *widget,
GimpCurvesTool *c_tool)
{
if (c_tool->curves->curve_type[c_tool->channel] != CURVES_FREE)
if (c_tool->curves->curve_type[c_tool->channel] != curve_type)
{
c_tool->curves->curve_type[c_tool->channel] = CURVES_FREE;
c_tool->curves->curve_type[c_tool->channel] = curve_type;
if (curve_type == GIMP_CURVE_SMOOTH)
{
gint i;
gint32 index;
/* pick representative points from the curve
* and make them control points
*/
for (i = 0; i <= 8; i++)
{
index = CLAMP0255 (i * 32);
c_tool->curves->points[c_tool->channel][i * 2][0] = index;
c_tool->curves->points[c_tool->channel][i * 2][1] = c_tool->curves->curve[c_tool->channel][index];
}
}
curves_calculate_curve (c_tool->curves, c_tool->channel);
curves_update (c_tool, XRANGE_TOP);
gtk_widget_queue_draw (c_tool->graph);
gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (c_tool));
......@@ -1026,7 +1008,7 @@ curves_graph_events (GtkWidget *widget,
switch (c_tool->curves->curve_type[c_tool->channel])
{
case CURVES_SMOOTH:
case GIMP_CURVE_SMOOTH:
/* determine the leftmost and rightmost points */
c_tool->leftmost = -1;
for (i = closest_point - 1; i >= 0; i--)
......@@ -1048,7 +1030,7 @@ curves_graph_events (GtkWidget *widget,
c_tool->curves->points[c_tool->channel][c_tool->grab_point][1] = 255 - y;
break;
case CURVES_FREE:
case GIMP_CURVE_FREE:
c_tool->curves->curve[c_tool->channel][x] = 255 - y;
c_tool->grab_point = x;
c_tool->last = y;
......@@ -1060,7 +1042,6 @@ curves_graph_events (GtkWidget *widget,
curves_calculate_curve (c_tool->curves, c_tool->channel);
curves_update (c_tool, XRANGE_TOP);
gtk_widget_queue_draw (c_tool->graph);
return TRUE;
......@@ -1071,8 +1052,6 @@ curves_graph_events (GtkWidget *widget,
gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (c_tool));
gtk_grab_remove (widget);
gtk_widget_queue_draw (c_tool->graph);
return TRUE;
case GDK_MOTION_NOTIFY:
......@@ -1080,7 +1059,7 @@ curves_graph_events (GtkWidget *widget,
switch (c_tool->curves->curve_type[c_tool->channel])
{
case CURVES_SMOOTH:
case GIMP_CURVE_SMOOTH:
/* If no point is grabbed... */
if (c_tool->grab_point == -1)
{
......@@ -1110,7 +1089,7 @@ curves_graph_events (GtkWidget *widget,
}
break;
case CURVES_FREE:
case GIMP_CURVE_FREE:
if (c_tool->grab_point != -1)
{
if (c_tool->grab_point > x)
......@@ -1142,6 +1121,7 @@ curves_graph_events (GtkWidget *widget,
new_cursor = GDK_TCROSS;
else
new_cursor = GDK_PENCIL;
break;
}
......@@ -1270,7 +1250,7 @@ curves_graph_expose (GtkWidget *widget,
points[i].y = 255 - c_tool->curves->curve[c_tool->channel][i] + RADIUS;
}
if (c_tool->curves->curve_type[c_tool->channel] == CURVES_FREE)
if (c_tool->curves->curve_type[c_tool->channel] == GIMP_CURVE_FREE)
{
gdk_draw_points (widget->window,
c_tool->graph->style->black_gc,
......@@ -1464,7 +1444,7 @@ curves_read_from_file (GimpCurvesTool *c_tool,
for (i = 0; i < 5; i++)
{
c_tool->curves->curve_type[i] = CURVES_SMOOTH;
c_tool->curves->curve_type[i] = GIMP_CURVE_SMOOTH;
for (j = 0; j < 17; j++)
{
......@@ -1480,7 +1460,7 @@ curves_read_from_file (GimpCurvesTool *c_tool,
gtk_widget_queue_draw (c_tool->graph);
gimp_option_menu_set_history (GTK_OPTION_MENU (c_tool->curve_type_menu),
GINT_TO_POINTER (CURVES_SMOOTH));
GINT_TO_POINTER (GIMP_CURVE_SMOOTH));
gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (c_tool));
......@@ -1495,7 +1475,7 @@ curves_write_to_file (GimpCurvesTool *c_tool,
gint32 index;
for (i = 0; i < 5; i++)
if (c_tool->curves->curve_type[i] == CURVES_FREE)
if (c_tool->curves->curve_type[i] == GIMP_CURVE_FREE)
{
/* pick representative points from the curve
and make them control points */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment