[gimp] app: rename properties s/(horizontal|vertical)-position/\1-axis-position/.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: rename properties s/(horizontal|vertical)-position/\1-axis-position/.
- Date: Mon, 18 Jul 2016 00:52:54 +0000 (UTC)
commit 08ffc1035b32542fb18fec8f976a00348f47ed29
Author: Jehan <jehan girinstud io>
Date: Mon Jul 18 02:33:25 2016 +0200
app: rename properties s/(horizontal|vertical)-position/\1-axis-position/.
"Horizontal position" and "Vertical position" could be mistaken as
meaning respectively the x and y coordinates, hence the vertical (resp.
horizontal) guide's positions.
The more accurate "horizontal-axis-position" and "vertical-axis-position"
namings are less misleading.
app/core/gimpsymmetry-mirror.c | 64 ++++++++++++++++++++--------------------
app/core/gimpsymmetry-mirror.h | 4 +-
2 files changed, 34 insertions(+), 34 deletions(-)
---
diff --git a/app/core/gimpsymmetry-mirror.c b/app/core/gimpsymmetry-mirror.c
index 4177dee..b02a66f 100644
--- a/app/core/gimpsymmetry-mirror.c
+++ b/app/core/gimpsymmetry-mirror.c
@@ -50,8 +50,8 @@ enum
PROP_VERTICAL_SYMMETRY,
PROP_POINT_SYMMETRY,
PROP_DISABLE_TRANSFORMATION,
- PROP_HORIZONTAL_POSITION,
- PROP_VERTICAL_POSITION
+ PROP_HORIZONTAL_AXIS_POSITION,
+ PROP_VERTICAL_AXIS_POSITION
};
@@ -157,27 +157,27 @@ gimp_mirror_class_init (GimpMirrorClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
- GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HORIZONTAL_POSITION,
- "horizontal-position",
+ GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HORIZONTAL_AXIS_POSITION,
+ "horizontal-axis-position",
_("Horizontal axis position"),
NULL,
0.0, G_MAXDOUBLE, 0.0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
- pspec = g_object_class_find_property (object_class, "horizontal-position");
+ pspec = g_object_class_find_property (object_class, "horizontal-axis-position");
gegl_param_spec_set_property_key (pspec, "unit", "pixel-coordinate");
gegl_param_spec_set_property_key (pspec, "axis", "y");
- GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_VERTICAL_POSITION,
- "vertical-position",
+ GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_VERTICAL_AXIS_POSITION,
+ "vertical-axis-position",
_("Vertical axis position"),
NULL,
0.0, G_MAXDOUBLE, 0.0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
- pspec = g_object_class_find_property (object_class, "vertical-position");
+ pspec = g_object_class_find_property (object_class, "vertical-axis-position");
gegl_param_spec_set_property_key (pspec, "unit", "pixel-coordinate");
gegl_param_spec_set_property_key (pspec, "axis", "x");
}
@@ -255,11 +255,11 @@ gimp_mirror_set_property (GObject *object,
mirror->disable_transformation = g_value_get_boolean (value);
break;
- case PROP_HORIZONTAL_POSITION:
+ case PROP_HORIZONTAL_AXIS_POSITION:
if (g_value_get_double (value) > 0.0 &&
g_value_get_double (value) < (gdouble) gimp_image_get_height (image))
{
- mirror->horizontal_position = g_value_get_double (value);
+ mirror->horizontal_axis_position = g_value_get_double (value);
if (mirror->horizontal_guide)
{
@@ -267,7 +267,7 @@ gimp_mirror_set_property (GObject *object,
gimp_mirror_guide_position_cb,
mirror);
gimp_image_move_guide (image, mirror->horizontal_guide,
- mirror->horizontal_position,
+ mirror->horizontal_axis_position,
FALSE);
g_signal_handlers_unblock_by_func (mirror->horizontal_guide,
gimp_mirror_guide_position_cb,
@@ -276,11 +276,11 @@ gimp_mirror_set_property (GObject *object,
}
break;
- case PROP_VERTICAL_POSITION:
+ case PROP_VERTICAL_AXIS_POSITION:
if (g_value_get_double (value) > 0.0 &&
g_value_get_double (value) < (gdouble) gimp_image_get_width (image))
{
- mirror->vertical_position = g_value_get_double (value);
+ mirror->vertical_axis_position = g_value_get_double (value);
if (mirror->vertical_guide)
{
@@ -288,7 +288,7 @@ gimp_mirror_set_property (GObject *object,
gimp_mirror_guide_position_cb,
mirror);
gimp_image_move_guide (image, mirror->vertical_guide,
- mirror->vertical_position,
+ mirror->vertical_axis_position,
FALSE);
g_signal_handlers_unblock_by_func (mirror->vertical_guide,
gimp_mirror_guide_position_cb,
@@ -325,11 +325,11 @@ gimp_mirror_get_property (GObject *object,
case PROP_DISABLE_TRANSFORMATION:
g_value_set_boolean (value, mirror->disable_transformation);
break;
- case PROP_HORIZONTAL_POSITION:
- g_value_set_double (value, mirror->horizontal_position);
+ case PROP_HORIZONTAL_AXIS_POSITION:
+ g_value_set_double (value, mirror->horizontal_axis_position);
break;
- case PROP_VERTICAL_POSITION:
- g_value_set_double (value, mirror->vertical_position);
+ case PROP_VERTICAL_AXIS_POSITION:
+ g_value_set_double (value, mirror->vertical_axis_position);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -353,22 +353,22 @@ gimp_mirror_update_strokes (GimpSymmetry *sym,
if (mirror->horizontal_mirror)
{
coords = g_memdup (origin, sizeof (GimpCoords));
- coords->y = 2.0 * mirror->horizontal_position - origin->y;
+ coords->y = 2.0 * mirror->horizontal_axis_position - origin->y;
strokes = g_list_prepend (strokes, coords);
}
if (mirror->vertical_mirror)
{
coords = g_memdup (origin, sizeof (GimpCoords));
- coords->x = 2.0 * mirror->vertical_position - origin->x;
+ coords->x = 2.0 * mirror->vertical_axis_position - origin->x;
strokes = g_list_prepend (strokes, coords);
}
if (mirror->point_symmetry)
{
coords = g_memdup (origin, sizeof (GimpCoords));
- coords->x = 2.0 * mirror->vertical_position - origin->x;
- coords->y = 2.0 * mirror->horizontal_position - origin->y;
+ coords->x = 2.0 * mirror->vertical_axis_position - origin->x;
+ coords->y = 2.0 * mirror->horizontal_axis_position - origin->y;
strokes = g_list_prepend (strokes, coords);
}
@@ -484,13 +484,13 @@ gimp_mirror_add_guide (GimpMirror *mirror,
if (orientation == GIMP_ORIENTATION_HORIZONTAL)
{
/* Mirror guide position at first activation is at canvas middle. */
- if (mirror->horizontal_position < 1.0)
+ if (mirror->horizontal_axis_position < 1.0)
position = gimp_image_get_height (image) / 2.0;
else
- position = mirror->horizontal_position;
+ position = mirror->horizontal_axis_position;
g_object_set (mirror,
- "horizontal-position", position,
+ "horizontal-axis-position", position,
NULL);
mirror->horizontal_guide = guide;
@@ -498,13 +498,13 @@ gimp_mirror_add_guide (GimpMirror *mirror,
else
{
/* Mirror guide position at first activation is at canvas middle. */
- if (mirror->vertical_position < 1.0)
+ if (mirror->vertical_axis_position < 1.0)
position = gimp_image_get_width (image) / 2.0;
else
- position = mirror->vertical_position;
+ position = mirror->vertical_axis_position;
g_object_set (mirror,
- "vertical-position", position,
+ "vertical-axis-position", position,
NULL);
mirror->vertical_guide = guide;
@@ -570,7 +570,7 @@ gimp_mirror_guide_removed_cb (GObject *object,
mirror->horizontal_mirror = FALSE;
mirror->point_symmetry = FALSE;
g_object_set (mirror,
- "horizontal-position", 0.0,
+ "horizontal-axis-position", 0.0,
NULL);
if (mirror->vertical_guide &&
@@ -597,7 +597,7 @@ gimp_mirror_guide_removed_cb (GObject *object,
mirror->vertical_mirror = FALSE;
mirror->point_symmetry = FALSE;
g_object_set (mirror,
- "vertical-position", 0.0,
+ "vertical-axis-position", 0.0,
NULL);
if (mirror->horizontal_guide &&
@@ -641,13 +641,13 @@ gimp_mirror_guide_position_cb (GObject *object,
if (guide == mirror->horizontal_guide)
{
g_object_set (mirror,
- "horizontal-position", (gdouble) gimp_guide_get_position (guide),
+ "horizontal-axis-position", (gdouble) gimp_guide_get_position (guide),
NULL);
}
else if (guide == mirror->vertical_guide)
{
g_object_set (mirror,
- "vertical-position", (gdouble) gimp_guide_get_position (guide),
+ "vertical-axis-position", (gdouble) gimp_guide_get_position (guide),
NULL);
}
}
diff --git a/app/core/gimpsymmetry-mirror.h b/app/core/gimpsymmetry-mirror.h
index 0fe42fc..478e409 100644
--- a/app/core/gimpsymmetry-mirror.h
+++ b/app/core/gimpsymmetry-mirror.h
@@ -44,8 +44,8 @@ struct _GimpMirror
gboolean point_symmetry;
gboolean disable_transformation;
- gdouble horizontal_position;
- gdouble vertical_position;
+ gdouble horizontal_axis_position;
+ gdouble vertical_axis_position;
GimpGuide *horizontal_guide;
GimpGuide *vertical_guide;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]