app: rename enum GimpRectangleToolFixedRule to GimpRectangleFixedRule

This commit is contained in:
Michael Natterer
2017-06-24 19:47:19 +02:00
parent 6e2e8a6f08
commit d089aa629b
5 changed files with 76 additions and 76 deletions

View File

@ -291,23 +291,23 @@ gimp_rectangle_constraint_get_type (void)
} }
GType GType
gimp_rectangle_tool_fixed_rule_get_type (void) gimp_rectangle_fixed_rule_get_type (void)
{ {
static const GEnumValue values[] = static const GEnumValue values[] =
{ {
{ GIMP_RECTANGLE_TOOL_FIXED_ASPECT, "GIMP_RECTANGLE_TOOL_FIXED_ASPECT", "aspect" }, { GIMP_RECTANGLE_FIXED_ASPECT, "GIMP_RECTANGLE_FIXED_ASPECT", "aspect" },
{ GIMP_RECTANGLE_TOOL_FIXED_WIDTH, "GIMP_RECTANGLE_TOOL_FIXED_WIDTH", "width" }, { GIMP_RECTANGLE_FIXED_WIDTH, "GIMP_RECTANGLE_FIXED_WIDTH", "width" },
{ GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, "GIMP_RECTANGLE_TOOL_FIXED_HEIGHT", "height" }, { GIMP_RECTANGLE_FIXED_HEIGHT, "GIMP_RECTANGLE_FIXED_HEIGHT", "height" },
{ GIMP_RECTANGLE_TOOL_FIXED_SIZE, "GIMP_RECTANGLE_TOOL_FIXED_SIZE", "size" }, { GIMP_RECTANGLE_FIXED_SIZE, "GIMP_RECTANGLE_FIXED_SIZE", "size" },
{ 0, NULL, NULL } { 0, NULL, NULL }
}; };
static const GimpEnumDesc descs[] = static const GimpEnumDesc descs[] =
{ {
{ GIMP_RECTANGLE_TOOL_FIXED_ASPECT, NC_("rectangle-tool-fixed-rule", "Aspect ratio"), NULL }, { GIMP_RECTANGLE_FIXED_ASPECT, NC_("rectangle-fixed-rule", "Aspect ratio"), NULL },
{ GIMP_RECTANGLE_TOOL_FIXED_WIDTH, NC_("rectangle-tool-fixed-rule", "Width"), NULL }, { GIMP_RECTANGLE_FIXED_WIDTH, NC_("rectangle-fixed-rule", "Width"), NULL },
{ GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, NC_("rectangle-tool-fixed-rule", "Height"), NULL }, { GIMP_RECTANGLE_FIXED_HEIGHT, NC_("rectangle-fixed-rule", "Height"), NULL },
{ GIMP_RECTANGLE_TOOL_FIXED_SIZE, NC_("rectangle-tool-fixed-rule", "Size"), NULL }, { GIMP_RECTANGLE_FIXED_SIZE, NC_("rectangle-fixed-rule", "Size"), NULL },
{ 0, NULL, NULL } { 0, NULL, NULL }
}; };
@ -315,8 +315,8 @@ gimp_rectangle_tool_fixed_rule_get_type (void)
if (G_UNLIKELY (! type)) if (G_UNLIKELY (! type))
{ {
type = g_enum_register_static ("GimpRectangleToolFixedRule", values); type = g_enum_register_static ("GimpRectangleFixedRule", values);
gimp_type_set_translation_context (type, "rectangle-tool-fixed-rule"); gimp_type_set_translation_context (type, "rectangle-fixed-rule");
gimp_enum_set_value_descriptions (type, descs); gimp_enum_set_value_descriptions (type, descs);
} }

View File

@ -132,17 +132,17 @@ typedef enum
} GimpRectangleConstraint; } GimpRectangleConstraint;
#define GIMP_TYPE_RECTANGLE_TOOL_FIXED_RULE (gimp_rectangle_tool_fixed_rule_get_type ()) #define GIMP_TYPE_RECTANGLE_FIXED_RULE (gimp_rectangle_fixed_rule_get_type ())
GType gimp_rectangle_tool_fixed_rule_get_type (void) G_GNUC_CONST; GType gimp_rectangle_fixed_rule_get_type (void) G_GNUC_CONST;
typedef enum typedef enum
{ {
GIMP_RECTANGLE_TOOL_FIXED_ASPECT, /*< desc="Aspect ratio" >*/ GIMP_RECTANGLE_FIXED_ASPECT, /*< desc="Aspect ratio" >*/
GIMP_RECTANGLE_TOOL_FIXED_WIDTH, /*< desc="Width" >*/ GIMP_RECTANGLE_FIXED_WIDTH, /*< desc="Width" >*/
GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, /*< desc="Height" >*/ GIMP_RECTANGLE_FIXED_HEIGHT, /*< desc="Height" >*/
GIMP_RECTANGLE_TOOL_FIXED_SIZE, /*< desc="Size" >*/ GIMP_RECTANGLE_FIXED_SIZE, /*< desc="Size" >*/
} GimpRectangleToolFixedRule; } GimpRectangleFixedRule;
#define GIMP_TYPE_RECTANGLE_PRECISION (gimp_rectangle_precision_get_type ()) #define GIMP_TYPE_RECTANGLE_PRECISION (gimp_rectangle_precision_get_type ())

