mirror of https://github.com/GNOME/gimp.git
app: rename enum GimpRectangleToolFixedRule to GimpRectangleFixedRule
This commit is contained in:
parent
6e2e8a6f08
commit
d089aa629b
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 ())
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -1066,7 +1066,7 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options)
|
|||
*/
|
||||
gboolean
|
||||
gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options,
|
||||
GimpRectangleToolFixedRule fixed_rule)
|
||||
GimpRectangleFixedRule fixed_rule)
|
||||
{
|
||||
GimpRectangleOptionsPrivate *private;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ struct _GimpRectangleOptionsPrivate
|
|||
GimpUnit size_unit;
|
||||
|
||||
gboolean fixed_rule_active;
|
||||
GimpRectangleToolFixedRule fixed_rule;
|
||||
GimpRectangleFixedRule fixed_rule;
|
||||
|
||||
gdouble desired_fixed_width;
|
||||
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);
|
||||
|
||||
gboolean gimp_rectangle_options_fixed_rule_active (GimpRectangleOptions *rectangle_options,
|
||||
GimpRectangleToolFixedRule fixed_rule);
|
||||
GimpRectangleFixedRule fixed_rule);
|
||||
|
||||
GimpRectangleOptionsPrivate *
|
||||
gimp_rectangle_options_get_private (GimpRectangleOptions *options);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue