[gimp/multi-stroke: 13/28] app: guint is forbidden, unless unavoidable.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/multi-stroke: 13/28] app: guint is forbidden, unless unavoidable.
- Date: Wed, 20 May 2015 11:02:30 +0000 (UTC)
commit a6e4c0312676cdd9e9617eaf6c72cdc9775e18f6
Author: Jehan <jehan girinstud io>
Date: Sun Mar 22 01:07:36 2015 +0100
app: guint is forbidden, unless unavoidable.
app/core/gimpsymmetry-mirror.c | 8 ++++----
app/core/gimpsymmetry-tiling.c | 28 ++++++++++++++--------------
app/core/gimpsymmetry.c | 8 ++++----
app/core/gimpsymmetry.h | 8 ++++----
app/tools/gimppaintoptions-gui.c | 6 +++---
app/xcf/xcf-load.c | 6 +++---
app/xcf/xcf-save.c | 6 +++---
7 files changed, 35 insertions(+), 35 deletions(-)
---
diff --git a/app/core/gimpsymmetry-mirror.c b/app/core/gimpsymmetry-mirror.c
index ee72596..2a3b01a 100644
--- a/app/core/gimpsymmetry-mirror.c
+++ b/app/core/gimpsymmetry-mirror.c
@@ -81,9 +81,9 @@ static void gimp_mirror_guide_position_cb (GObject *object,
GParamSpec *pspec,
GimpMirror *mirror);
static GParamSpec ** gimp_mirror_get_settings (GimpSymmetry *sym,
- guint *n_settings);
+ gint *n_settings);
static GParamSpec ** gimp_mirror_get_xcf_settings (GimpSymmetry *sym,
- guint *n_settings);
+ gint *n_settings);
static void gimp_mirror_set_horizontal_symmetry (GimpMirror *mirror,
gboolean active);
static void gimp_mirror_set_vertical_symmetry (GimpMirror *mirror,
@@ -458,7 +458,7 @@ gimp_mirror_guide_position_cb (GObject *object,
static GParamSpec **
gimp_mirror_get_settings (GimpSymmetry *sym,
- guint *n_settings)
+ gint *n_settings)
{
GParamSpec **pspecs;
@@ -480,7 +480,7 @@ gimp_mirror_get_settings (GimpSymmetry *sym,
static GParamSpec **
gimp_mirror_get_xcf_settings (GimpSymmetry *sym,
- guint *n_settings)
+ gint *n_settings)
{
GParamSpec **pspecs;
diff --git a/app/core/gimpsymmetry-tiling.c b/app/core/gimpsymmetry-tiling.c
index e831062..bf7c89b 100644
--- a/app/core/gimpsymmetry-tiling.c
+++ b/app/core/gimpsymmetry-tiling.c
@@ -72,7 +72,7 @@ static GeglNode * gimp_tiling_get_operation (GimpSymmetry *tiling,
gint paint_width,
gint paint_height);
static GParamSpec ** gimp_tiling_get_settings (GimpSymmetry *sym,
- guint *n_settings);
+ gint *n_settings);
static void
gimp_tiling_image_size_changed_cb (GimpImage *image ,
gint previous_origin_x,
@@ -114,14 +114,14 @@ gimp_tiling_class_init (GimpTilingClass *klass)
"shift", _("X-shift between lines (pixels)"),
0.0, 10000.0, 0.0,
GIMP_PARAM_STATIC_STRINGS);
- GIMP_CONFIG_INSTALL_PROP_UINT (object_class, PROP_X_MAX,
- "x-max", _("Max strokes on x-axis"),
- 0, 100, 0,
- GIMP_PARAM_STATIC_STRINGS);
- GIMP_CONFIG_INSTALL_PROP_UINT (object_class, PROP_Y_MAX,
- "y-max", _("Max strokes on y-axis"),
- 0, 100, 0,
- GIMP_PARAM_STATIC_STRINGS);
+ GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_X_MAX,
+ "x-max", _("Max strokes on x-axis"),
+ 0, 100, 0,
+ GIMP_PARAM_STATIC_STRINGS);
+ GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_Y_MAX,
+ "y-max", _("Max strokes on y-axis"),
+ 0, 100, 0,
+ GIMP_PARAM_STATIC_STRINGS);
}
static void
@@ -234,12 +234,12 @@ gimp_tiling_set_property (GObject *object,
}
break;
case PROP_X_MAX:
- tiling->max_x = g_value_get_uint (value);
+ tiling->max_x = g_value_get_int (value);
if (sym->drawable)
gimp_tiling_update_strokes (sym, sym->drawable, sym->origin);
break;
case PROP_Y_MAX:
- tiling->max_y = g_value_get_uint (value);
+ tiling->max_y = g_value_get_int (value);
if (sym->drawable)
gimp_tiling_update_strokes (sym, sym->drawable, sym->origin);
break;
@@ -269,10 +269,10 @@ gimp_tiling_get_property (GObject *object,
g_value_set_double (value, tiling->shift);
break;
case PROP_X_MAX:
- g_value_set_uint (value, tiling->max_x);
+ g_value_set_int (value, tiling->max_x);
break;
case PROP_Y_MAX:
- g_value_set_uint (value, tiling->max_y);
+ g_value_set_int (value, tiling->max_y);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -350,7 +350,7 @@ gimp_tiling_get_operation (GimpSymmetry *sym,
static GParamSpec **
gimp_tiling_get_settings (GimpSymmetry *sym,
- guint *n_settings)
+ gint *n_settings)
{
GParamSpec **pspecs;
diff --git a/app/core/gimpsymmetry.c b/app/core/gimpsymmetry.c
index 6592acb..cc3a734 100644
--- a/app/core/gimpsymmetry.c
+++ b/app/core/gimpsymmetry.c
@@ -70,7 +70,7 @@ static GeglNode *
gint paint_height);
static GParamSpec **
gimp_symmetry_real_get_settings (GimpSymmetry *sym,
- guint *n_properties);
+ gint *n_properties);
G_DEFINE_TYPE (GimpSymmetry, gimp_symmetry, GIMP_TYPE_OBJECT)
@@ -211,7 +211,7 @@ gimp_symmetry_real_get_op (GimpSymmetry *sym,
static GParamSpec **
gimp_symmetry_real_get_settings (GimpSymmetry *sym,
- guint *n_properties)
+ gint *n_properties)
{
*n_properties = 0;
@@ -339,7 +339,7 @@ gimp_symmetry_get_operation (GimpSymmetry *sym,
**/
GParamSpec **
gimp_symmetry_get_settings (GimpSymmetry *sym,
- guint *n_properties)
+ gint *n_properties)
{
g_return_val_if_fail (GIMP_IS_SYMMETRY (sym), NULL);
@@ -361,7 +361,7 @@ gimp_symmetry_get_settings (GimpSymmetry *sym,
**/
GParamSpec **
gimp_symmetry_get_xcf_settings (GimpSymmetry *sym,
- guint *n_properties)
+ gint *n_properties)
{
g_return_val_if_fail (GIMP_IS_SYMMETRY (sym), NULL);
diff --git a/app/core/gimpsymmetry.h b/app/core/gimpsymmetry.h
index 6c9eee5..44f1d8c 100644
--- a/app/core/gimpsymmetry.h
+++ b/app/core/gimpsymmetry.h
@@ -63,10 +63,10 @@ struct _GimpSymmetryClass
gint paint_height);
GParamSpec **
(* get_settings) (GimpSymmetry *sym,
- guint *n_properties);
+ gint *n_properties);
GParamSpec **
(* get_xcf_settings) (GimpSymmetry *sym,
- guint *n_properties);
+ gint *n_properties);
};
@@ -85,8 +85,8 @@ GeglNode * gimp_symmetry_get_operation (GimpSymmetry *sym,
gint paint_width,
gint paint_height);
GParamSpec ** gimp_symmetry_get_settings (GimpSymmetry *sym,
- guint *n_properties);
+ gint *n_properties);
GParamSpec ** gimp_symmetry_get_xcf_settings (GimpSymmetry *sym,
- guint *n_properties);
+ gint *n_properties);
#endif /* __GIMP_SYMMETRY_H__ */
diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c
index 56bd43c..67aa3ef 100644
--- a/app/tools/gimppaintoptions-gui.c
+++ b/app/tools/gimppaintoptions-gui.c
@@ -686,7 +686,7 @@ gimp_paint_options_symmetry_ui (GimpSymmetry *sym,
GimpSymmetryClass *klass;
GtkWidget *vbox;
GParamSpec **specs;
- guint nproperties;
+ gint n_properties;
gint i;
/* Clean the old frame */
@@ -706,9 +706,9 @@ gimp_paint_options_symmetry_ui (GimpSymmetry *sym,
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
- specs = gimp_symmetry_get_settings (sym, &nproperties);
+ specs = gimp_symmetry_get_settings (sym, &n_properties);
- for (i = 0; i < (gint) nproperties; i++)
+ for (i = 0; i < n_properties; i++)
{
GParamSpec *spec;
const gchar *name;
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 5691422..046d9aa 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -736,7 +736,7 @@ xcf_load_image_props (XcfInfo *info,
GType type;
GParamSpec **settings;
GParamSpec *spec;
- guint nsettings;
+ gint n_settings;
gint i, j;
info->cp += xcf_read_int32 (info->input,
@@ -759,8 +759,8 @@ xcf_load_image_props (XcfInfo *info,
sym = gimp_image_symmetry_add (image, type);
settings = gimp_symmetry_get_xcf_settings (sym,
- &nsettings);
- for (j = 0; j < nsettings; j++)
+ &n_settings);
+ for (j = 0; j < n_settings; j++)
{
if (settings[j] == NULL)
continue;
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index e6b882d..48ee278 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -914,7 +914,7 @@ xcf_save_prop (XcfInfo *info,
GimpSymmetry *sym;
GParamSpec **settings;
GParamSpec *spec;
- guint nsettings;
+ gint n_settings;
guint32 base;
glong pos;
gint i = 0;
@@ -957,9 +957,9 @@ xcf_save_prop (XcfInfo *info,
xcf_write_string_check_error (info, (gchar **) &name, 1);
settings = gimp_symmetry_get_xcf_settings (sym,
- &nsettings);
+ &n_settings);
- for (i = 0; i < nsettings; i++)
+ for (i = 0; i < n_settings; i++)
{
if (settings[i] == NULL)
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]