View File

@ -195,8 +195,8 @@ gimp_rectangle_options_iface_base_init (GimpRectangleOptionsInterface *iface)
g_param_spec_enum ("fixed-rule", g_param_spec_enum ("fixed-rule",
NULL, NULL,
N_("Choose what has to be locked"), N_("Choose what has to be locked"),
GIMP_TYPE_RECTANGLE_TOOL_FIXED_RULE, GIMP_TYPE_RECTANGLE_FIXED_RULE,
GIMP_RECTANGLE_TOOL_FIXED_ASPECT, GIMP_RECTANGLE_FIXED_ASPECT,
GIMP_CONFIG_PARAM_FLAGS | GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS)); GIMP_PARAM_STATIC_STRINGS));
@ -706,16 +706,16 @@ gimp_rectangle_options_fixed_rule_changed (GtkWidget *combo_bo
gtk_widget_set_sensitive (private->width_entry, gtk_widget_set_sensitive (private->width_entry,
! (private->fixed_rule_active && ! (private->fixed_rule_active &&
(private->fixed_rule == (private->fixed_rule ==
GIMP_RECTANGLE_TOOL_FIXED_WIDTH || GIMP_RECTANGLE_FIXED_WIDTH ||
private->fixed_rule == private->fixed_rule ==
GIMP_RECTANGLE_TOOL_FIXED_SIZE))); GIMP_RECTANGLE_FIXED_SIZE)));
gtk_widget_set_sensitive (private->height_entry, gtk_widget_set_sensitive (private->height_entry,
! (private->fixed_rule_active && ! (private->fixed_rule_active &&
(private->fixed_rule == (private->fixed_rule ==
GIMP_RECTANGLE_TOOL_FIXED_HEIGHT || GIMP_RECTANGLE_FIXED_HEIGHT ||
private->fixed_rule == private->fixed_rule ==
GIMP_RECTANGLE_TOOL_FIXED_SIZE))); GIMP_RECTANGLE_FIXED_SIZE)));
/* Setup current fixed rule entries */ /* Setup current fixed rule entries */
@ -726,19 +726,19 @@ gimp_rectangle_options_fixed_rule_changed (GtkWidget *combo_bo
switch (private->fixed_rule) switch (private->fixed_rule)
{ {
case GIMP_RECTANGLE_TOOL_FIXED_ASPECT: case GIMP_RECTANGLE_FIXED_ASPECT:
gtk_widget_show (private->fixed_aspect_hbox); gtk_widget_show (private->fixed_aspect_hbox);
break; break;
case GIMP_RECTANGLE_TOOL_FIXED_WIDTH: case GIMP_RECTANGLE_FIXED_WIDTH:
gtk_widget_show (private->fixed_width_entry); gtk_widget_show (private->fixed_width_entry);
break; break;
case GIMP_RECTANGLE_TOOL_FIXED_HEIGHT: case GIMP_RECTANGLE_FIXED_HEIGHT:
gtk_widget_show (private->fixed_height_entry); gtk_widget_show (private->fixed_height_entry);
break; break;
case GIMP_RECTANGLE_TOOL_FIXED_SIZE: case GIMP_RECTANGLE_FIXED_SIZE:
gtk_widget_show (private->fixed_size_hbox); gtk_widget_show (private->fixed_size_hbox);
break; break;
} }
@ -1066,7 +1066,7 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options)
*/ */
gboolean gboolean
gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options, gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options,
GimpRectangleToolFixedRule fixed_rule) GimpRectangleFixedRule fixed_rule)
{ {
GimpRectangleOptionsPrivate *private; GimpRectangleOptionsPrivate *private;

View File

@ -91,7 +91,7 @@ struct _GimpRectangleOptionsPrivate
GimpUnit size_unit; GimpUnit size_unit;
gboolean fixed_rule_active; gboolean fixed_rule_active;
GimpRectangleToolFixedRule fixed_rule; GimpRectangleFixedRule fixed_rule;
gdouble desired_fixed_width; gdouble desired_fixed_width;
gdouble desired_fixed_height; gdouble desired_fixed_height;
@ -146,7 +146,7 @@ GType gimp_rectangle_options_interface_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_rectangle_options_gui (GimpToolOptions *tool_options); GtkWidget * gimp_rectangle_options_gui (GimpToolOptions *tool_options);
gboolean gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options, gboolean gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options,
GimpRectangleToolFixedRule fixed_rule); GimpRectangleFixedRule fixed_rule);
GimpRectangleOptionsPrivate * GimpRectangleOptionsPrivate *
gimp_rectangle_options_get_private (GimpRectangleOptions *options); gimp_rectangle_options_get_private (GimpRectangleOptions *options);

