Commit 18316c41 authored by Michael Natterer's avatar Michael Natterer 😴

app: use the new GIMP_CONFIG_PROP_FOO()

instead of manual g_object_class_install_property().
parent 33bb4f0b
...@@ -124,23 +124,21 @@ gimp_mandala_class_init (GimpMandalaClass *klass) ...@@ -124,23 +124,21 @@ gimp_mandala_class_init (GimpMandalaClass *klass)
0.0, 10000.0, 0.0, 0.0, 10000.0, 0.0,
GIMP_PARAM_STATIC_STRINGS); GIMP_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_SIZE, GIMP_CONFIG_PROP_INT (object_class, PROP_SIZE,
g_param_spec_int ("size", "size",
_("Number of points"), _("Number of points"),
_("Number of points"), _("Number of points"),
1, 100, 6.0, 1, 100, 6.0,
GIMP_CONFIG_PARAM_FLAGS | GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI);
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DISABLE_TRANSFORMATION,
g_object_class_install_property (object_class, PROP_DISABLE_TRANSFORMATION, "disable-transformation",
g_param_spec_boolean ("disable-transformation", _("Disable brush transform"),
_("Disable brush transform"), _("Disable brush transformation (faster)"),
_("Disable brush transformation (faster)"), FALSE,
FALSE, GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_FLAGS | GIMP_SYMMETRY_PARAM_GUI);
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
} }
static void static void
......
...@@ -117,41 +117,37 @@ gimp_mirror_class_init (GimpMirrorClass *klass) ...@@ -117,41 +117,37 @@ gimp_mirror_class_init (GimpMirrorClass *klass)
symmetry_class->active_changed = gimp_mirror_active_changed; symmetry_class->active_changed = gimp_mirror_active_changed;
/* Properties for user settings */ /* Properties for user settings */
g_object_class_install_property (object_class, PROP_HORIZONTAL_SYMMETRY, GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_HORIZONTAL_SYMMETRY,
g_param_spec_boolean ("horizontal-symmetry", "horizontal-symmetry",
_("Horizontal Mirror"), _("Horizontal Mirror"),
NULL, NULL,
FALSE, FALSE,
GIMP_CONFIG_PARAM_FLAGS | GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI);
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VERTICAL_SYMMETRY,
g_object_class_install_property (object_class, PROP_VERTICAL_SYMMETRY, "vertical-symmetry",
g_param_spec_boolean ("vertical-symmetry", _("Vertical Mirror"),
_("Vertical Mirror"), NULL,
NULL, FALSE,
FALSE, GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_FLAGS | GIMP_SYMMETRY_PARAM_GUI);
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI)); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_POINT_SYMMETRY,
"point-symmetry",
g_object_class_install_property (object_class, PROP_POINT_SYMMETRY, _("Central Symmetry"),
g_param_spec_boolean ("point-symmetry", NULL,
_("Central Symmetry"), FALSE,
NULL, GIMP_PARAM_STATIC_STRINGS |
FALSE, GIMP_SYMMETRY_PARAM_GUI);
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DISABLE_TRANSFORMATION,
GIMP_SYMMETRY_PARAM_GUI)); "disable-transformation",
_("Disable brush transform"),
g_object_class_install_property (object_class, PROP_DISABLE_TRANSFORMATION, _("Disable brush transformation (faster)"),
g_param_spec_boolean ("disable-transformation", FALSE,
_("Disable brush transform"), GIMP_PARAM_STATIC_STRINGS |
_("Disable brush transformation (faster)"), GIMP_SYMMETRY_PARAM_GUI);
FALSE,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
/* Properties for XCF serialization only */ /* Properties for XCF serialization only */
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_HORIZONTAL_POSITION, GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_HORIZONTAL_POSITION,
......
...@@ -101,50 +101,45 @@ gimp_tiling_class_init (GimpTilingClass *klass) ...@@ -101,50 +101,45 @@ gimp_tiling_class_init (GimpTilingClass *klass)
symmetry_class->update_strokes = gimp_tiling_update_strokes; symmetry_class->update_strokes = gimp_tiling_update_strokes;
symmetry_class->get_operation = gimp_tiling_get_operation; symmetry_class->get_operation = gimp_tiling_get_operation;
g_object_class_install_property (object_class, PROP_X_INTERVAL, GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_X_INTERVAL,
g_param_spec_double ("x-interval", "x-interval",
_("Interval X"), _("Interval X"),
_("Interval on the X axis (pixels)"), _("Interval on the X axis (pixels)"),
0.0, 10000.0, 0.0, 0.0, 10000.0, 0.0,
GIMP_CONFIG_PARAM_FLAGS | GIMP_PARAM_STATIC_STRINGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI);
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_Y_INTERVAL,
g_object_class_install_property (object_class, PROP_Y_INTERVAL, "y-interval",
g_param_spec_double ("y-interval", _("Interval Y"),
_("Interval Y"), _("Interval on the Y axis (pixels)"),
_("Interval on the Y axis (pixels)"), 0.0, 10000.0, 0.0,
0.0, 10000.0, 0.0, GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_FLAGS | GIMP_SYMMETRY_PARAM_GUI);
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI)); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SHIFT,
"shift",
g_object_class_install_property (object_class, PROP_SHIFT, _("Shift"),
g_param_spec_double ("shift", _("X-shift between lines (pixels)"),
_("Shift"), 0.0, 10000.0, 0.0,
_("X-shift between lines (pixels)"), GIMP_PARAM_STATIC_STRINGS |
0.0, 10000.0, 0.0, GIMP_SYMMETRY_PARAM_GUI);
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PROP_INT (object_class, PROP_X_MAX,
GIMP_SYMMETRY_PARAM_GUI)); "x-max",
_("Max strokes X"),
g_object_class_install_property (object_class, PROP_X_MAX, _("Maximum number of strokes on the X axis"),
g_param_spec_int ("x-max", 0, 100, 0,
_("Max strokes X"), GIMP_PARAM_STATIC_STRINGS |
_("Maximum number of strokes on the X axis"), GIMP_SYMMETRY_PARAM_GUI);
0, 100, 0,
GIMP_CONFIG_PARAM_FLAGS | GIMP_CONFIG_PROP_INT (object_class, PROP_Y_MAX,
GIMP_PARAM_STATIC_STRINGS | "y-max",
GIMP_SYMMETRY_PARAM_GUI)); _("Max strokes Y"),
_("Maximum number of strokes on the Y axis"),
g_object_class_install_property (object_class, PROP_Y_MAX, 0, 100, 0,
g_param_spec_int ("y-max", GIMP_PARAM_STATIC_STRINGS |
_("Max strokes Y"), GIMP_SYMMETRY_PARAM_GUI);
_("Maximum number of strokes on the Y axis"),
0, 100, 0,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
} }
static void static void
......
...@@ -85,13 +85,13 @@ gimp_operation_desaturate_class_init (GimpOperationDesaturateClass *klass) ...@@ -85,13 +85,13 @@ gimp_operation_desaturate_class_init (GimpOperationDesaturateClass *klass)
"description", _("Turn colors into shades of gray"), "description", _("Turn colors into shades of gray"),
NULL); NULL);
g_object_class_install_property (object_class, PROP_MODE, GIMP_CONFIG_PROP_ENUM (object_class, PROP_MODE,
g_param_spec_enum ("mode", "mode",
_("Mode"), _("Mode"),
_("Choose shade of gray based on"), _("Choose shade of gray based on"),
GIMP_TYPE_DESATURATE_MODE, GIMP_TYPE_DESATURATE_MODE,
GIMP_DESATURATE_LIGHTNESS, GIMP_DESATURATE_LIGHTNESS,
GIMP_CONFIG_PARAM_FLAGS)); GIMP_PARAM_STATIC_STRINGS);
} }
static void static void
......
...@@ -82,12 +82,12 @@ gimp_operation_posterize_class_init (GimpOperationPosterizeClass *klass) ...@@ -82,12 +82,12 @@ gimp_operation_posterize_class_init (GimpOperationPosterizeClass *klass)
"description", _("Reduce to a limited set of colors"), "description", _("Reduce to a limited set of colors"),
NULL); NULL);
g_object_class_install_property (object_class, PROP_LEVELS, GIMP_CONFIG_PROP_INT (object_class, PROP_LEVELS,
g_param_spec_int ("levels", "levels",
_("Posterize levels"), _("Posterize levels"),
NULL, NULL,
2, 256, 3, 2, 256, 3,
GIMP_CONFIG_PARAM_FLAGS)); GIMP_PARAM_STATIC_STRINGS);
} }
static void static void
......
...@@ -82,19 +82,19 @@ gimp_operation_threshold_class_init (GimpOperationThresholdClass *klass) ...@@ -82,19 +82,19 @@ gimp_operation_threshold_class_init (GimpOperationThresholdClass *klass)
"description", "GIMP Threshold operation", "description", "GIMP Threshold operation",
NULL); NULL);
g_object_class_install_property (object_class, PROP_LOW, GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LOW,
g_param_spec_double ("low", "low",
_("Low threshold"), _("Low threshold"),
NULL, NULL,
0.0, 1.0, 0.5, 0.0, 1.0, 0.5,
GIMP_CONFIG_PARAM_FLAGS)); GIMP_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_HIGH, GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HIGH,
g_param_spec_double ("high", "high",
_("High threshold"), _("High threshold"),
NULL, NULL,
0.0, 1.0, 1.0, 0.0, 1.0, 1.0,
GIMP_CONFIG_PARAM_FLAGS)); GIMP_PARAM_STATIC_STRINGS);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment