[gimp] app: add show-guides property to GimpToolTransformGrid
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add show-guides property to GimpToolTransformGrid
- Date: Sat, 27 Jan 2018 12:31:44 +0000 (UTC)
commit 6a64f096818f14a22d5f881864b699a1a85dcb8e
Author: Ell <ell_se yahoo com>
Date: Sat Jan 27 07:15:05 2018 -0500
app: add show-guides property to GimpToolTransformGrid
... which can be used to control the guides' visibility.
Will be used by the next commit, to hide the guides in
GimpToolHandleGrid when the tranformation is invalid.
app/display/gimptooltransformgrid.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimptooltransformgrid.c b/app/display/gimptooltransformgrid.c
index d1f6d3b..15f250e 100644
--- a/app/display/gimptooltransformgrid.c
+++ b/app/display/gimptooltransformgrid.c
@@ -59,6 +59,7 @@ enum
PROP_PIVOT_Y,
PROP_GUIDE_TYPE,
PROP_N_GUIDES,
+ PROP_SHOW_GUIDES,
PROP_INSIDE_FUNCTION,
PROP_OUTSIDE_FUNCTION,
PROP_USE_CORNER_HANDLES,
@@ -89,6 +90,7 @@ struct _GimpToolTransformGridPrivate
gdouble pivot_y;
GimpGuidesType guide_type;
gint n_guides;
+ gboolean show_guides;
GimpTransformFunction inside_function;
GimpTransformFunction outside_function;
gboolean use_corner_handles;
@@ -290,6 +292,12 @@ gimp_tool_transform_grid_class_init (GimpToolTransformGridClass *klass)
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
+ g_object_class_install_property (object_class, PROP_SHOW_GUIDES,
+ g_param_spec_boolean ("show-guides", NULL, NULL,
+ TRUE,
+ GIMP_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT));
+
g_object_class_install_property (object_class, PROP_INSIDE_FUNCTION,
g_param_spec_enum ("inside-function",
NULL, NULL,
@@ -578,6 +586,9 @@ gimp_tool_transform_grid_set_property (GObject *object,
case PROP_N_GUIDES:
private->n_guides = g_value_get_int (value);
break;
+ case PROP_SHOW_GUIDES:
+ private->show_guides = g_value_get_boolean (value);
+ break;
case PROP_INSIDE_FUNCTION:
private->inside_function = g_value_get_enum (value);
@@ -691,6 +702,9 @@ gimp_tool_transform_grid_get_property (GObject *object,
case PROP_N_GUIDES:
g_value_set_int (value, private->n_guides);
break;
+ case PROP_SHOW_GUIDES:
+ g_value_set_boolean (value, private->show_guides);
+ break;
case PROP_INSIDE_FUNCTION:
g_value_set_enum (value, private->inside_function);
@@ -1020,6 +1034,7 @@ gimp_tool_transform_grid_changed (GimpToolWidget *widget)
private->y2,
private->guide_type,
private->n_guides);
+ gimp_canvas_item_set_visible (private->guides, private->show_guides);
get_handle_geometry (grid, o, angle);
gimp_tool_transform_grid_calc_handles (grid, &handle_w, &handle_h);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]