View File

@ -1181,7 +1181,7 @@ gimp_rectangle_tool_motion (GimpTool *tool,
gimp_rectangle_tool_set_function (rect_tool, function); gimp_rectangle_tool_set_function (rect_tool, function);
if (gimp_rectangle_options_fixed_rule_active (options, if (gimp_rectangle_options_fixed_rule_active (options,
GIMP_RECTANGLE_TOOL_FIXED_SIZE)) GIMP_RECTANGLE_FIXED_SIZE))
{ {
/* For fixed size, set the function to moving immediately since the /* For fixed size, set the function to moving immediately since the
* rectangle can not be resized anyway. * rectangle can not be resized anyway.
@ -3938,7 +3938,7 @@ gimp_rectangle_tool_apply_fixed_rule (GimpRectangleTool *rect_tool)
constraint_to_use = gimp_rectangle_tool_get_constraint (rect_tool); constraint_to_use = gimp_rectangle_tool_get_constraint (rect_tool);
if (gimp_rectangle_options_fixed_rule_active (options, if (gimp_rectangle_options_fixed_rule_active (options,
GIMP_RECTANGLE_TOOL_FIXED_ASPECT)) GIMP_RECTANGLE_FIXED_ASPECT))
{ {
gdouble aspect; gdouble aspect;
@ -3989,7 +3989,7 @@ gimp_rectangle_tool_apply_fixed_rule (GimpRectangleTool *rect_tool)
} }
} }
else if (gimp_rectangle_options_fixed_rule_active (options, else if (gimp_rectangle_options_fixed_rule_active (options,
GIMP_RECTANGLE_TOOL_FIXED_SIZE)) GIMP_RECTANGLE_FIXED_SIZE))
{ {
gimp_rectangle_tool_apply_fixed_width (rect_tool, gimp_rectangle_tool_apply_fixed_width (rect_tool,
constraint_to_use, constraint_to_use,
@ -3999,14 +3999,14 @@ gimp_rectangle_tool_apply_fixed_rule (GimpRectangleTool *rect_tool)
options_private->desired_fixed_size_height); options_private->desired_fixed_size_height);
} }
else if (gimp_rectangle_options_fixed_rule_active (options, else if (gimp_rectangle_options_fixed_rule_active (options,
GIMP_RECTANGLE_TOOL_FIXED_WIDTH)) GIMP_RECTANGLE_FIXED_WIDTH))
{ {
gimp_rectangle_tool_apply_fixed_width (rect_tool, gimp_rectangle_tool_apply_fixed_width (rect_tool,
constraint_to_use, constraint_to_use,
options_private->desired_fixed_width); options_private->desired_fixed_width);
} }
else if (gimp_rectangle_options_fixed_rule_active (options, else if (gimp_rectangle_options_fixed_rule_active (options,
GIMP_RECTANGLE_TOOL_FIXED_HEIGHT)) GIMP_RECTANGLE_FIXED_HEIGHT))
{ {
gimp_rectangle_tool_apply_fixed_height (rect_tool, gimp_rectangle_tool_apply_fixed_height (rect_tool,
constraint_to_use, constraint_to_use,