2016-08-14 22:21:59 +02:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* GimpDialogConfig class
|
|
|
|
* Copyright (C) 2016 Michael Natterer <mitch@gimp.org>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-11 23:27:07 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2016-08-14 22:21:59 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2016-08-24 18:27:49 +02:00
|
|
|
#include <cairo.h>
|
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
|
|
#include <gegl.h>
|
2016-08-14 22:21:59 +02:00
|
|
|
|
|
|
|
#include "libgimpbase/gimpbase.h"
|
2016-08-24 18:27:49 +02:00
|
|
|
#include "libgimpcolor/gimpcolor.h"
|
2016-08-14 22:21:59 +02:00
|
|
|
#include "libgimpconfig/gimpconfig.h"
|
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
#include "core/core-types.h" /* fill and stroke options */
|
|
|
|
#include "core/gimp.h"
|
|
|
|
#include "core/gimpstrokeoptions.h"
|
|
|
|
|
2016-08-14 22:21:59 +02:00
|
|
|
#include "config-types.h"
|
|
|
|
|
|
|
|
#include "gimprc-blurbs.h"
|
|
|
|
#include "gimpdialogconfig.h"
|
|
|
|
|
|
|
|
#include "gimp-intl.h"
|
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
2016-09-14 01:27:42 +02:00
|
|
|
|
|
|
|
PROP_GIMP,
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
PROP_COLOR_PROFILE_POLICY,
|
app, libgimp, plug-ins: move Orientation metadata handling into core.
Orientation is now handled by core code, just next to profile conversion
handling.
One of the first consequence is that we don't need to have a non-GUI
version gimp_image_metadata_load_finish_batch() in libgimp, next to a
GUI version of the gimp_image_metadata_load_finish() function in
libgimpui. This makes for simpler API.
Also a plug-in which wishes to get access to the rotation dialog
provided by GIMP without loading ligimpui/GTK+ (for whatever reason)
will still have the feature.
The main advantage is that the "Don't ask me again" feature is now
handled by a settings in `Preferences > Image Import & Export` as the
"Metadata rotation policy". Until now it was saved as a global parasite,
which made it virtually non-editable once you checked it once (no easy
way to edit parasites except by scripts). So say you refused the
rotation once while checking "Don't ask again", and GIMP will forever
discard the rotation metadata without giving you a sane way to change
your mind. Of course, I could have passed the settings to plug-ins
through the PDB, but I find it a lot better to simply handle such
settings core-side.
The dialog code is basically the same as an app/dialogs/ as it was in
libgimp, with the minor improvement that it now takes the scale ratio
into account (basically the maximum thumbnail size will be bigger on
higher density displays).
Only downside of the move to the core is that this rotation dialog is
raised only when you open an image from the core, not as a PDB call. So
a plug-in which makes say a "file-jpeg-load" PDB call, even in
INTERACTIVE run mode, won't have rotation processed. Note that this was
already the same for embedded color profile conversion. This can be
wanted or not. Anyway some additional libgimp calls might be of interest
to explicitly call the core dialogs.
2020-09-23 19:59:09 +02:00
|
|
|
PROP_METADATA_ROTATION_POLICY,
|
2016-08-24 12:33:56 +02:00
|
|
|
|
2018-01-02 23:09:00 +01:00
|
|
|
PROP_COLOR_PROFILE_PATH,
|
|
|
|
|
2016-09-24 22:54:42 +02:00
|
|
|
PROP_IMAGE_CONVERT_PROFILE_INTENT,
|
|
|
|
PROP_IMAGE_CONVERT_PROFILE_BPC,
|
|
|
|
|
2016-09-26 17:38:26 +02:00
|
|
|
PROP_IMAGE_CONVERT_PRECISION_LAYER_DITHER_METHOD,
|
|
|
|
PROP_IMAGE_CONVERT_PRECISION_TEXT_LAYER_DITHER_METHOD,
|
|
|
|
PROP_IMAGE_CONVERT_PRECISION_CHANNEL_DITHER_METHOD,
|
|
|
|
|
2016-09-28 00:31:59 +02:00
|
|
|
PROP_IMAGE_CONVERT_INDEXED_PALETTE_TYPE,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_MAX_COLORS,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_REMOVE_DUPLICATES,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_DITHER_TYPE,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_DITHER_ALPHA,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_DITHER_TEXT_LAYERS,
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
PROP_IMAGE_RESIZE_FILL_TYPE,
|
|
|
|
PROP_IMAGE_RESIZE_LAYER_SET,
|
|
|
|
PROP_IMAGE_RESIZE_RESIZE_TEXT_LAYERS,
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
PROP_LAYER_NEW_NAME,
|
2016-10-21 22:54:10 +02:00
|
|
|
PROP_LAYER_NEW_MODE,
|
2017-02-12 23:49:26 +01:00
|
|
|
PROP_LAYER_NEW_BLEND_SPACE,
|
|
|
|
PROP_LAYER_NEW_COMPOSITE_SPACE,
|
2017-02-02 00:38:25 +01:00
|
|
|
PROP_LAYER_NEW_COMPOSITE_MODE,
|
2016-10-21 22:54:10 +02:00
|
|
|
PROP_LAYER_NEW_OPACITY,
|
2016-08-24 12:33:56 +02:00
|
|
|
PROP_LAYER_NEW_FILL_TYPE,
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
PROP_LAYER_RESIZE_FILL_TYPE,
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
PROP_LAYER_ADD_MASK_TYPE,
|
2016-08-24 18:27:49 +02:00
|
|
|
PROP_LAYER_ADD_MASK_INVERT,
|
|
|
|
|
2016-09-24 12:33:42 +02:00
|
|
|
PROP_LAYER_MERGE_TYPE,
|
|
|
|
PROP_LAYER_MERGE_ACTIVE_GROUP_ONLY,
|
|
|
|
PROP_LAYER_MERGE_DISCARD_INVISIBLE,
|
|
|
|
|
2016-08-24 18:27:49 +02:00
|
|
|
PROP_CHANNEL_NEW_NAME,
|
2016-08-24 19:49:59 +02:00
|
|
|
PROP_CHANNEL_NEW_COLOR,
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
PROP_VECTORS_NEW_NAME,
|
|
|
|
|
2016-09-26 00:16:47 +02:00
|
|
|
PROP_VECTORS_EXPORT_PATH,
|
|
|
|
PROP_VECTORS_EXPORT_ACTIVE_ONLY,
|
|
|
|
|
|
|
|
PROP_VECTORS_IMPORT_PATH,
|
|
|
|
PROP_VECTORS_IMPORT_MERGE,
|
|
|
|
PROP_VECTORS_IMPORT_SCALE,
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
PROP_SELECTION_FEATHER_RADIUS,
|
2019-06-16 16:51:30 +02:00
|
|
|
PROP_SELECTION_FEATHER_EDGE_LOCK,
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
PROP_SELECTION_GROW_RADIUS,
|
|
|
|
|
|
|
|
PROP_SELECTION_SHRINK_RADIUS,
|
|
|
|
PROP_SELECTION_SHRINK_EDGE_LOCK,
|
|
|
|
|
|
|
|
PROP_SELECTION_BORDER_RADIUS,
|
|
|
|
PROP_SELECTION_BORDER_STYLE,
|
2016-09-14 01:27:42 +02:00
|
|
|
PROP_SELECTION_BORDER_EDGE_LOCK,
|
|
|
|
|
|
|
|
PROP_FILL_OPTIONS,
|
|
|
|
PROP_STROKE_OPTIONS
|
2016-08-14 22:21:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
typedef struct _GimpDialogConfigPrivate GimpDialogConfigPrivate;
|
|
|
|
|
|
|
|
struct _GimpDialogConfigPrivate
|
|
|
|
{
|
|
|
|
Gimp *gimp;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define GET_PRIVATE(config) \
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
((GimpDialogConfigPrivate *) gimp_dialog_config_get_instance_private ((GimpDialogConfig *) (config)))
|
2016-09-14 01:27:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
static void gimp_dialog_config_constructed (GObject *object);
|
|
|
|
static void gimp_dialog_config_finalize (GObject *object);
|
|
|
|
static void gimp_dialog_config_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gimp_dialog_config_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
|
|
|
|
static void gimp_dialog_config_fill_options_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data);
|
|
|
|
static void gimp_dialog_config_stroke_options_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data);
|
2016-08-14 22:21:59 +02:00
|
|
|
|
|
|
|
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
G_DEFINE_TYPE_WITH_PRIVATE (GimpDialogConfig, gimp_dialog_config,
|
|
|
|
GIMP_TYPE_GUI_CONFIG)
|
2016-08-14 22:21:59 +02:00
|
|
|
|
|
|
|
#define parent_class gimp_dialog_config_parent_class
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
|
|
|
|
{
|
2016-08-24 18:27:49 +02:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
2023-11-20 00:20:03 +01:00
|
|
|
GeglColor *half_transparent = gegl_color_new ("black");
|
|
|
|
|
|
|
|
gimp_color_set_alpha (half_transparent, 0.5);
|
2016-08-14 22:21:59 +02:00
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
object_class->constructed = gimp_dialog_config_constructed;
|
2016-08-24 12:33:56 +02:00
|
|
|
object_class->finalize = gimp_dialog_config_finalize;
|
2016-08-14 22:21:59 +02:00
|
|
|
object_class->set_property = gimp_dialog_config_set_property;
|
|
|
|
object_class->get_property = gimp_dialog_config_get_property;
|
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
g_object_class_install_property (object_class, PROP_GIMP,
|
|
|
|
g_param_spec_object ("gimp",
|
|
|
|
NULL, NULL,
|
|
|
|
GIMP_TYPE_GIMP,
|
|
|
|
GIMP_PARAM_READWRITE |
|
|
|
|
G_PARAM_CONSTRUCT_ONLY));
|
|
|
|
|
2016-08-14 22:21:59 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_COLOR_PROFILE_POLICY,
|
|
|
|
"color-profile-policy",
|
|
|
|
"Color profile policy",
|
|
|
|
COLOR_PROFILE_POLICY_BLURB,
|
|
|
|
GIMP_TYPE_COLOR_PROFILE_POLICY,
|
|
|
|
GIMP_COLOR_PROFILE_POLICY_ASK,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2016-08-23 19:18:20 +02:00
|
|
|
|
app, libgimp, plug-ins: move Orientation metadata handling into core.
Orientation is now handled by core code, just next to profile conversion
handling.
One of the first consequence is that we don't need to have a non-GUI
version gimp_image_metadata_load_finish_batch() in libgimp, next to a
GUI version of the gimp_image_metadata_load_finish() function in
libgimpui. This makes for simpler API.
Also a plug-in which wishes to get access to the rotation dialog
provided by GIMP without loading ligimpui/GTK+ (for whatever reason)
will still have the feature.
The main advantage is that the "Don't ask me again" feature is now
handled by a settings in `Preferences > Image Import & Export` as the
"Metadata rotation policy". Until now it was saved as a global parasite,
which made it virtually non-editable once you checked it once (no easy
way to edit parasites except by scripts). So say you refused the
rotation once while checking "Don't ask again", and GIMP will forever
discard the rotation metadata without giving you a sane way to change
your mind. Of course, I could have passed the settings to plug-ins
through the PDB, but I find it a lot better to simply handle such
settings core-side.
The dialog code is basically the same as an app/dialogs/ as it was in
libgimp, with the minor improvement that it now takes the scale ratio
into account (basically the maximum thumbnail size will be bigger on
higher density displays).
Only downside of the move to the core is that this rotation dialog is
raised only when you open an image from the core, not as a PDB call. So
a plug-in which makes say a "file-jpeg-load" PDB call, even in
INTERACTIVE run mode, won't have rotation processed. Note that this was
already the same for embedded color profile conversion. This can be
wanted or not. Anyway some additional libgimp calls might be of interest
to explicitly call the core dialogs.
2020-09-23 19:59:09 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_METADATA_ROTATION_POLICY,
|
|
|
|
"metadata-rotation-policy",
|
|
|
|
"Metadata rotation policy",
|
|
|
|
METADATA_ROTATION_POLICY_BLURB,
|
|
|
|
GIMP_TYPE_METADATA_ROTATION_POLICY,
|
|
|
|
GIMP_METADATA_ROTATION_POLICY_ASK,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2018-01-02 23:09:00 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_COLOR_PROFILE_PATH,
|
|
|
|
"color-profile-path",
|
|
|
|
"Default color profile folder path",
|
|
|
|
COLOR_PROFILE_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_FILE,
|
|
|
|
NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-09-24 22:54:42 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_IMAGE_CONVERT_PROFILE_INTENT,
|
|
|
|
"image-convert-profile-intent",
|
2019-04-06 10:36:03 -04:00
|
|
|
"Default rendering intent for color profile conversion",
|
2016-09-24 22:54:42 +02:00
|
|
|
IMAGE_CONVERT_PROFILE_INTENT_BLURB,
|
|
|
|
GIMP_TYPE_COLOR_RENDERING_INTENT,
|
|
|
|
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_IMAGE_CONVERT_PROFILE_BPC,
|
|
|
|
"image-convert-profile-black-point-compensation",
|
|
|
|
"Default 'Black point compensation' for "
|
|
|
|
"color profile conversion",
|
|
|
|
IMAGE_CONVERT_PROFILE_BPC_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-09-26 17:38:26 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_PRECISION_LAYER_DITHER_METHOD,
|
|
|
|
"image-convert-precision-layer-dither-method",
|
|
|
|
"Default layer dither type for precision conversion",
|
|
|
|
IMAGE_CONVERT_PRECISION_LAYER_DITHER_METHOD_BLURB,
|
|
|
|
GEGL_TYPE_DITHER_METHOD,
|
|
|
|
GEGL_DITHER_NONE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_PRECISION_TEXT_LAYER_DITHER_METHOD,
|
|
|
|
"image-convert-precision-text-layer-dither-method",
|
|
|
|
"Default text layer dither type for precision conversion",
|
|
|
|
IMAGE_CONVERT_PRECISION_TEXT_LAYER_DITHER_METHOD_BLURB,
|
|
|
|
GEGL_TYPE_DITHER_METHOD,
|
|
|
|
GEGL_DITHER_NONE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_PRECISION_CHANNEL_DITHER_METHOD,
|
|
|
|
"image-convert-precision-channel-dither-method",
|
|
|
|
"Default channel dither type for precision conversion",
|
|
|
|
IMAGE_CONVERT_PRECISION_CHANNEL_DITHER_METHOD_BLURB,
|
|
|
|
GEGL_TYPE_DITHER_METHOD,
|
|
|
|
GEGL_DITHER_NONE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-09-28 00:31:59 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_PALETTE_TYPE,
|
|
|
|
"image-convert-indexed-palette-type",
|
|
|
|
"Default palette type for indexed conversion",
|
|
|
|
IMAGE_CONVERT_INDEXED_PALETTE_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_CONVERT_PALETTE_TYPE,
|
2017-02-26 20:55:00 +01:00
|
|
|
GIMP_CONVERT_PALETTE_GENERATE,
|
2016-09-28 00:31:59 +02:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_INT (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_MAX_COLORS,
|
|
|
|
"image-convert-indexed-max-colors",
|
|
|
|
"Default maximum number of colors for indexed conversion",
|
|
|
|
IMAGE_CONVERT_INDEXED_MAX_COLORS_BLURB,
|
|
|
|
2, 256, 256,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_REMOVE_DUPLICATES,
|
|
|
|
"image-convert-indexed-remove-duplicates",
|
|
|
|
"Default remove duplicates for indexed conversion",
|
|
|
|
IMAGE_CONVERT_INDEXED_REMOVE_DUPLICATES_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_DITHER_TYPE,
|
|
|
|
"image-convert-indexed-dither-type",
|
|
|
|
"Default dither type for indexed conversion",
|
|
|
|
IMAGE_CONVERT_INDEXED_DITHER_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_CONVERT_DITHER_TYPE,
|
2017-02-26 20:10:54 +01:00
|
|
|
GIMP_CONVERT_DITHER_NONE,
|
2016-09-28 00:31:59 +02:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_DITHER_ALPHA,
|
|
|
|
"image-convert-indexed-dither-alpha",
|
|
|
|
"Default dither alpha for indexed conversion",
|
|
|
|
IMAGE_CONVERT_INDEXED_DITHER_ALPHA_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class,
|
|
|
|
PROP_IMAGE_CONVERT_INDEXED_DITHER_TEXT_LAYERS,
|
|
|
|
"image-convert-indexed-dither-text-layers",
|
|
|
|
"Default dither text layers for indexed conversion",
|
|
|
|
IMAGE_CONVERT_INDEXED_DITHER_TEXT_LAYERS_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_IMAGE_RESIZE_FILL_TYPE,
|
|
|
|
"image-resize-fill-type",
|
|
|
|
"Default image resize fill type",
|
|
|
|
IMAGE_RESIZE_FILL_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_FILL_TYPE,
|
|
|
|
GIMP_FILL_TRANSPARENT,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_IMAGE_RESIZE_LAYER_SET,
|
|
|
|
"image-resize-layer-set",
|
|
|
|
"Default image resize layer set",
|
|
|
|
IMAGE_RESIZE_LAYER_SET_BLURB,
|
|
|
|
GIMP_TYPE_ITEM_SET,
|
|
|
|
GIMP_ITEM_SET_NONE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_IMAGE_RESIZE_RESIZE_TEXT_LAYERS,
|
|
|
|
"image-resize-resize-text-layers",
|
|
|
|
"Default image resize text layers",
|
|
|
|
IMAGE_RESIZE_RESIZE_TEXT_LAYERS_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_LAYER_NEW_NAME,
|
|
|
|
"layer-new-name",
|
|
|
|
"Default new layer name",
|
|
|
|
LAYER_NEW_NAME_BLURB,
|
|
|
|
_("Layer"),
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-10-21 22:54:10 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_NEW_MODE,
|
|
|
|
"layer-new-mode",
|
|
|
|
"Default new layer mode",
|
|
|
|
LAYER_NEW_MODE_BLURB,
|
2017-01-08 23:00:19 +01:00
|
|
|
GIMP_TYPE_LAYER_MODE,
|
2018-04-24 13:57:24 +02:00
|
|
|
GIMP_LAYER_MODE_NORMAL,
|
2016-10-21 22:54:10 +02:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2017-02-12 23:49:26 +01:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_NEW_BLEND_SPACE,
|
|
|
|
"layer-new-blend-space",
|
|
|
|
"Default new layer blend space",
|
|
|
|
LAYER_NEW_BLEND_SPACE_BLURB,
|
|
|
|
GIMP_TYPE_LAYER_COLOR_SPACE,
|
|
|
|
GIMP_LAYER_COLOR_SPACE_AUTO,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_NEW_COMPOSITE_SPACE,
|
|
|
|
"layer-new-composite-space",
|
|
|
|
"Default new layer composite space",
|
|
|
|
LAYER_NEW_COMPOSITE_SPACE_BLURB,
|
|
|
|
GIMP_TYPE_LAYER_COLOR_SPACE,
|
|
|
|
GIMP_LAYER_COLOR_SPACE_AUTO,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2017-02-02 00:38:25 +01:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_NEW_COMPOSITE_MODE,
|
|
|
|
"layer-new-composite-mode",
|
|
|
|
"Default new layer composite mode",
|
|
|
|
LAYER_NEW_COMPOSITE_MODE_BLURB,
|
|
|
|
GIMP_TYPE_LAYER_COMPOSITE_MODE,
|
|
|
|
GIMP_LAYER_COMPOSITE_AUTO,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-10-21 22:54:10 +02:00
|
|
|
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LAYER_NEW_OPACITY,
|
|
|
|
"layer-new-opacity",
|
|
|
|
"Default new layer opacity",
|
|
|
|
LAYER_NEW_OPACITY_BLURB,
|
|
|
|
GIMP_OPACITY_TRANSPARENT, GIMP_OPACITY_OPAQUE,
|
|
|
|
GIMP_OPACITY_OPAQUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_NEW_FILL_TYPE,
|
|
|
|
"layer-new-fill-type",
|
|
|
|
"Default new layer fill type",
|
|
|
|
LAYER_NEW_FILL_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_FILL_TYPE,
|
|
|
|
GIMP_FILL_TRANSPARENT,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_RESIZE_FILL_TYPE,
|
|
|
|
"layer-resize-fill-type",
|
|
|
|
"Default layer resize fill type",
|
|
|
|
LAYER_RESIZE_FILL_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_FILL_TYPE,
|
|
|
|
GIMP_FILL_TRANSPARENT,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_ADD_MASK_TYPE,
|
|
|
|
"layer-add-mask-type",
|
|
|
|
"Default layer mask type",
|
|
|
|
LAYER_ADD_MASK_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_ADD_MASK_TYPE,
|
|
|
|
GIMP_ADD_MASK_WHITE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_LAYER_ADD_MASK_INVERT,
|
|
|
|
"layer-add-mask-invert",
|
|
|
|
"Default layer mask invert",
|
|
|
|
LAYER_ADD_MASK_INVERT_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2016-08-24 18:27:49 +02:00
|
|
|
|
2016-09-24 12:33:42 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_MERGE_TYPE,
|
|
|
|
"layer-merge-type",
|
|
|
|
"Default layer merge type",
|
|
|
|
LAYER_MERGE_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_MERGE_TYPE,
|
|
|
|
GIMP_EXPAND_AS_NECESSARY,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_LAYER_MERGE_ACTIVE_GROUP_ONLY,
|
|
|
|
"layer-merge-active-group-only",
|
2020-05-07 14:30:21 +02:00
|
|
|
"Default layer merge active groups only",
|
2016-09-24 12:33:42 +02:00
|
|
|
LAYER_MERGE_ACTIVE_GROUP_ONLY_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_LAYER_MERGE_DISCARD_INVISIBLE,
|
|
|
|
"layer-merge-discard-invisible",
|
|
|
|
"Default layer merge discard invisible",
|
|
|
|
LAYER_MERGE_DISCARD_INVISIBLE_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-08-24 18:27:49 +02:00
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_CHANNEL_NEW_NAME,
|
|
|
|
"channel-new-name",
|
|
|
|
"Default new channel name",
|
|
|
|
CHANNEL_NEW_NAME_BLURB,
|
|
|
|
_("Channel"),
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2023-11-20 00:20:03 +01:00
|
|
|
GIMP_CONFIG_PROP_COLOR (object_class, PROP_CHANNEL_NEW_COLOR,
|
|
|
|
"channel-new-color",
|
|
|
|
"Default new channel color and opacity",
|
|
|
|
CHANNEL_NEW_COLOR_BLURB,
|
2024-04-19 23:02:29 +02:00
|
|
|
TRUE, half_transparent,
|
2023-11-20 00:20:03 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2016-08-24 19:49:59 +02:00
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_VECTORS_NEW_NAME,
|
|
|
|
"path-new-name",
|
|
|
|
"Default new path name",
|
|
|
|
VECTORS_NEW_NAME_BLURB,
|
|
|
|
_("Path"),
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2016-08-26 15:43:25 +02:00
|
|
|
|
2016-09-26 00:16:47 +02:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_VECTORS_EXPORT_PATH,
|
|
|
|
"path-export-path",
|
|
|
|
"Default path export folder path",
|
|
|
|
VECTORS_EXPORT_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_FILE,
|
|
|
|
NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_EXPORT_ACTIVE_ONLY,
|
|
|
|
"path-export-active-only",
|
2022-10-12 22:13:38 +02:00
|
|
|
"Default export only the selected paths",
|
2016-09-26 00:16:47 +02:00
|
|
|
VECTORS_EXPORT_ACTIVE_ONLY_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_VECTORS_IMPORT_PATH,
|
|
|
|
"path-import-path",
|
|
|
|
"Default path import folder path",
|
|
|
|
VECTORS_IMPORT_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_FILE,
|
|
|
|
NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_MERGE,
|
|
|
|
"path-import-merge",
|
|
|
|
"Default merge imported vectors",
|
|
|
|
VECTORS_IMPORT_MERGE_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_SCALE,
|
|
|
|
"path-import-scale",
|
|
|
|
"Default scale imported vectors",
|
|
|
|
VECTORS_IMPORT_SCALE_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SELECTION_FEATHER_RADIUS,
|
|
|
|
"selection-feather-radius",
|
|
|
|
"Selection feather radius",
|
|
|
|
SELECTION_FEATHER_RADIUS_BLURB,
|
|
|
|
0.0, 32767.0, 5.0,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2019-06-16 16:51:30 +02:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SELECTION_FEATHER_EDGE_LOCK,
|
|
|
|
"selection-feather-edge-lock",
|
|
|
|
"Selection feather edge lock",
|
|
|
|
SELECTION_FEATHER_EDGE_LOCK_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SELECTION_GROW_RADIUS,
|
|
|
|
"selection-grow-radius",
|
|
|
|
"Selection grow radius",
|
|
|
|
SELECTION_GROW_RADIUS_BLURB,
|
|
|
|
1.0, 32767.0, 1.0,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SELECTION_SHRINK_RADIUS,
|
|
|
|
"selection-shrink-radius",
|
|
|
|
"Selection shrink radius",
|
|
|
|
SELECTION_SHRINK_RADIUS_BLURB,
|
|
|
|
1.0, 32767.0, 1.0,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SELECTION_SHRINK_EDGE_LOCK,
|
|
|
|
"selection-shrink-edge-lock",
|
|
|
|
"Selection shrink edge lock",
|
|
|
|
SELECTION_SHRINK_EDGE_LOCK_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SELECTION_BORDER_RADIUS,
|
|
|
|
"selection-border-radius",
|
|
|
|
"Selection border radius",
|
|
|
|
SELECTION_BORDER_RADIUS_BLURB,
|
|
|
|
1.0, 32767.0, 5.0,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SELECTION_BORDER_EDGE_LOCK,
|
|
|
|
"selection-border-edge-lock",
|
|
|
|
"Selection border edge lock",
|
|
|
|
SELECTION_BORDER_EDGE_LOCK_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_SELECTION_BORDER_STYLE,
|
|
|
|
"selection-border-style",
|
|
|
|
"Selection border style",
|
|
|
|
SELECTION_BORDER_STYLE_BLURB,
|
|
|
|
GIMP_TYPE_CHANNEL_BORDER_STYLE,
|
|
|
|
GIMP_CHANNEL_BORDER_STYLE_SMOOTH,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2016-09-14 01:27:42 +02:00
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_FILL_OPTIONS,
|
|
|
|
"fill-options",
|
|
|
|
"Fill Options",
|
|
|
|
FILL_OPTIONS_BLURB,
|
|
|
|
GIMP_TYPE_FILL_OPTIONS,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_STROKE_OPTIONS,
|
|
|
|
"stroke-options",
|
|
|
|
"Stroke Options",
|
|
|
|
STROKE_OPTIONS_BLURB,
|
|
|
|
GIMP_TYPE_STROKE_OPTIONS,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
2023-11-20 00:20:03 +01:00
|
|
|
|
|
|
|
g_object_unref (half_transparent);
|
2016-08-14 22:21:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_dialog_config_init (GimpDialogConfig *config)
|
|
|
|
{
|
2023-11-20 00:20:03 +01:00
|
|
|
GeglColor *half_transparent = gegl_color_new ("black");
|
|
|
|
|
|
|
|
gimp_color_set_alpha (half_transparent, 0.5);
|
|
|
|
config->channel_new_color = half_transparent;
|
2016-08-14 22:21:59 +02:00
|
|
|
}
|
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
static void
|
|
|
|
gimp_dialog_config_constructed (GObject *object)
|
|
|
|
{
|
|
|
|
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (object);
|
|
|
|
GimpDialogConfigPrivate *priv = GET_PRIVATE (object);
|
|
|
|
GimpContext *context;
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (parent_class)->constructed (object);
|
|
|
|
|
2018-02-11 22:23:10 +01:00
|
|
|
gimp_assert (GIMP_IS_GIMP (priv->gimp));
|
2016-09-14 01:27:42 +02:00
|
|
|
|
|
|
|
context = gimp_get_user_context (priv->gimp);
|
|
|
|
|
|
|
|
config->fill_options = gimp_fill_options_new (priv->gimp, context, TRUE);
|
|
|
|
gimp_context_set_serialize_properties (GIMP_CONTEXT (config->fill_options),
|
|
|
|
0);
|
|
|
|
|
|
|
|
g_signal_connect (config->fill_options, "notify",
|
|
|
|
G_CALLBACK (gimp_dialog_config_fill_options_notify),
|
|
|
|
config);
|
|
|
|
|
|
|
|
config->stroke_options = gimp_stroke_options_new (priv->gimp, context, TRUE);
|
|
|
|
gimp_context_set_serialize_properties (GIMP_CONTEXT (config->stroke_options),
|
|
|
|
0);
|
|
|
|
|
|
|
|
g_signal_connect (config->stroke_options, "notify",
|
|
|
|
G_CALLBACK (gimp_dialog_config_stroke_options_notify),
|
|
|
|
config);
|
|
|
|
}
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
static void
|
|
|
|
gimp_dialog_config_finalize (GObject *object)
|
|
|
|
{
|
|
|
|
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (object);
|
|
|
|
|
2018-01-02 23:09:00 +01:00
|
|
|
g_clear_pointer (&config->color_profile_path, g_free);
|
|
|
|
g_clear_pointer (&config->layer_new_name, g_free);
|
|
|
|
g_clear_pointer (&config->channel_new_name, g_free);
|
|
|
|
g_clear_pointer (&config->vectors_new_name, g_free);
|
|
|
|
g_clear_pointer (&config->vectors_export_path, g_free);
|
|
|
|
g_clear_pointer (&config->vectors_import_path, g_free);
|
2017-07-15 18:38:01 +02:00
|
|
|
|
|
|
|
g_clear_object (&config->fill_options);
|
|
|
|
g_clear_object (&config->stroke_options);
|
2023-11-20 00:20:03 +01:00
|
|
|
g_clear_object (&config->channel_new_color);
|
2016-09-14 01:27:42 +02:00
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
2016-08-14 22:21:59 +02:00
|
|
|
static void
|
|
|
|
gimp_dialog_config_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2016-09-14 01:27:42 +02:00
|
|
|
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (object);
|
|
|
|
GimpDialogConfigPrivate *priv = GET_PRIVATE (object);
|
2016-08-14 22:21:59 +02:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2016-09-14 01:27:42 +02:00
|
|
|
case PROP_GIMP:
|
|
|
|
priv->gimp = g_value_get_object (value); /* don't ref */
|
|
|
|
break;
|
|
|
|
|
2016-08-14 22:21:59 +02:00
|
|
|
case PROP_COLOR_PROFILE_POLICY:
|
2016-08-23 19:18:20 +02:00
|
|
|
config->color_profile_policy = g_value_get_enum (value);
|
|
|
|
break;
|
app, libgimp, plug-ins: move Orientation metadata handling into core.
Orientation is now handled by core code, just next to profile conversion
handling.
One of the first consequence is that we don't need to have a non-GUI
version gimp_image_metadata_load_finish_batch() in libgimp, next to a
GUI version of the gimp_image_metadata_load_finish() function in
libgimpui. This makes for simpler API.
Also a plug-in which wishes to get access to the rotation dialog
provided by GIMP without loading ligimpui/GTK+ (for whatever reason)
will still have the feature.
The main advantage is that the "Don't ask me again" feature is now
handled by a settings in `Preferences > Image Import & Export` as the
"Metadata rotation policy". Until now it was saved as a global parasite,
which made it virtually non-editable once you checked it once (no easy
way to edit parasites except by scripts). So say you refused the
rotation once while checking "Don't ask again", and GIMP will forever
discard the rotation metadata without giving you a sane way to change
your mind. Of course, I could have passed the settings to plug-ins
through the PDB, but I find it a lot better to simply handle such
settings core-side.
The dialog code is basically the same as an app/dialogs/ as it was in
libgimp, with the minor improvement that it now takes the scale ratio
into account (basically the maximum thumbnail size will be bigger on
higher density displays).
Only downside of the move to the core is that this rotation dialog is
raised only when you open an image from the core, not as a PDB call. So
a plug-in which makes say a "file-jpeg-load" PDB call, even in
INTERACTIVE run mode, won't have rotation processed. Note that this was
already the same for embedded color profile conversion. This can be
wanted or not. Anyway some additional libgimp calls might be of interest
to explicitly call the core dialogs.
2020-09-23 19:59:09 +02:00
|
|
|
case PROP_METADATA_ROTATION_POLICY:
|
|
|
|
config->metadata_rotation_policy = g_value_get_enum (value);
|
|
|
|
break;
|
2016-08-23 19:18:20 +02:00
|
|
|
|
2018-01-02 23:09:00 +01:00
|
|
|
case PROP_COLOR_PROFILE_PATH:
|
|
|
|
if (config->color_profile_path)
|
|
|
|
g_free (config->color_profile_path);
|
|
|
|
config->color_profile_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
|
2016-09-24 22:54:42 +02:00
|
|
|
case PROP_IMAGE_CONVERT_PROFILE_INTENT:
|
|
|
|
config->image_convert_profile_intent = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_PROFILE_BPC:
|
|
|
|
config->image_convert_profile_bpc = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
|
2016-09-26 17:38:26 +02:00
|
|
|
case PROP_IMAGE_CONVERT_PRECISION_LAYER_DITHER_METHOD:
|
|
|
|
config->image_convert_precision_layer_dither_method =
|
|
|
|
g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_PRECISION_TEXT_LAYER_DITHER_METHOD:
|
|
|
|
config->image_convert_precision_text_layer_dither_method =
|
|
|
|
g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_PRECISION_CHANNEL_DITHER_METHOD:
|
|
|
|
config->image_convert_precision_channel_dither_method =
|
|
|
|
g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
|
2016-09-28 00:31:59 +02:00
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_PALETTE_TYPE:
|
|
|
|
config->image_convert_indexed_palette_type = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_MAX_COLORS:
|
|
|
|
config->image_convert_indexed_max_colors = g_value_get_int (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_REMOVE_DUPLICATES:
|
|
|
|
config->image_convert_indexed_remove_duplicates = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_DITHER_TYPE:
|
|
|
|
config->image_convert_indexed_dither_type = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_DITHER_ALPHA:
|
|
|
|
config->image_convert_indexed_dither_alpha = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_DITHER_TEXT_LAYERS:
|
|
|
|
config->image_convert_indexed_dither_text_layers = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
case PROP_IMAGE_RESIZE_FILL_TYPE:
|
|
|
|
config->image_resize_fill_type = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_RESIZE_LAYER_SET:
|
|
|
|
config->image_resize_layer_set = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_RESIZE_RESIZE_TEXT_LAYERS:
|
|
|
|
config->image_resize_resize_text_layers = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
case PROP_LAYER_NEW_NAME:
|
|
|
|
if (config->layer_new_name)
|
|
|
|
g_free (config->layer_new_name);
|
|
|
|
config->layer_new_name = g_value_dup_string (value);
|
|
|
|
break;
|
2016-10-21 22:54:10 +02:00
|
|
|
case PROP_LAYER_NEW_MODE:
|
|
|
|
config->layer_new_mode = g_value_get_enum (value);
|
|
|
|
break;
|
2017-02-12 23:49:26 +01:00
|
|
|
case PROP_LAYER_NEW_BLEND_SPACE:
|
|
|
|
config->layer_new_blend_space = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_NEW_COMPOSITE_SPACE:
|
|
|
|
config->layer_new_composite_space = g_value_get_enum (value);
|
|
|
|
break;
|
2017-02-02 00:38:25 +01:00
|
|
|
case PROP_LAYER_NEW_COMPOSITE_MODE:
|
|
|
|
config->layer_new_composite_mode = g_value_get_enum (value);
|
|
|
|
break;
|
2016-10-21 22:54:10 +02:00
|
|
|
case PROP_LAYER_NEW_OPACITY:
|
|
|
|
config->layer_new_opacity = g_value_get_double (value);
|
|
|
|
break;
|
2016-08-24 12:33:56 +02:00
|
|
|
case PROP_LAYER_NEW_FILL_TYPE:
|
|
|
|
config->layer_new_fill_type = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
case PROP_LAYER_RESIZE_FILL_TYPE:
|
|
|
|
config->layer_resize_fill_type = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
case PROP_LAYER_ADD_MASK_TYPE:
|
|
|
|
config->layer_add_mask_type = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_ADD_MASK_INVERT:
|
|
|
|
config->layer_add_mask_invert = g_value_get_boolean (value);
|
2016-08-14 22:21:59 +02:00
|
|
|
break;
|
|
|
|
|
2016-09-24 12:33:42 +02:00
|
|
|
case PROP_LAYER_MERGE_TYPE:
|
|
|
|
config->layer_merge_type = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_MERGE_ACTIVE_GROUP_ONLY:
|
|
|
|
config->layer_merge_active_group_only = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_MERGE_DISCARD_INVISIBLE:
|
|
|
|
config->layer_merge_discard_invisible = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
|
2016-08-24 18:27:49 +02:00
|
|
|
case PROP_CHANNEL_NEW_NAME:
|
|
|
|
if (config->channel_new_name)
|
|
|
|
g_free (config->channel_new_name);
|
|
|
|
config->channel_new_name = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_CHANNEL_NEW_COLOR:
|
2023-11-20 00:20:03 +01:00
|
|
|
g_clear_object (&config->channel_new_color);
|
|
|
|
config->channel_new_color = gegl_color_duplicate (g_value_get_object (value));
|
2016-08-24 18:27:49 +02:00
|
|
|
break;
|
|
|
|
|
2016-08-24 19:49:59 +02:00
|
|
|
case PROP_VECTORS_NEW_NAME:
|
|
|
|
if (config->vectors_new_name)
|
|
|
|
g_free (config->vectors_new_name);
|
|
|
|
config->vectors_new_name = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
|
2016-09-26 00:16:47 +02:00
|
|
|
case PROP_VECTORS_EXPORT_PATH:
|
|
|
|
if (config->vectors_export_path)
|
|
|
|
g_free (config->vectors_export_path);
|
|
|
|
config->vectors_export_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
|
|
|
|
config->vectors_export_active_only = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROP_VECTORS_IMPORT_PATH:
|
|
|
|
if (config->vectors_import_path)
|
|
|
|
g_free (config->vectors_import_path);
|
|
|
|
config->vectors_import_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_VECTORS_IMPORT_MERGE:
|
|
|
|
config->vectors_import_merge = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_VECTORS_IMPORT_SCALE:
|
|
|
|
config->vectors_import_scale = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
case PROP_SELECTION_FEATHER_RADIUS:
|
|
|
|
config->selection_feather_radius = g_value_get_double (value);
|
|
|
|
break;
|
2019-06-16 16:51:30 +02:00
|
|
|
case PROP_SELECTION_FEATHER_EDGE_LOCK:
|
|
|
|
config->selection_feather_edge_lock = g_value_get_boolean (value);
|
|
|
|
break;
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
case PROP_SELECTION_GROW_RADIUS:
|
|
|
|
config->selection_grow_radius = g_value_get_double (value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROP_SELECTION_SHRINK_RADIUS:
|
|
|
|
config->selection_shrink_radius = g_value_get_double (value);
|
|
|
|
break;
|
|
|
|
case PROP_SELECTION_SHRINK_EDGE_LOCK:
|
|
|
|
config->selection_shrink_edge_lock = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROP_SELECTION_BORDER_RADIUS:
|
|
|
|
config->selection_border_radius = g_value_get_double (value);
|
|
|
|
break;
|
|
|
|
case PROP_SELECTION_BORDER_EDGE_LOCK:
|
|
|
|
config->selection_border_edge_lock = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_SELECTION_BORDER_STYLE:
|
|
|
|
config->selection_border_style = g_value_get_enum (value);
|
|
|
|
break;
|
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
case PROP_FILL_OPTIONS:
|
|
|
|
if (g_value_get_object (value))
|
|
|
|
gimp_config_sync (g_value_get_object (value) ,
|
|
|
|
G_OBJECT (config->fill_options), 0);
|
|
|
|
break;
|
|
|
|
case PROP_STROKE_OPTIONS:
|
|
|
|
if (g_value_get_object (value))
|
|
|
|
gimp_config_sync (g_value_get_object (value) ,
|
|
|
|
G_OBJECT (config->stroke_options), 0);
|
|
|
|
break;
|
|
|
|
|
2016-08-14 22:21:59 +02:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_dialog_config_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2016-09-14 01:27:42 +02:00
|
|
|
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (object);
|
|
|
|
GimpDialogConfigPrivate *priv = GET_PRIVATE (object);
|
2016-08-14 22:21:59 +02:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2016-09-14 01:27:42 +02:00
|
|
|
case PROP_GIMP:
|
|
|
|
g_value_set_object (value, priv->gimp);
|
|
|
|
break;
|
|
|
|
|
2016-08-14 22:21:59 +02:00
|
|
|
case PROP_COLOR_PROFILE_POLICY:
|
2016-08-23 19:18:20 +02:00
|
|
|
g_value_set_enum (value, config->color_profile_policy);
|
|
|
|
break;
|
app, libgimp, plug-ins: move Orientation metadata handling into core.
Orientation is now handled by core code, just next to profile conversion
handling.
One of the first consequence is that we don't need to have a non-GUI
version gimp_image_metadata_load_finish_batch() in libgimp, next to a
GUI version of the gimp_image_metadata_load_finish() function in
libgimpui. This makes for simpler API.
Also a plug-in which wishes to get access to the rotation dialog
provided by GIMP without loading ligimpui/GTK+ (for whatever reason)
will still have the feature.
The main advantage is that the "Don't ask me again" feature is now
handled by a settings in `Preferences > Image Import & Export` as the
"Metadata rotation policy". Until now it was saved as a global parasite,
which made it virtually non-editable once you checked it once (no easy
way to edit parasites except by scripts). So say you refused the
rotation once while checking "Don't ask again", and GIMP will forever
discard the rotation metadata without giving you a sane way to change
your mind. Of course, I could have passed the settings to plug-ins
through the PDB, but I find it a lot better to simply handle such
settings core-side.
The dialog code is basically the same as an app/dialogs/ as it was in
libgimp, with the minor improvement that it now takes the scale ratio
into account (basically the maximum thumbnail size will be bigger on
higher density displays).
Only downside of the move to the core is that this rotation dialog is
raised only when you open an image from the core, not as a PDB call. So
a plug-in which makes say a "file-jpeg-load" PDB call, even in
INTERACTIVE run mode, won't have rotation processed. Note that this was
already the same for embedded color profile conversion. This can be
wanted or not. Anyway some additional libgimp calls might be of interest
to explicitly call the core dialogs.
2020-09-23 19:59:09 +02:00
|
|
|
case PROP_METADATA_ROTATION_POLICY:
|
|
|
|
g_value_set_enum (value, config->metadata_rotation_policy);
|
|
|
|
break;
|
2016-08-23 19:18:20 +02:00
|
|
|
|
2018-01-02 23:09:00 +01:00
|
|
|
case PROP_COLOR_PROFILE_PATH:
|
|
|
|
g_value_set_string (value, config->color_profile_path);
|
|
|
|
break;
|
|
|
|
|
2016-09-24 22:54:42 +02:00
|
|
|
case PROP_IMAGE_CONVERT_PROFILE_INTENT:
|
|
|
|
g_value_set_enum (value, config->image_convert_profile_intent);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_PROFILE_BPC:
|
|
|
|
g_value_set_boolean (value, config->image_convert_profile_bpc);
|
|
|
|
break;
|
|
|
|
|
2016-09-26 17:38:26 +02:00
|
|
|
case PROP_IMAGE_CONVERT_PRECISION_LAYER_DITHER_METHOD:
|
|
|
|
g_value_set_enum (value,
|
|
|
|
config->image_convert_precision_layer_dither_method);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_PRECISION_TEXT_LAYER_DITHER_METHOD:
|
|
|
|
g_value_set_enum (value,
|
|
|
|
config->image_convert_precision_text_layer_dither_method);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_PRECISION_CHANNEL_DITHER_METHOD:
|
|
|
|
g_value_set_enum (value,
|
|
|
|
config->image_convert_precision_channel_dither_method);
|
|
|
|
break;
|
|
|
|
|
2016-09-28 00:31:59 +02:00
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_PALETTE_TYPE:
|
|
|
|
g_value_set_enum (value, config->image_convert_indexed_palette_type);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_MAX_COLORS:
|
|
|
|
g_value_set_int (value, config->image_convert_indexed_max_colors);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_REMOVE_DUPLICATES:
|
|
|
|
g_value_set_boolean (value, config->image_convert_indexed_remove_duplicates);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_DITHER_TYPE:
|
|
|
|
g_value_set_enum (value, config->image_convert_indexed_dither_type);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_DITHER_ALPHA:
|
|
|
|
g_value_set_boolean (value, config->image_convert_indexed_dither_alpha);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_CONVERT_INDEXED_DITHER_TEXT_LAYERS:
|
|
|
|
g_value_set_boolean (value, config->image_convert_indexed_dither_text_layers);
|
|
|
|
break;
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
case PROP_IMAGE_RESIZE_FILL_TYPE:
|
|
|
|
g_value_set_enum (value, config->image_resize_fill_type);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_RESIZE_LAYER_SET:
|
|
|
|
g_value_set_enum (value, config->image_resize_layer_set);
|
|
|
|
break;
|
|
|
|
case PROP_IMAGE_RESIZE_RESIZE_TEXT_LAYERS:
|
|
|
|
g_value_set_boolean (value, config->image_resize_resize_text_layers);
|
|
|
|
break;
|
|
|
|
|
2016-08-24 12:33:56 +02:00
|
|
|
case PROP_LAYER_NEW_NAME:
|
|
|
|
g_value_set_string (value, config->layer_new_name);
|
|
|
|
break;
|
2016-10-21 22:54:10 +02:00
|
|
|
case PROP_LAYER_NEW_MODE:
|
|
|
|
g_value_set_enum (value, config->layer_new_mode);
|
|
|
|
break;
|
2017-02-12 23:49:26 +01:00
|
|
|
case PROP_LAYER_NEW_BLEND_SPACE:
|
|
|
|
g_value_set_enum (value, config->layer_new_blend_space);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_NEW_COMPOSITE_SPACE:
|
|
|
|
g_value_set_enum (value, config->layer_new_composite_space);
|
|
|
|
break;
|
2017-02-02 00:38:25 +01:00
|
|
|
case PROP_LAYER_NEW_COMPOSITE_MODE:
|
|
|
|
g_value_set_enum (value, config->layer_new_composite_mode);
|
|
|
|
break;
|
2016-10-21 22:54:10 +02:00
|
|
|
case PROP_LAYER_NEW_OPACITY:
|
|
|
|
g_value_set_double (value, config->layer_new_opacity);
|
|
|
|
break;
|
2016-08-24 12:33:56 +02:00
|
|
|
case PROP_LAYER_NEW_FILL_TYPE:
|
|
|
|
g_value_set_enum (value, config->layer_new_fill_type);
|
|
|
|
break;
|
|
|
|
|
2016-10-20 00:30:10 +02:00
|
|
|
case PROP_LAYER_RESIZE_FILL_TYPE:
|
|
|
|
g_value_set_enum (value, config->layer_resize_fill_type);
|
|
|
|
break;
|
|
|
|
|
2016-08-23 19:18:20 +02:00
|
|
|
case PROP_LAYER_ADD_MASK_TYPE:
|
|
|
|
g_value_set_enum (value, config->layer_add_mask_type);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_ADD_MASK_INVERT:
|
|
|
|
g_value_set_boolean (value, config->layer_add_mask_invert);
|
2016-08-14 22:21:59 +02:00
|
|
|
break;
|
|
|
|
|
2016-09-24 12:33:42 +02:00
|
|
|
case PROP_LAYER_MERGE_TYPE:
|
|
|
|
g_value_set_enum (value, config->layer_merge_type);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_MERGE_ACTIVE_GROUP_ONLY:
|
|
|
|
g_value_set_boolean (value, config->layer_merge_active_group_only);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_MERGE_DISCARD_INVISIBLE:
|
|
|
|
g_value_set_boolean (value, config->layer_merge_discard_invisible);
|
|
|
|
break;
|
|
|
|
|
2016-08-24 18:27:49 +02:00
|
|
|
case PROP_CHANNEL_NEW_NAME:
|
|
|
|
g_value_set_string (value, config->channel_new_name);
|
|
|
|
break;
|
|
|
|
case PROP_CHANNEL_NEW_COLOR:
|
2023-11-20 00:20:03 +01:00
|
|
|
g_value_set_object (value, config->channel_new_color);
|
2016-08-24 18:27:49 +02:00
|
|
|
break;
|
|
|
|
|
2016-08-24 19:49:59 +02:00
|
|
|
case PROP_VECTORS_NEW_NAME:
|
|
|
|
g_value_set_string (value, config->vectors_new_name);
|
|
|
|
break;
|
|
|
|
|
2016-09-26 00:16:47 +02:00
|
|
|
case PROP_VECTORS_EXPORT_PATH:
|
|
|
|
g_value_set_string (value, config->vectors_export_path);
|
|
|
|
break;
|
|
|
|
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
|
|
|
|
g_value_set_boolean (value, config->vectors_export_active_only);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROP_VECTORS_IMPORT_PATH:
|
|
|
|
g_value_set_string (value, config->vectors_import_path);
|
|
|
|
break;
|
|
|
|
case PROP_VECTORS_IMPORT_MERGE:
|
|
|
|
g_value_set_boolean (value, config->vectors_import_merge);
|
|
|
|
break;
|
|
|
|
case PROP_VECTORS_IMPORT_SCALE:
|
|
|
|
g_value_set_boolean (value, config->vectors_import_scale);
|
|
|
|
break;
|
|
|
|
|
2016-08-26 15:43:25 +02:00
|
|
|
case PROP_SELECTION_FEATHER_RADIUS:
|
|
|
|
g_value_set_double (value, config->selection_feather_radius);
|
|
|
|
break;
|
2019-06-16 16:51:30 +02:00
|
|
|
case PROP_SELECTION_FEATHER_EDGE_LOCK:
|
|
|
|
g_value_set_boolean (value, config->selection_feather_edge_lock);
|
|
|
|
break;
|
2016-08-26 15:43:25 +02:00
|
|
|
|
|
|
|
case PROP_SELECTION_GROW_RADIUS:
|
|
|
|
g_value_set_double (value, config->selection_grow_radius);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROP_SELECTION_SHRINK_RADIUS:
|
|
|
|
g_value_set_double (value, config->selection_shrink_radius);
|
|
|
|
break;
|
|
|
|
case PROP_SELECTION_SHRINK_EDGE_LOCK:
|
|
|
|
g_value_set_boolean (value, config->selection_shrink_edge_lock);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROP_SELECTION_BORDER_RADIUS:
|
|
|
|
g_value_set_double (value, config->selection_border_radius);
|
|
|
|
break;
|
|
|
|
case PROP_SELECTION_BORDER_EDGE_LOCK:
|
|
|
|
g_value_set_boolean (value, config->selection_border_edge_lock);
|
|
|
|
break;
|
|
|
|
case PROP_SELECTION_BORDER_STYLE:
|
|
|
|
g_value_set_enum (value, config->selection_border_style);
|
|
|
|
break;
|
|
|
|
|
2016-09-14 01:27:42 +02:00
|
|
|
case PROP_FILL_OPTIONS:
|
|
|
|
g_value_set_object (value, config->fill_options);
|
|
|
|
break;
|
|
|
|
case PROP_STROKE_OPTIONS:
|
|
|
|
g_value_set_object (value, config->stroke_options);
|
|
|
|
break;
|
|
|
|
|
2016-08-14 22:21:59 +02:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2016-09-14 01:27:42 +02:00
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_dialog_config_fill_options_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2016-12-06 19:24:11 +01:00
|
|
|
/* ignore notifications on parent class properties such as fg/bg */
|
|
|
|
if (pspec->owner_type == G_TYPE_FROM_INSTANCE (object))
|
|
|
|
g_object_notify (G_OBJECT (data), "fill-options");
|
2016-09-14 01:27:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_dialog_config_stroke_options_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2016-12-06 19:24:11 +01:00
|
|
|
/* see above */
|
|
|
|
if (pspec->owner_type == G_TYPE_FROM_INSTANCE (object))
|
|
|
|
g_object_notify (G_OBJECT (data), "stroke-options");
|
2016-09-14 01:27:42 +02:00
|
|
|
}
|