From d089aa629b8b952d80c837dcd4dae01b38629e5f Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 24 Jun 2017 19:47:19 +0200 Subject: [PATCH] app: rename enum GimpRectangleToolFixedRule to GimpRectangleFixedRule --- app/display/display-enums.c | 22 ++++----- app/display/display-enums.h | 14 +++--- app/tools/gimprectangleoptions.c | 24 +++++----- app/tools/gimprectangleoptions.h | 82 ++++++++++++++++---------------- app/tools/gimprectangletool.c | 10 ++-- 5 files changed, 76 insertions(+), 76 deletions(-) diff --git a/app/display/display-enums.c b/app/display/display-enums.c index b42cd77aa5..a967e9b44f 100644 --- a/app/display/display-enums.c +++ b/app/display/display-enums.c @@ -291,23 +291,23 @@ gimp_rectangle_constraint_get_type (void) } GType -gimp_rectangle_tool_fixed_rule_get_type (void) +gimp_rectangle_fixed_rule_get_type (void) { static const GEnumValue values[] = { - { GIMP_RECTANGLE_TOOL_FIXED_ASPECT, "GIMP_RECTANGLE_TOOL_FIXED_ASPECT", "aspect" }, - { GIMP_RECTANGLE_TOOL_FIXED_WIDTH, "GIMP_RECTANGLE_TOOL_FIXED_WIDTH", "width" }, - { GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, "GIMP_RECTANGLE_TOOL_FIXED_HEIGHT", "height" }, - { GIMP_RECTANGLE_TOOL_FIXED_SIZE, "GIMP_RECTANGLE_TOOL_FIXED_SIZE", "size" }, + { GIMP_RECTANGLE_FIXED_ASPECT, "GIMP_RECTANGLE_FIXED_ASPECT", "aspect" }, + { GIMP_RECTANGLE_FIXED_WIDTH, "GIMP_RECTANGLE_FIXED_WIDTH", "width" }, + { GIMP_RECTANGLE_FIXED_HEIGHT, "GIMP_RECTANGLE_FIXED_HEIGHT", "height" }, + { GIMP_RECTANGLE_FIXED_SIZE, "GIMP_RECTANGLE_FIXED_SIZE", "size" }, { 0, NULL, NULL } }; static const GimpEnumDesc descs[] = { - { GIMP_RECTANGLE_TOOL_FIXED_ASPECT, NC_("rectangle-tool-fixed-rule", "Aspect ratio"), NULL }, - { GIMP_RECTANGLE_TOOL_FIXED_WIDTH, NC_("rectangle-tool-fixed-rule", "Width"), NULL }, - { GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, NC_("rectangle-tool-fixed-rule", "Height"), NULL }, - { GIMP_RECTANGLE_TOOL_FIXED_SIZE, NC_("rectangle-tool-fixed-rule", "Size"), NULL }, + { GIMP_RECTANGLE_FIXED_ASPECT, NC_("rectangle-fixed-rule", "Aspect ratio"), NULL }, + { GIMP_RECTANGLE_FIXED_WIDTH, NC_("rectangle-fixed-rule", "Width"), NULL }, + { GIMP_RECTANGLE_FIXED_HEIGHT, NC_("rectangle-fixed-rule", "Height"), NULL }, + { GIMP_RECTANGLE_FIXED_SIZE, NC_("rectangle-fixed-rule", "Size"), NULL }, { 0, NULL, NULL } }; @@ -315,8 +315,8 @@ gimp_rectangle_tool_fixed_rule_get_type (void) if (G_UNLIKELY (! type)) { - type = g_enum_register_static ("GimpRectangleToolFixedRule", values); - gimp_type_set_translation_context (type, "rectangle-tool-fixed-rule"); + type = g_enum_register_static ("GimpRectangleFixedRule", values); + gimp_type_set_translation_context (type, "rectangle-fixed-rule"); gimp_enum_set_value_descriptions (type, descs); } diff --git a/app/display/display-enums.h b/app/display/display-enums.h index 72d9553ec9..f96d9e3b2a 100644 --- a/app/display/display-enums.h +++ b/app/display/display-enums.h @@ -132,17 +132,17 @@ typedef enum } 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 { - GIMP_RECTANGLE_TOOL_FIXED_ASPECT, /*< desc="Aspect ratio" >*/ - GIMP_RECTANGLE_TOOL_FIXED_WIDTH, /*< desc="Width" >*/ - GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, /*< desc="Height" >*/ - GIMP_RECTANGLE_TOOL_FIXED_SIZE, /*< desc="Size" >*/ -} GimpRectangleToolFixedRule; + GIMP_RECTANGLE_FIXED_ASPECT, /*< desc="Aspect ratio" >*/ + GIMP_RECTANGLE_FIXED_WIDTH, /*< desc="Width" >*/ + GIMP_RECTANGLE_FIXED_HEIGHT, /*< desc="Height" >*/ + GIMP_RECTANGLE_FIXED_SIZE, /*< desc="Size" >*/ +} GimpRectangleFixedRule; #define GIMP_TYPE_RECTANGLE_PRECISION (gimp_rectangle_precision_get_type ()) diff --git a/app/tools/gimprectangleoptions.c b/app/tools/gimprectangleoptions.c index 4aefadfcdb..e1b5daa318 100644 --- a/app/tools/gimprectangleoptions.c +++ b/app/tools/gimprectangleoptions.c @@ -195,8 +195,8 @@ gimp_rectangle_options_iface_base_init (GimpRectangleOptionsInterface *iface) g_param_spec_enum ("fixed-rule", NULL, N_("Choose what has to be locked"), - GIMP_TYPE_RECTANGLE_TOOL_FIXED_RULE, - GIMP_RECTANGLE_TOOL_FIXED_ASPECT, + GIMP_TYPE_RECTANGLE_FIXED_RULE, + GIMP_RECTANGLE_FIXED_ASPECT, GIMP_CONFIG_PARAM_FLAGS | GIMP_PARAM_STATIC_STRINGS)); @@ -706,16 +706,16 @@ gimp_rectangle_options_fixed_rule_changed (GtkWidget *combo_bo gtk_widget_set_sensitive (private->width_entry, ! (private->fixed_rule_active && (private->fixed_rule == - GIMP_RECTANGLE_TOOL_FIXED_WIDTH || + GIMP_RECTANGLE_FIXED_WIDTH || private->fixed_rule == - GIMP_RECTANGLE_TOOL_FIXED_SIZE))); + GIMP_RECTANGLE_FIXED_SIZE))); gtk_widget_set_sensitive (private->height_entry, ! (private->fixed_rule_active && (private->fixed_rule == - GIMP_RECTANGLE_TOOL_FIXED_HEIGHT || + GIMP_RECTANGLE_FIXED_HEIGHT || private->fixed_rule == - GIMP_RECTANGLE_TOOL_FIXED_SIZE))); + GIMP_RECTANGLE_FIXED_SIZE))); /* Setup current fixed rule entries */ @@ -726,19 +726,19 @@ gimp_rectangle_options_fixed_rule_changed (GtkWidget *combo_bo switch (private->fixed_rule) { - case GIMP_RECTANGLE_TOOL_FIXED_ASPECT: + case GIMP_RECTANGLE_FIXED_ASPECT: gtk_widget_show (private->fixed_aspect_hbox); break; - case GIMP_RECTANGLE_TOOL_FIXED_WIDTH: + case GIMP_RECTANGLE_FIXED_WIDTH: gtk_widget_show (private->fixed_width_entry); break; - case GIMP_RECTANGLE_TOOL_FIXED_HEIGHT: + case GIMP_RECTANGLE_FIXED_HEIGHT: gtk_widget_show (private->fixed_height_entry); break; - case GIMP_RECTANGLE_TOOL_FIXED_SIZE: + case GIMP_RECTANGLE_FIXED_SIZE: gtk_widget_show (private->fixed_size_hbox); break; } @@ -1065,8 +1065,8 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options) * Return value: %TRUE if @fixed_rule is active, %FALSE otherwise. */ gboolean -gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options, - GimpRectangleToolFixedRule fixed_rule) +gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options, + GimpRectangleFixedRule fixed_rule) { GimpRectangleOptionsPrivate *private; diff --git a/app/tools/gimprectangleoptions.h b/app/tools/gimprectangleoptions.h index 84c3d43be1..ae1370f1c3 100644 --- a/app/tools/gimprectangleoptions.h +++ b/app/tools/gimprectangleoptions.h @@ -76,68 +76,68 @@ struct _GimpRectangleOptionsInterface struct _GimpRectangleOptionsPrivate { - gboolean auto_shrink; - gboolean shrink_merged; + gboolean auto_shrink; + gboolean shrink_merged; - gboolean highlight; - GimpGuidesType guide; + gboolean highlight; + GimpGuidesType guide; - gdouble x; - gdouble y; - gdouble width; - gdouble height; + gdouble x; + gdouble y; + gdouble width; + gdouble height; - GimpUnit position_unit; - GimpUnit size_unit; + GimpUnit position_unit; + GimpUnit size_unit; - gboolean fixed_rule_active; - GimpRectangleToolFixedRule fixed_rule; + gboolean fixed_rule_active; + GimpRectangleFixedRule fixed_rule; - gdouble desired_fixed_width; - gdouble desired_fixed_height; + gdouble desired_fixed_width; + gdouble desired_fixed_height; - gdouble desired_fixed_size_width; - gdouble desired_fixed_size_height; + gdouble desired_fixed_size_width; + gdouble desired_fixed_size_height; - gdouble default_fixed_size_width; - gdouble default_fixed_size_height; - gboolean overridden_fixed_size; + gdouble default_fixed_size_width; + gdouble default_fixed_size_height; + gboolean overridden_fixed_size; - gdouble aspect_numerator; - gdouble aspect_denominator; + gdouble aspect_numerator; + gdouble aspect_denominator; - gdouble default_aspect_numerator; - gdouble default_aspect_denominator; - gboolean overridden_fixed_aspect; + gdouble default_aspect_numerator; + gdouble default_aspect_denominator; + gboolean overridden_fixed_aspect; - gboolean fixed_center; + gboolean fixed_center; /* This gboolean is not part of the actual rectangle tool options, * and should be refactored out along with the pointers to widgets. */ - gboolean use_string_current; + gboolean use_string_current; - GimpUnit fixed_unit; + GimpUnit fixed_unit; /* options gui */ - GtkWidget *auto_shrink_button; + GtkWidget *auto_shrink_button; - GtkWidget *fixed_width_entry; - GtkWidget *fixed_height_entry; + GtkWidget *fixed_width_entry; + GtkWidget *fixed_height_entry; - GtkWidget *fixed_aspect_hbox; - GtkWidget *aspect_button_box; - GtkListStore *aspect_history; + GtkWidget *fixed_aspect_hbox; + GtkWidget *aspect_button_box; + GtkListStore *aspect_history; - GtkWidget *fixed_size_hbox; - GtkWidget *size_button_box; - GtkListStore *size_history; + GtkWidget *fixed_size_hbox; + GtkWidget *size_button_box; + GtkListStore *size_history; - GtkWidget *x_entry; - GtkWidget *y_entry; - GtkWidget *width_entry; - GtkWidget *height_entry; + GtkWidget *x_entry; + GtkWidget *y_entry; + GtkWidget *width_entry; + GtkWidget *height_entry; }; @@ -146,7 +146,7 @@ GType gimp_rectangle_options_interface_get_type (void) G_GNUC_CONST; GtkWidget * gimp_rectangle_options_gui (GimpToolOptions *tool_options); gboolean gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options, - GimpRectangleToolFixedRule fixed_rule); + GimpRectangleFixedRule fixed_rule); GimpRectangleOptionsPrivate * gimp_rectangle_options_get_private (GimpRectangleOptions *options); diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c index c46e9c5097..0505587a85 100644 --- a/app/tools/gimprectangletool.c +++ b/app/tools/gimprectangletool.c @@ -1181,7 +1181,7 @@ gimp_rectangle_tool_motion (GimpTool *tool, gimp_rectangle_tool_set_function (rect_tool, function); 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 * 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); if (gimp_rectangle_options_fixed_rule_active (options, - GIMP_RECTANGLE_TOOL_FIXED_ASPECT)) + GIMP_RECTANGLE_FIXED_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, - GIMP_RECTANGLE_TOOL_FIXED_SIZE)) + GIMP_RECTANGLE_FIXED_SIZE)) { gimp_rectangle_tool_apply_fixed_width (rect_tool, constraint_to_use, @@ -3999,14 +3999,14 @@ gimp_rectangle_tool_apply_fixed_rule (GimpRectangleTool *rect_tool) options_private->desired_fixed_size_height); } 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, constraint_to_use, options_private->desired_fixed_width); } 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, constraint_to_use,