Commit a256cf33 authored by Michael Natterer's avatar Michael Natterer 😴

app: add GimpCoreConfig::default-new-layer-mode

which for now has no UI and still defaults to NORMAL_LEGACY.
parent b89d10a8
......@@ -58,6 +58,7 @@ enum
PROP_LANGUAGE,
PROP_INTERPOLATION_TYPE,
PROP_DEFAULT_THRESHOLD,
PROP_DEFAULT_NEW_LAYER_MODE,
PROP_PLUG_IN_PATH,
PROP_MODULE_PATH,
PROP_INTERPRETER_PATH,
......@@ -181,6 +182,14 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
0, 255, 15,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_ENUM (object_class, PROP_DEFAULT_NEW_LAYER_MODE,
"default-new-layer-mode",
"Default new layer mode",
DEFAULT_NEW_LAYER_MODE_BLURB,
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_STATIC_STRINGS);
path = gimp_config_build_plug_in_path ("plug-ins");
GIMP_CONFIG_PROP_PATH (object_class, PROP_PLUG_IN_PATH,
"plug-in-path",
......@@ -753,6 +762,9 @@ gimp_core_config_set_property (GObject *object,
case PROP_DEFAULT_THRESHOLD:
core_config->default_threshold = g_value_get_int (value);
break;
case PROP_DEFAULT_NEW_LAYER_MODE:
core_config->default_new_layer_mode = g_value_get_enum (value);
break;
case PROP_PLUG_IN_PATH:
g_free (core_config->plug_in_path);
core_config->plug_in_path = g_value_dup_string (value);
......@@ -976,6 +988,9 @@ gimp_core_config_get_property (GObject *object,
case PROP_DEFAULT_THRESHOLD:
g_value_set_int (value, core_config->default_threshold);
break;
case PROP_DEFAULT_NEW_LAYER_MODE:
g_value_set_enum (value, core_config->default_new_layer_mode);
break;
case PROP_PLUG_IN_PATH:
g_value_set_string (value, core_config->plug_in_path);
break;
......
......@@ -43,6 +43,7 @@ struct _GimpCoreConfig
gchar *language;
GimpInterpolationType interpolation_type;
gint default_threshold;
GimpLayerMode default_new_layer_mode;
gchar *plug_in_path;
gchar *module_path;
gchar *interpreter_path;
......
......@@ -105,6 +105,9 @@ _("This is the distance in pixels where Guide and Grid snapping " \
#define SNAP_TO_PATH_BLURB \
"Snap to the active path by default in new image windows."
#define DEFAULT_NEW_LAYER_MODE_BLURB \
_("The default layer mode for newly created layers and images.")
#define DEFAULT_THRESHOLD_BLURB \
_("Tools such as fuzzy-select and bucket fill find regions based on a " \
"seed-fill algorithm. The seed fill starts at the initially selected " \
......
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