app: use the new GIMP_CONFIG_PROP_FOO()

instead of manual g_object_class_install_property().
This commit is contained in:
Michael Natterer 2016-02-09 23:37:29 +01:00
parent 33bb4f0b9b
commit 18316c41a5
6 changed files with 102 additions and 113 deletions

View File

@ -124,23 +124,21 @@ gimp_mandala_class_init (GimpMandalaClass *klass)
0.0, 10000.0, 0.0,
GIMP_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_SIZE,
g_param_spec_int ("size",
_("Number of points"),
_("Number of points"),
1, 100, 6.0,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_INT (object_class, PROP_SIZE,
"size",
_("Number of points"),
_("Number of points"),
1, 100, 6.0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_DISABLE_TRANSFORMATION,
g_param_spec_boolean ("disable-transformation",
_("Disable brush transform"),
_("Disable brush transformation (faster)"),
FALSE,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DISABLE_TRANSFORMATION,
"disable-transformation",
_("Disable brush transform"),
_("Disable brush transformation (faster)"),
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
}
static void

View File

@ -117,41 +117,37 @@ gimp_mirror_class_init (GimpMirrorClass *klass)
symmetry_class->active_changed = gimp_mirror_active_changed;
/* Properties for user settings */
g_object_class_install_property (object_class, PROP_HORIZONTAL_SYMMETRY,
g_param_spec_boolean ("horizontal-symmetry",
_("Horizontal Mirror"),
NULL,
FALSE,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_HORIZONTAL_SYMMETRY,
"horizontal-symmetry",
_("Horizontal Mirror"),
NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_VERTICAL_SYMMETRY,
g_param_spec_boolean ("vertical-symmetry",
_("Vertical Mirror"),
NULL,
FALSE,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VERTICAL_SYMMETRY,
"vertical-symmetry",
_("Vertical Mirror"),
NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_POINT_SYMMETRY,
g_param_spec_boolean ("point-symmetry",
_("Central Symmetry"),
NULL,
FALSE,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_POINT_SYMMETRY,
"point-symmetry",
_("Central Symmetry"),
NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_DISABLE_TRANSFORMATION,
g_param_spec_boolean ("disable-transformation",
_("Disable brush transform"),
_("Disable brush transformation (faster)"),
FALSE,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DISABLE_TRANSFORMATION,
"disable-transformation",
_("Disable brush transform"),
_("Disable brush transformation (faster)"),
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
/* Properties for XCF serialization only */
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_HORIZONTAL_POSITION,

View File

@ -101,50 +101,45 @@ gimp_tiling_class_init (GimpTilingClass *klass)
symmetry_class->update_strokes = gimp_tiling_update_strokes;
symmetry_class->get_operation = gimp_tiling_get_operation;
g_object_class_install_property (object_class, PROP_X_INTERVAL,
g_param_spec_double ("x-interval",
_("Interval X"),
_("Interval on the X axis (pixels)"),
0.0, 10000.0, 0.0,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_X_INTERVAL,
"x-interval",
_("Interval X"),
_("Interval on the X axis (pixels)"),
0.0, 10000.0, 0.0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_Y_INTERVAL,
g_param_spec_double ("y-interval",
_("Interval Y"),
_("Interval on the Y axis (pixels)"),
0.0, 10000.0, 0.0,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_Y_INTERVAL,
"y-interval",
_("Interval Y"),
_("Interval on the Y axis (pixels)"),
0.0, 10000.0, 0.0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_SHIFT,
g_param_spec_double ("shift",
_("Shift"),
_("X-shift between lines (pixels)"),
0.0, 10000.0, 0.0,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SHIFT,
"shift",
_("Shift"),
_("X-shift between lines (pixels)"),
0.0, 10000.0, 0.0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_X_MAX,
g_param_spec_int ("x-max",
_("Max strokes X"),
_("Maximum number of strokes on the X axis"),
0, 100, 0,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_INT (object_class, PROP_X_MAX,
"x-max",
_("Max strokes X"),
_("Maximum number of strokes on the X axis"),
0, 100, 0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
g_object_class_install_property (object_class, PROP_Y_MAX,
g_param_spec_int ("y-max",
_("Max strokes Y"),
_("Maximum number of strokes on the Y axis"),
0, 100, 0,
GIMP_CONFIG_PARAM_FLAGS |
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI));
GIMP_CONFIG_PROP_INT (object_class, PROP_Y_MAX,
"y-max",
_("Max strokes Y"),
_("Maximum number of strokes on the Y axis"),
0, 100, 0,
GIMP_PARAM_STATIC_STRINGS |
GIMP_SYMMETRY_PARAM_GUI);
}
static void

View File

@ -85,13 +85,13 @@ gimp_operation_desaturate_class_init (GimpOperationDesaturateClass *klass)
"description", _("Turn colors into shades of gray"),
NULL);
g_object_class_install_property (object_class, PROP_MODE,
g_param_spec_enum ("mode",
_("Mode"),
_("Choose shade of gray based on"),
GIMP_TYPE_DESATURATE_MODE,
GIMP_DESATURATE_LIGHTNESS,
GIMP_CONFIG_PARAM_FLAGS));
GIMP_CONFIG_PROP_ENUM (object_class, PROP_MODE,
"mode",
_("Mode"),
_("Choose shade of gray based on"),
GIMP_TYPE_DESATURATE_MODE,
GIMP_DESATURATE_LIGHTNESS,
GIMP_PARAM_STATIC_STRINGS);
}
static void

View File

@ -82,12 +82,12 @@ gimp_operation_posterize_class_init (GimpOperationPosterizeClass *klass)
"description", _("Reduce to a limited set of colors"),
NULL);
g_object_class_install_property (object_class, PROP_LEVELS,
g_param_spec_int ("levels",
_("Posterize levels"),
NULL,
2, 256, 3,
GIMP_CONFIG_PARAM_FLAGS));
GIMP_CONFIG_PROP_INT (object_class, PROP_LEVELS,
"levels",
_("Posterize levels"),
NULL,
2, 256, 3,
GIMP_PARAM_STATIC_STRINGS);
}
static void

View File

@ -82,19 +82,19 @@ gimp_operation_threshold_class_init (GimpOperationThresholdClass *klass)
"description", "GIMP Threshold operation",
NULL);
g_object_class_install_property (object_class, PROP_LOW,
g_param_spec_double ("low",
_("Low threshold"),
NULL,
0.0, 1.0, 0.5,
GIMP_CONFIG_PARAM_FLAGS));
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LOW,
"low",
_("Low threshold"),
NULL,
0.0, 1.0, 0.5,
GIMP_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_HIGH,
g_param_spec_double ("high",
_("High threshold"),
NULL,
0.0, 1.0, 1.0,
GIMP_CONFIG_PARAM_FLAGS));
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HIGH,
"high",
_("High threshold"),
NULL,
0.0, 1.0, 1.0,
GIMP_PARAM_STATIC_STRINGS);
}
static void