2006-12-09 21:33:38 +00:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2001-12-10 20:43:51 +00:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* GimpCoreConfig class
|
|
|
|
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
|
|
|
|
*
|
2009-01-17 22:28:01 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2001-12-10 20:43:51 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 22:28:01 +00:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2001-12-10 20:43:51 +00:00
|
|
|
* (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/>.
|
2001-12-10 20:43:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2012-02-27 19:24:09 +02:00
|
|
|
#include <cairo.h>
|
2012-05-03 03:36:22 +02:00
|
|
|
#include <gegl.h>
|
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2001-12-10 20:43:51 +00:00
|
|
|
|
2001-12-16 16:33:18 +00:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2012-02-27 19:24:09 +02:00
|
|
|
#include "libgimpcolor/gimpcolor.h"
|
2005-01-25 19:11:26 +00:00
|
|
|
#include "libgimpconfig/gimpconfig.h"
|
2001-12-16 16:33:18 +00:00
|
|
|
|
2002-11-18 20:50:31 +00:00
|
|
|
#include "config-types.h"
|
|
|
|
|
2003-10-10 14:11:47 +00:00
|
|
|
#include "core/core-types.h"
|
2012-05-13 20:19:40 +02:00
|
|
|
#include "core/gimp-utils.h"
|
2003-10-10 14:11:47 +00:00
|
|
|
#include "core/gimpgrid.h"
|
2003-10-14 15:20:59 +00:00
|
|
|
#include "core/gimptemplate.h"
|
2003-10-10 14:11:47 +00:00
|
|
|
|
2002-12-20 14:36:08 +00:00
|
|
|
#include "gimprc-blurbs.h"
|
2001-12-10 20:43:51 +00:00
|
|
|
#include "gimpcoreconfig.h"
|
|
|
|
|
2003-03-25 16:38:19 +00:00
|
|
|
#include "gimp-intl.h"
|
2003-01-25 20:29:42 +00:00
|
|
|
|
2001-12-10 20:43:51 +00:00
|
|
|
|
2019-04-28 15:27:53 +09:00
|
|
|
#define GIMP_DEFAULT_BRUSH "2. Hardness 050"
|
2020-12-14 02:05:22 +01:00
|
|
|
#define GIMP_DEFAULT_DYNAMICS "Pressure Size"
|
2019-04-28 15:27:53 +09:00
|
|
|
#define GIMP_DEFAULT_PATTERN "Pine"
|
|
|
|
#define GIMP_DEFAULT_PALETTE "Default"
|
|
|
|
#define GIMP_DEFAULT_GRADIENT "FG to BG (RGB)"
|
|
|
|
#define GIMP_DEFAULT_TOOL_PRESET "Current Options"
|
|
|
|
#define GIMP_DEFAULT_FONT "Sans-serif"
|
|
|
|
#define GIMP_DEFAULT_MYPAINT_BRUSH "Fixme"
|
|
|
|
#define GIMP_DEFAULT_COMMENT "Created with GIMP"
|
2003-01-23 00:40:34 +00:00
|
|
|
|
2005-12-10 19:24:36 +00:00
|
|
|
|
2001-12-10 20:43:51 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
2009-12-30 00:38:31 +01:00
|
|
|
PROP_LANGUAGE,
|
2022-07-06 19:33:00 +02:00
|
|
|
PROP_PREV_LANGUAGE,
|
2022-02-22 12:13:46 +01:00
|
|
|
PROP_CONFIG_VERSION,
|
2002-02-12 02:31:45 +00:00
|
|
|
PROP_INTERPOLATION_TYPE,
|
2011-02-04 15:19:44 +01:00
|
|
|
PROP_DEFAULT_THRESHOLD,
|
2001-12-10 20:43:51 +00:00
|
|
|
PROP_PLUG_IN_PATH,
|
|
|
|
PROP_MODULE_PATH,
|
2005-02-21 02:56:29 +00:00
|
|
|
PROP_INTERPRETER_PATH,
|
2002-11-12 03:34:11 +00:00
|
|
|
PROP_ENVIRON_PATH,
|
2001-12-10 20:43:51 +00:00
|
|
|
PROP_BRUSH_PATH,
|
2004-01-28 21:53:50 +00:00
|
|
|
PROP_BRUSH_PATH_WRITABLE,
|
2009-10-11 01:30:54 +02:00
|
|
|
PROP_DYNAMICS_PATH,
|
|
|
|
PROP_DYNAMICS_PATH_WRITABLE,
|
2015-12-20 23:20:06 +01:00
|
|
|
PROP_MYPAINT_BRUSH_PATH,
|
|
|
|
PROP_MYPAINT_BRUSH_PATH_WRITABLE,
|
2001-12-10 20:43:51 +00:00
|
|
|
PROP_PATTERN_PATH,
|
2004-01-28 21:53:50 +00:00
|
|
|
PROP_PATTERN_PATH_WRITABLE,
|
2001-12-10 20:43:51 +00:00
|
|
|
PROP_PALETTE_PATH,
|
2004-01-28 21:53:50 +00:00
|
|
|
PROP_PALETTE_PATH_WRITABLE,
|
2001-12-11 15:58:07 +00:00
|
|
|
PROP_GRADIENT_PATH,
|
2004-01-28 21:53:50 +00:00
|
|
|
PROP_GRADIENT_PATH_WRITABLE,
|
2010-04-03 18:25:31 +03:00
|
|
|
PROP_TOOL_PRESET_PATH,
|
|
|
|
PROP_TOOL_PRESET_PATH_WRITABLE,
|
2003-09-01 18:20:56 +00:00
|
|
|
PROP_FONT_PATH,
|
2004-01-28 21:53:50 +00:00
|
|
|
PROP_FONT_PATH_WRITABLE,
|
2001-12-11 15:58:07 +00:00
|
|
|
PROP_DEFAULT_BRUSH,
|
2009-10-11 01:30:54 +02:00
|
|
|
PROP_DEFAULT_DYNAMICS,
|
2015-12-20 23:20:06 +01:00
|
|
|
PROP_DEFAULT_MYPAINT_BRUSH,
|
2001-12-11 15:58:07 +00:00
|
|
|
PROP_DEFAULT_PATTERN,
|
|
|
|
PROP_DEFAULT_PALETTE,
|
|
|
|
PROP_DEFAULT_GRADIENT,
|
2010-04-03 18:25:31 +03:00
|
|
|
PROP_DEFAULT_TOOL_PRESET,
|
2003-03-25 22:06:03 +00:00
|
|
|
PROP_DEFAULT_FONT,
|
2004-03-04 14:04:22 +00:00
|
|
|
PROP_GLOBAL_BRUSH,
|
2009-10-11 01:30:54 +02:00
|
|
|
PROP_GLOBAL_DYNAMICS,
|
2004-03-04 14:04:22 +00:00
|
|
|
PROP_GLOBAL_PATTERN,
|
|
|
|
PROP_GLOBAL_PALETTE,
|
|
|
|
PROP_GLOBAL_GRADIENT,
|
|
|
|
PROP_GLOBAL_FONT,
|
2023-08-18 08:51:46 +05:30
|
|
|
PROP_GLOBAL_EXPAND,
|
2003-10-14 15:20:59 +00:00
|
|
|
PROP_DEFAULT_IMAGE,
|
|
|
|
PROP_DEFAULT_GRID,
|
2001-12-16 16:33:18 +00:00
|
|
|
PROP_UNDO_LEVELS,
|
2003-02-12 17:11:34 +00:00
|
|
|
PROP_UNDO_SIZE,
|
2004-03-07 15:33:04 +00:00
|
|
|
PROP_UNDO_PREVIEW_SIZE,
|
2015-12-30 11:53:52 +01:00
|
|
|
PROP_FILTER_HISTORY_SIZE,
|
2001-12-16 16:33:18 +00:00
|
|
|
PROP_PLUGINRC_PATH,
|
2003-03-06 16:47:34 +00:00
|
|
|
PROP_LAYER_PREVIEWS,
|
2018-07-01 13:15:21 -04:00
|
|
|
PROP_GROUP_LAYER_PREVIEWS,
|
2003-03-06 16:47:34 +00:00
|
|
|
PROP_LAYER_PREVIEW_SIZE,
|
2002-04-29 19:41:45 +00:00
|
|
|
PROP_THUMBNAIL_SIZE,
|
2004-10-08 19:29:33 +00:00
|
|
|
PROP_THUMBNAIL_FILESIZE_LIMIT,
|
2005-10-31 20:57:03 +00:00
|
|
|
PROP_COLOR_MANAGEMENT,
|
2008-01-04 17:28:49 +00:00
|
|
|
PROP_SAVE_DOCUMENT_HISTORY,
|
2012-02-27 19:24:09 +02:00
|
|
|
PROP_QUICK_MASK_COLOR,
|
2017-01-22 22:03:55 +01:00
|
|
|
PROP_IMPORT_PROMOTE_FLOAT,
|
|
|
|
PROP_IMPORT_PROMOTE_DITHER,
|
2017-02-17 22:07:43 +01:00
|
|
|
PROP_IMPORT_ADD_ALPHA,
|
2017-05-04 20:35:53 +02:00
|
|
|
PROP_IMPORT_RAW_PLUG_IN,
|
2018-12-05 21:59:19 +03:00
|
|
|
PROP_EXPORT_FILE_TYPE,
|
2023-11-14 14:48:21 +00:00
|
|
|
PROP_EXPORT_FILE_TYPE_ALWAYS,
|
2018-06-18 02:19:41 +02:00
|
|
|
PROP_EXPORT_COLOR_PROFILE,
|
2019-10-10 00:45:41 +02:00
|
|
|
PROP_EXPORT_COMMENT,
|
2021-08-25 15:00:45 -04:00
|
|
|
PROP_EXPORT_THUMBNAIL,
|
2018-01-11 01:53:35 +01:00
|
|
|
PROP_EXPORT_METADATA_EXIF,
|
|
|
|
PROP_EXPORT_METADATA_XMP,
|
|
|
|
PROP_EXPORT_METADATA_IPTC,
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
PROP_DEBUG_POLICY,
|
2019-12-08 19:08:49 +01:00
|
|
|
PROP_CHECK_UPDATES,
|
|
|
|
PROP_CHECK_UPDATE_TIMESTAMP,
|
2020-01-02 23:09:23 +01:00
|
|
|
PROP_LAST_RELEASE_TIMESTAMP,
|
2020-03-30 15:37:34 +02:00
|
|
|
PROP_LAST_RELEASE_COMMENT,
|
2020-02-06 21:47:00 +01:00
|
|
|
PROP_LAST_REVISION,
|
2019-12-08 19:08:49 +01:00
|
|
|
PROP_LAST_KNOWN_RELEASE,
|
2021-06-29 16:11:03 +02:00
|
|
|
#ifdef G_OS_WIN32
|
|
|
|
PROP_WIN32_POINTER_INPUT_API,
|
|
|
|
#endif
|
2021-10-05 01:56:51 +02:00
|
|
|
PROP_ITEMS_SELECT_METHOD,
|
2010-10-19 10:13:01 +02:00
|
|
|
|
|
|
|
/* ignored, only for backward compatibility: */
|
|
|
|
PROP_INSTALL_COLORMAP,
|
|
|
|
PROP_MIN_COLORS
|
2001-12-10 20:43:51 +00:00
|
|
|
};
|
|
|
|
|
2002-02-08 12:35:38 +00:00
|
|
|
|
2005-12-10 19:24:36 +00:00
|
|
|
static void gimp_core_config_finalize (GObject *object);
|
|
|
|
static void gimp_core_config_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gimp_core_config_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
static void gimp_core_config_default_image_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data);
|
|
|
|
static void gimp_core_config_default_grid_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data);
|
|
|
|
static void gimp_core_config_color_management_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
|
2012-05-14 22:57:58 +02:00
|
|
|
G_DEFINE_TYPE (GimpCoreConfig, gimp_core_config, GIMP_TYPE_GEGL_CONFIG)
|
2005-12-10 19:24:36 +00:00
|
|
|
|
|
|
|
#define parent_class gimp_core_config_parent_class
|
2001-12-10 20:43:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_core_config_class_init (GimpCoreConfigClass *klass)
|
|
|
|
{
|
2005-12-10 19:24:36 +00:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
2005-04-07 17:10:05 +00:00
|
|
|
gchar *path;
|
2018-03-29 22:22:51 +02:00
|
|
|
gchar *mypaint_brushes;
|
2023-11-20 00:20:03 +01:00
|
|
|
GeglColor *red = gegl_color_new ("red");
|
2012-05-13 20:19:40 +02:00
|
|
|
guint64 undo_size;
|
2001-12-10 20:43:51 +00:00
|
|
|
|
2023-11-20 00:20:03 +01:00
|
|
|
gimp_color_set_alpha (red, 0.5);
|
|
|
|
|
2002-02-08 12:35:38 +00:00
|
|
|
object_class->finalize = gimp_core_config_finalize;
|
2001-12-10 20:43:51 +00:00
|
|
|
object_class->set_property = gimp_core_config_set_property;
|
|
|
|
object_class->get_property = gimp_core_config_get_property;
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_LANGUAGE,
|
|
|
|
"language",
|
|
|
|
"Language",
|
|
|
|
LANGUAGE_BLURB,
|
|
|
|
NULL, /* take from environment */
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
|
|
|
|
2022-07-06 19:33:00 +02:00
|
|
|
/* The language which was being used previously. If the "language"
|
|
|
|
* property was at default (i.e. System language), this
|
|
|
|
* must map to the actually used language for UI display, because if
|
|
|
|
* this changed (for whatever reasons, e.g. changed environment
|
|
|
|
* variables, or actually changing system language), we want to reload
|
|
|
|
* plug-ins.
|
|
|
|
*/
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_PREV_LANGUAGE,
|
|
|
|
"prev-language",
|
|
|
|
"Language used in previous run",
|
|
|
|
NULL, NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2022-02-22 12:13:46 +01:00
|
|
|
/* This is the version of the config files, which must map to the
|
|
|
|
* version of GIMP. It is used right now only to detect the last run
|
|
|
|
* version in order to detect an update. It could be used later also
|
|
|
|
* to have more fine-grained config updates (not just on minor
|
|
|
|
* versions as we do now, but also on changes in micro versions).
|
|
|
|
*/
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_CONFIG_VERSION,
|
|
|
|
"config-version",
|
|
|
|
"Version of GIMP config files",
|
|
|
|
CONFIG_VERSION_BLURB,
|
|
|
|
NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_INTERPOLATION_TYPE,
|
|
|
|
"interpolation-type",
|
|
|
|
"Interpolation",
|
|
|
|
INTERPOLATION_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_INTERPOLATION_TYPE,
|
|
|
|
GIMP_INTERPOLATION_CUBIC,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_INT (object_class, PROP_DEFAULT_THRESHOLD,
|
|
|
|
"default-threshold",
|
|
|
|
"Default threshold",
|
|
|
|
DEFAULT_THRESHOLD_BLURB,
|
|
|
|
0, 255, 15,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_plug_in_path ("plug-ins");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_PLUG_IN_PATH,
|
|
|
|
"plug-in-path",
|
2017-03-21 17:45:50 +01:00
|
|
|
"Plug-in path",
|
2016-04-17 00:11:06 +01:00
|
|
|
PLUG_IN_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_plug_in_path ("modules");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_MODULE_PATH,
|
|
|
|
"module-path",
|
|
|
|
"Module path",
|
|
|
|
MODULE_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_plug_in_path ("interpreters");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_INTERPRETER_PATH,
|
|
|
|
"interpreter-path",
|
|
|
|
"Interpreter path",
|
|
|
|
INTERPRETER_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_plug_in_path ("environ");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_ENVIRON_PATH,
|
|
|
|
"environ-path",
|
|
|
|
"Environment path",
|
|
|
|
ENVIRON_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_data_path ("brushes");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_BRUSH_PATH,
|
|
|
|
"brush-path",
|
|
|
|
"Brush path",
|
|
|
|
BRUSH_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_writable_path ("brushes");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_BRUSH_PATH_WRITABLE,
|
|
|
|
"brush-path-writable",
|
|
|
|
"Writable brush path",
|
|
|
|
BRUSH_PATH_WRITABLE_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2009-10-11 01:30:54 +02:00
|
|
|
path = gimp_config_build_data_path ("dynamics");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_DYNAMICS_PATH,
|
|
|
|
"dynamics-path",
|
|
|
|
"Dynamics path",
|
|
|
|
DYNAMICS_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2016-04-17 00:11:06 +01:00
|
|
|
g_free (path);
|
|
|
|
|
|
|
|
path = gimp_config_build_writable_path ("dynamics");
|
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_DYNAMICS_PATH_WRITABLE,
|
|
|
|
"dynamics-path-writable",
|
|
|
|
"Writable dynamics path",
|
|
|
|
DYNAMICS_PATH_WRITABLE_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2009-10-11 01:30:54 +02:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2018-06-26 23:19:25 +02:00
|
|
|
#ifdef ENABLE_RELOCATABLE_RESOURCES
|
2018-03-29 22:22:51 +02:00
|
|
|
mypaint_brushes = g_build_filename ("${gimp_installation_dir}",
|
|
|
|
"share", "mypaint-data",
|
|
|
|
"1.0", "brushes", NULL);
|
|
|
|
#else
|
|
|
|
mypaint_brushes = g_strdup (MYPAINT_BRUSHES_DIR);
|
|
|
|
#endif
|
|
|
|
|
2015-12-20 23:20:06 +01:00
|
|
|
path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
|
|
|
|
"~/.mypaint/brushes",
|
2020-04-29 14:31:15 +02:00
|
|
|
mypaint_brushes,
|
2015-12-20 23:20:06 +01:00
|
|
|
NULL);
|
2018-03-29 22:22:51 +02:00
|
|
|
g_free (mypaint_brushes);
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH,
|
|
|
|
"mypaint-brush-path",
|
|
|
|
"MyPaint brush path",
|
|
|
|
MYPAINT_BRUSH_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2015-12-20 23:20:06 +01:00
|
|
|
g_free (path);
|
|
|
|
|
|
|
|
path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
|
|
|
|
"~/.mypaint/brushes",
|
|
|
|
NULL);
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH_WRITABLE,
|
|
|
|
"mypaint-brush-path-writable",
|
|
|
|
"Writable MyPaint brush path",
|
|
|
|
MYPAINT_BRUSH_PATH_WRITABLE_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2015-12-20 23:20:06 +01:00
|
|
|
g_free (path);
|
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_data_path ("patterns");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_PATTERN_PATH,
|
|
|
|
"pattern-path",
|
|
|
|
"Pattern path",
|
|
|
|
PATTERN_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_writable_path ("patterns");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_PATTERN_PATH_WRITABLE,
|
|
|
|
"pattern-path-writable",
|
|
|
|
"Writable pattern path",
|
|
|
|
PATTERN_PATH_WRITABLE_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_data_path ("palettes");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_PALETTE_PATH,
|
|
|
|
"palette-path",
|
|
|
|
"Palette path",
|
|
|
|
PALETTE_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_writable_path ("palettes");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_PALETTE_PATH_WRITABLE,
|
|
|
|
"palette-path-writable",
|
|
|
|
"Writable palette path",
|
|
|
|
PALETTE_PATH_WRITABLE_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_data_path ("gradients");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_GRADIENT_PATH,
|
|
|
|
"gradient-path",
|
|
|
|
"Gradient path",
|
|
|
|
GRADIENT_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2005-04-07 17:10:05 +00:00
|
|
|
path = gimp_config_build_writable_path ("gradients");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_GRADIENT_PATH_WRITABLE,
|
|
|
|
"gradient-path-writable",
|
|
|
|
"Writable gradient path",
|
|
|
|
GRADIENT_PATH_WRITABLE_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-07 17:10:05 +00:00
|
|
|
g_free (path);
|
2010-04-03 18:25:31 +03:00
|
|
|
|
|
|
|
path = gimp_config_build_data_path ("tool-presets");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH,
|
|
|
|
"tool-preset-path",
|
|
|
|
"Tool preset path",
|
|
|
|
TOOL_PRESET_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2010-04-03 18:25:31 +03:00
|
|
|
g_free (path);
|
2010-04-04 13:58:55 +02:00
|
|
|
|
2010-04-03 18:25:31 +03:00
|
|
|
path = gimp_config_build_writable_path ("tool-presets");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH_WRITABLE,
|
|
|
|
"tool-preset-path-writable",
|
|
|
|
"Writable tool preset path",
|
|
|
|
TOOL_PRESET_PATH_WRITABLE_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2018-06-02 21:52:35 +02:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2010-04-03 18:25:31 +03:00
|
|
|
g_free (path);
|
|
|
|
|
2010-04-04 13:58:55 +02:00
|
|
|
path = gimp_config_build_data_path ("fonts");
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_FONT_PATH,
|
|
|
|
"font-path",
|
|
|
|
"Font path",
|
|
|
|
FONT_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2010-04-04 13:58:55 +02:00
|
|
|
g_free (path);
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_FONT_PATH_WRITABLE,
|
|
|
|
"font-path-writable",
|
|
|
|
"Writable font path",
|
|
|
|
NULL,
|
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_BRUSH,
|
|
|
|
"default-brush",
|
|
|
|
"Default brush",
|
|
|
|
DEFAULT_BRUSH_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_BRUSH,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_DYNAMICS,
|
|
|
|
"default-dynamics",
|
|
|
|
"Default dynamics",
|
|
|
|
DEFAULT_DYNAMICS_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_DYNAMICS,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_MYPAINT_BRUSH,
|
|
|
|
"default-mypaint-brush",
|
|
|
|
"Default MyPaint brush",
|
|
|
|
DEFAULT_MYPAINT_BRUSH_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_MYPAINT_BRUSH,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_PATTERN,
|
|
|
|
"default-pattern",
|
|
|
|
"Default pattern",
|
|
|
|
DEFAULT_PATTERN_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_PATTERN,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_PALETTE,
|
|
|
|
"default-palette",
|
|
|
|
"Default palette",
|
|
|
|
DEFAULT_PALETTE_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_PALETTE,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_GRADIENT,
|
|
|
|
"default-gradient",
|
|
|
|
"Default gradient",
|
|
|
|
DEFAULT_GRADIENT_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_GRADIENT,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_TOOL_PRESET,
|
|
|
|
"default-tool-preset",
|
|
|
|
"Default tool preset",
|
|
|
|
DEFAULT_TOOL_PRESET_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_TOOL_PRESET,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_DEFAULT_FONT,
|
|
|
|
"default-font",
|
|
|
|
"Default font",
|
|
|
|
DEFAULT_FONT_BLURB,
|
2019-04-28 15:27:53 +09:00
|
|
|
GIMP_DEFAULT_FONT,
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_BRUSH,
|
|
|
|
"global-brush",
|
|
|
|
"Global brush",
|
|
|
|
GLOBAL_BRUSH_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_DYNAMICS,
|
|
|
|
"global-dynamics",
|
|
|
|
"Global dynamics",
|
|
|
|
GLOBAL_DYNAMICS_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_PATTERN,
|
|
|
|
"global-pattern",
|
|
|
|
"Global pattern",
|
|
|
|
GLOBAL_PATTERN_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_PALETTE,
|
|
|
|
"global-palette",
|
|
|
|
"Global palette",
|
|
|
|
GLOBAL_PALETTE_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_GRADIENT,
|
|
|
|
"global-gradient",
|
|
|
|
"Global gradient",
|
|
|
|
GLOBAL_GRADIENT_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_FONT,
|
|
|
|
"global-font",
|
|
|
|
"Global font",
|
|
|
|
GLOBAL_FONT_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2023-08-18 08:51:46 +05:30
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GLOBAL_EXPAND,
|
|
|
|
"global-expand",
|
|
|
|
"Global expand",
|
|
|
|
GLOBAL_EXPAND_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_DEFAULT_IMAGE,
|
|
|
|
"default-image",
|
|
|
|
"Default image",
|
|
|
|
DEFAULT_IMAGE_BLURB,
|
|
|
|
GIMP_TYPE_TEMPLATE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_DEFAULT_GRID,
|
|
|
|
"default-grid",
|
|
|
|
"Default grid",
|
|
|
|
DEFAULT_GRID_BLURB,
|
|
|
|
GIMP_TYPE_GRID,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_INT (object_class, PROP_UNDO_LEVELS,
|
|
|
|
"undo-levels",
|
|
|
|
"Undo levels",
|
|
|
|
UNDO_LEVELS_BLURB,
|
|
|
|
0, 1 << 20, 5,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2012-05-13 20:19:40 +02:00
|
|
|
|
|
|
|
undo_size = gimp_get_physical_memory_size ();
|
|
|
|
|
|
|
|
if (undo_size > 0)
|
|
|
|
undo_size = undo_size / 8; /* 1/8th of the memory */
|
|
|
|
else
|
|
|
|
undo_size = 1 << 26; /* 64GB */
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_MEMSIZE (object_class, PROP_UNDO_SIZE,
|
|
|
|
"undo-size",
|
|
|
|
"Undo size",
|
|
|
|
UNDO_SIZE_BLURB,
|
|
|
|
0, GIMP_MAX_MEMSIZE, undo_size,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_UNDO_PREVIEW_SIZE,
|
|
|
|
"undo-preview-size",
|
|
|
|
"Undo preview size",
|
|
|
|
UNDO_PREVIEW_SIZE_BLURB,
|
|
|
|
GIMP_TYPE_VIEW_SIZE,
|
|
|
|
GIMP_VIEW_SIZE_LARGE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_INT (object_class, PROP_FILTER_HISTORY_SIZE,
|
|
|
|
"plug-in-history-size", /* compat name */
|
|
|
|
"Filter history size",
|
|
|
|
FILTER_HISTORY_SIZE_BLURB,
|
|
|
|
0, 256, 10,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_PATH (object_class,
|
|
|
|
PROP_PLUGINRC_PATH,
|
|
|
|
"pluginrc-path",
|
|
|
|
"plugninrc path",
|
|
|
|
PLUGINRC_PATH_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_FILE,
|
|
|
|
"${gimp_dir}" G_DIR_SEPARATOR_S "pluginrc",
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_LAYER_PREVIEWS,
|
|
|
|
"layer-previews",
|
|
|
|
"Layer previews",
|
|
|
|
LAYER_PREVIEWS_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2018-07-01 13:15:21 -04:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GROUP_LAYER_PREVIEWS,
|
|
|
|
"group-layer-previews",
|
|
|
|
"Layer group previews",
|
|
|
|
GROUP_LAYER_PREVIEWS_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_PREVIEW_SIZE,
|
|
|
|
"layer-preview-size",
|
|
|
|
"Layer preview size",
|
|
|
|
LAYER_PREVIEW_SIZE_BLURB,
|
|
|
|
GIMP_TYPE_VIEW_SIZE,
|
|
|
|
GIMP_VIEW_SIZE_MEDIUM,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_THUMBNAIL_SIZE,
|
|
|
|
"thumbnail-size",
|
|
|
|
"Thumbnail size",
|
|
|
|
THUMBNAIL_SIZE_BLURB,
|
|
|
|
GIMP_TYPE_THUMBNAIL_SIZE,
|
|
|
|
GIMP_THUMBNAIL_SIZE_NORMAL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_MEMSIZE (object_class, PROP_THUMBNAIL_FILESIZE_LIMIT,
|
|
|
|
"thumbnail-filesize-limit",
|
2017-01-22 22:03:55 +01:00
|
|
|
"Thumbnail file size limit",
|
2016-04-17 00:11:06 +01:00
|
|
|
THUMBNAIL_FILESIZE_LIMIT_BLURB,
|
|
|
|
0, GIMP_MAX_MEMSIZE, 1 << 22,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_COLOR_MANAGEMENT,
|
|
|
|
"color-management",
|
|
|
|
"Color management",
|
|
|
|
COLOR_MANAGEMENT_BLURB,
|
|
|
|
GIMP_TYPE_COLOR_CONFIG,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
|
|
|
|
2019-12-08 19:08:49 +01:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_CHECK_UPDATES,
|
|
|
|
"check-updates",
|
|
|
|
"Check for updates",
|
|
|
|
CHECK_UPDATES_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_INT64 (object_class, PROP_CHECK_UPDATE_TIMESTAMP,
|
|
|
|
"check-update-timestamp",
|
|
|
|
"timestamp of the last update check",
|
|
|
|
CHECK_UPDATE_TIMESTAMP_BLURB,
|
|
|
|
0, G_MAXINT64, 0,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2020-01-02 23:09:23 +01:00
|
|
|
GIMP_CONFIG_PROP_INT64 (object_class, PROP_LAST_RELEASE_TIMESTAMP,
|
|
|
|
"last-release-timestamp",
|
|
|
|
"timestamp of the last release",
|
|
|
|
LAST_RELEASE_TIMESTAMP_BLURB,
|
|
|
|
0, G_MAXINT64, 0,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2020-03-30 15:37:34 +02:00
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_LAST_RELEASE_COMMENT,
|
|
|
|
"last-release-comment",
|
|
|
|
"Comment for last release",
|
|
|
|
LAST_KNOWN_RELEASE_BLURB,
|
|
|
|
NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2019-12-08 19:08:49 +01:00
|
|
|
GIMP_CONFIG_PROP_STRING (object_class, PROP_LAST_KNOWN_RELEASE,
|
|
|
|
"last-known-release",
|
|
|
|
"last known release of GIMP",
|
|
|
|
LAST_KNOWN_RELEASE_BLURB,
|
|
|
|
NULL,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2020-02-06 21:47:00 +01:00
|
|
|
GIMP_CONFIG_PROP_INT (object_class, PROP_LAST_REVISION,
|
|
|
|
"last-revision",
|
|
|
|
"Last revision of current release",
|
|
|
|
LAST_RELEASE_TIMESTAMP_BLURB,
|
|
|
|
0, G_MAXINT, 0,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SAVE_DOCUMENT_HISTORY,
|
|
|
|
"save-document-history",
|
|
|
|
"Save document history",
|
|
|
|
SAVE_DOCUMENT_HISTORY_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2023-11-20 00:20:03 +01:00
|
|
|
GIMP_CONFIG_PROP_COLOR (object_class, PROP_QUICK_MASK_COLOR,
|
|
|
|
"quick-mask-color",
|
|
|
|
"Quick mask color",
|
|
|
|
QUICK_MASK_COLOR_BLURB,
|
2024-04-19 23:02:29 +02:00
|
|
|
TRUE, red,
|
2023-11-20 00:20:03 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2017-01-22 22:47:51 +01:00
|
|
|
|
2017-01-22 22:03:55 +01:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_IMPORT_PROMOTE_FLOAT,
|
|
|
|
"import-promote-float",
|
|
|
|
"Import promote float",
|
|
|
|
IMPORT_PROMOTE_FLOAT_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_IMPORT_PROMOTE_DITHER,
|
|
|
|
"import-promote-dither",
|
|
|
|
"Import promote dither",
|
|
|
|
IMPORT_PROMOTE_DITHER_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2017-02-17 22:07:43 +01:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_IMPORT_ADD_ALPHA,
|
|
|
|
"import-add-alpha",
|
|
|
|
"Import add alpha",
|
|
|
|
IMPORT_ADD_ALPHA_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2017-05-04 20:35:53 +02:00
|
|
|
GIMP_CONFIG_PROP_PATH (object_class, PROP_IMPORT_RAW_PLUG_IN,
|
|
|
|
"import-raw-plug-in",
|
|
|
|
"Import raw plug-in",
|
|
|
|
IMPORT_RAW_PLUG_IN_BLURB,
|
|
|
|
GIMP_CONFIG_PATH_FILE,
|
2017-06-02 22:45:29 +02:00
|
|
|
"",
|
2017-05-04 20:35:53 +02:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
|
|
|
|
2018-12-05 21:59:19 +03:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_EXPORT_FILE_TYPE,
|
|
|
|
"export-file-type",
|
|
|
|
"Default export file type",
|
|
|
|
EXPORT_FILE_TYPE_BLURB,
|
|
|
|
GIMP_TYPE_EXPORT_FILE_TYPE,
|
|
|
|
GIMP_EXPORT_FILE_PNG,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2023-11-14 14:48:21 +00:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_FILE_TYPE_ALWAYS,
|
|
|
|
"export-file-type-always",
|
|
|
|
"Always offer default export file type",
|
|
|
|
EXPORT_FILE_TYPE_ALWAYS_BLURB,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2018-06-18 02:19:41 +02:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_COLOR_PROFILE,
|
|
|
|
"export-color-profile",
|
|
|
|
"Export Color Profile",
|
|
|
|
EXPORT_COLOR_PROFILE_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2019-10-10 00:45:41 +02:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_COMMENT,
|
|
|
|
"export-comment",
|
|
|
|
"Export Comment",
|
|
|
|
EXPORT_COMMENT_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2021-08-25 15:00:45 -04:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_THUMBNAIL,
|
|
|
|
"export-thumbnail",
|
|
|
|
"Export Thumbnail",
|
|
|
|
EXPORT_THUMBNAIL_BLURB,
|
|
|
|
TRUE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2018-01-11 01:53:35 +01:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_METADATA_EXIF,
|
|
|
|
"export-metadata-exif",
|
|
|
|
"Export Exif metadata",
|
|
|
|
EXPORT_METADATA_EXIF_BLURB,
|
2018-03-22 15:36:21 +01:00
|
|
|
TRUE,
|
2018-01-11 01:53:35 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_METADATA_XMP,
|
|
|
|
"export-metadata-xmp",
|
|
|
|
"Export XMP metadata",
|
|
|
|
EXPORT_METADATA_XMP_BLURB,
|
2018-03-22 15:36:21 +01:00
|
|
|
TRUE,
|
2018-01-11 01:53:35 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_METADATA_IPTC,
|
|
|
|
"export-metadata-iptc",
|
|
|
|
"Export IPTC metadata",
|
|
|
|
EXPORT_METADATA_IPTC_BLURB,
|
2018-03-22 15:36:21 +01:00
|
|
|
TRUE,
|
2018-01-11 01:53:35 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_DEBUG_POLICY,
|
|
|
|
"debug-policy",
|
|
|
|
"Try generating backtrace upon errors",
|
|
|
|
GENERATE_BACKTRACE_BLURB,
|
|
|
|
GIMP_TYPE_DEBUG_POLICY,
|
2018-01-26 01:55:54 +01:00
|
|
|
#ifdef GIMP_UNSTABLE
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
GIMP_DEBUG_POLICY_WARNING,
|
2018-01-26 01:55:54 +01:00
|
|
|
#else
|
2018-03-20 23:37:34 +01:00
|
|
|
GIMP_DEBUG_POLICY_FATAL,
|
2018-01-26 01:55:54 +01:00
|
|
|
#endif
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2018-01-26 01:55:54 +01:00
|
|
|
|
2021-06-29 16:11:03 +02:00
|
|
|
#ifdef G_OS_WIN32
|
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_WIN32_POINTER_INPUT_API,
|
|
|
|
"win32-pointer-input-api",
|
|
|
|
"Pointer Input API",
|
|
|
|
WIN32_POINTER_INPUT_API_BLURB,
|
|
|
|
GIMP_TYPE_WIN32_POINTER_INPUT_API,
|
|
|
|
GIMP_WIN32_POINTER_INPUT_API_WINDOWS_INK,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
|
|
|
#endif
|
|
|
|
|
2021-10-05 01:56:51 +02:00
|
|
|
GIMP_CONFIG_PROP_ENUM (object_class, PROP_ITEMS_SELECT_METHOD,
|
|
|
|
"items-select-method",
|
|
|
|
_("Pattern syntax for searching and selecting items:"),
|
|
|
|
ITEMS_SELECT_METHOD_BLURB,
|
|
|
|
GIMP_TYPE_SELECT_METHOD,
|
|
|
|
GIMP_SELECT_PLAIN_TEXT,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
|
|
|
|
2010-10-19 10:13:01 +02:00
|
|
|
/* only for backward compatibility: */
|
2016-04-17 00:11:06 +01:00
|
|
|
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_INSTALL_COLORMAP,
|
|
|
|
"install-colormap",
|
|
|
|
NULL, NULL,
|
|
|
|
FALSE,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
|
|
|
|
|
|
|
GIMP_CONFIG_PROP_INT (object_class, PROP_MIN_COLORS,
|
|
|
|
"min-colors",
|
|
|
|
NULL, NULL,
|
|
|
|
27, 256, 144,
|
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2023-11-20 00:20:03 +01:00
|
|
|
|
|
|
|
g_object_unref (red);
|
2001-12-10 20:43:51 +00:00
|
|
|
}
|
|
|
|
|
2003-10-10 14:11:47 +00:00
|
|
|
static void
|
2003-10-14 15:20:59 +00:00
|
|
|
gimp_core_config_init (GimpCoreConfig *config)
|
2003-10-10 14:11:47 +00:00
|
|
|
{
|
2023-11-20 00:20:03 +01:00
|
|
|
GeglColor *red = gegl_color_new ("red");
|
|
|
|
|
|
|
|
gimp_color_set_alpha (red, 0.5);
|
|
|
|
config->quick_mask_color = red;
|
|
|
|
|
2003-10-15 15:30:11 +00:00
|
|
|
config->default_image = g_object_new (GIMP_TYPE_TEMPLATE,
|
2010-06-24 12:59:36 +02:00
|
|
|
"name", "Default Image",
|
2019-04-28 15:27:53 +09:00
|
|
|
"comment", GIMP_DEFAULT_COMMENT,
|
2003-10-15 15:30:11 +00:00
|
|
|
NULL);
|
2003-10-14 15:20:59 +00:00
|
|
|
g_signal_connect (config->default_image, "notify",
|
2003-10-22 12:37:10 +00:00
|
|
|
G_CALLBACK (gimp_core_config_default_image_notify),
|
2003-10-14 15:20:59 +00:00
|
|
|
config);
|
2003-10-10 14:11:47 +00:00
|
|
|
|
2010-06-24 12:59:36 +02:00
|
|
|
config->default_grid = g_object_new (GIMP_TYPE_GRID,
|
|
|
|
"name", "Default Grid",
|
|
|
|
NULL);
|
2003-10-14 15:20:59 +00:00
|
|
|
g_signal_connect (config->default_grid, "notify",
|
2003-10-22 12:37:10 +00:00
|
|
|
G_CALLBACK (gimp_core_config_default_grid_notify),
|
2003-10-14 15:20:59 +00:00
|
|
|
config);
|
2005-02-07 16:19:08 +00:00
|
|
|
|
|
|
|
config->color_management = g_object_new (GIMP_TYPE_COLOR_CONFIG, NULL);
|
|
|
|
g_signal_connect (config->color_management, "notify",
|
|
|
|
G_CALLBACK (gimp_core_config_color_management_notify),
|
|
|
|
config);
|
2003-10-10 14:11:47 +00:00
|
|
|
}
|
|
|
|
|
2002-02-08 12:35:38 +00:00
|
|
|
static void
|
|
|
|
gimp_core_config_finalize (GObject *object)
|
|
|
|
{
|
2003-11-16 21:57:46 +00:00
|
|
|
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (object);
|
2003-10-10 14:11:47 +00:00
|
|
|
|
2009-12-30 00:38:31 +01:00
|
|
|
g_free (core_config->language);
|
2023-05-23 00:11:23 +02:00
|
|
|
g_free (core_config->prev_language);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->plug_in_path);
|
|
|
|
g_free (core_config->module_path);
|
2005-02-21 02:56:29 +00:00
|
|
|
g_free (core_config->interpreter_path);
|
2002-11-12 03:34:11 +00:00
|
|
|
g_free (core_config->environ_path);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->brush_path);
|
2004-01-28 21:53:50 +00:00
|
|
|
g_free (core_config->brush_path_writable);
|
2009-10-11 01:30:54 +02:00
|
|
|
g_free (core_config->dynamics_path);
|
|
|
|
g_free (core_config->dynamics_path_writable);
|
2021-08-22 12:10:11 +02:00
|
|
|
g_free (core_config->mypaint_brush_path);
|
|
|
|
g_free (core_config->mypaint_brush_path_writable);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->pattern_path);
|
2004-01-28 21:53:50 +00:00
|
|
|
g_free (core_config->pattern_path_writable);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->palette_path);
|
2004-01-28 21:53:50 +00:00
|
|
|
g_free (core_config->palette_path_writable);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->gradient_path);
|
2004-01-28 21:53:50 +00:00
|
|
|
g_free (core_config->gradient_path_writable);
|
2010-04-04 13:58:55 +02:00
|
|
|
g_free (core_config->tool_preset_path);
|
|
|
|
g_free (core_config->tool_preset_path_writable);
|
2003-09-01 18:20:56 +00:00
|
|
|
g_free (core_config->font_path);
|
2004-01-28 21:53:50 +00:00
|
|
|
g_free (core_config->font_path_writable);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->default_brush);
|
2009-10-11 01:30:54 +02:00
|
|
|
g_free (core_config->default_dynamics);
|
2021-08-22 12:10:11 +02:00
|
|
|
g_free (core_config->default_mypaint_brush);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->default_pattern);
|
|
|
|
g_free (core_config->default_palette);
|
|
|
|
g_free (core_config->default_gradient);
|
2010-04-04 13:58:55 +02:00
|
|
|
g_free (core_config->default_tool_preset);
|
2003-03-25 22:06:03 +00:00
|
|
|
g_free (core_config->default_font);
|
2002-02-08 12:35:38 +00:00
|
|
|
g_free (core_config->plug_in_rc_path);
|
2017-05-04 20:35:53 +02:00
|
|
|
g_free (core_config->import_raw_plug_in);
|
2002-02-08 12:35:38 +00:00
|
|
|
|
2019-12-08 19:08:49 +01:00
|
|
|
g_clear_pointer (&core_config->last_known_release, g_free);
|
2020-10-22 16:04:38 +02:00
|
|
|
g_clear_pointer (&core_config->last_release_comment, g_free);
|
2022-02-22 12:13:46 +01:00
|
|
|
g_clear_pointer (&core_config->config_version, g_free);
|
2019-12-08 19:08:49 +01:00
|
|
|
|
2017-07-15 18:38:01 +02:00
|
|
|
g_clear_object (&core_config->default_image);
|
|
|
|
g_clear_object (&core_config->default_grid);
|
|
|
|
g_clear_object (&core_config->color_management);
|
2023-11-20 00:20:03 +01:00
|
|
|
g_clear_object (&core_config->quick_mask_color);
|
2005-02-07 16:19:08 +00:00
|
|
|
|
2002-02-08 12:35:38 +00:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
2001-12-10 20:43:51 +00:00
|
|
|
static void
|
|
|
|
gimp_core_config_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2003-11-16 21:57:46 +00:00
|
|
|
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (object);
|
2001-12-10 20:43:51 +00:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2009-12-30 00:38:31 +01:00
|
|
|
case PROP_LANGUAGE:
|
|
|
|
g_free (core_config->language);
|
|
|
|
core_config->language = g_value_dup_string (value);
|
|
|
|
break;
|
2022-07-06 19:33:00 +02:00
|
|
|
case PROP_PREV_LANGUAGE:
|
|
|
|
g_free (core_config->prev_language);
|
|
|
|
core_config->prev_language = g_value_dup_string (value);
|
|
|
|
break;
|
2002-02-12 02:31:45 +00:00
|
|
|
case PROP_INTERPOLATION_TYPE:
|
|
|
|
core_config->interpolation_type = g_value_get_enum (value);
|
|
|
|
break;
|
2011-02-04 15:19:44 +01:00
|
|
|
case PROP_DEFAULT_THRESHOLD:
|
|
|
|
core_config->default_threshold = g_value_get_int (value);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_PLUG_IN_PATH:
|
|
|
|
g_free (core_config->plug_in_path);
|
|
|
|
core_config->plug_in_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_MODULE_PATH:
|
|
|
|
g_free (core_config->module_path);
|
|
|
|
core_config->module_path = g_value_dup_string (value);
|
|
|
|
break;
|
2005-02-21 02:56:29 +00:00
|
|
|
case PROP_INTERPRETER_PATH:
|
|
|
|
g_free (core_config->interpreter_path);
|
|
|
|
core_config->interpreter_path = g_value_dup_string (value);
|
|
|
|
break;
|
2002-11-12 03:34:11 +00:00
|
|
|
case PROP_ENVIRON_PATH:
|
|
|
|
g_free (core_config->environ_path);
|
|
|
|
core_config->environ_path = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_BRUSH_PATH:
|
|
|
|
g_free (core_config->brush_path);
|
|
|
|
core_config->brush_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_BRUSH_PATH_WRITABLE:
|
|
|
|
g_free (core_config->brush_path_writable);
|
|
|
|
core_config->brush_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2009-10-11 01:30:54 +02:00
|
|
|
case PROP_DYNAMICS_PATH:
|
|
|
|
g_free (core_config->dynamics_path);
|
|
|
|
core_config->dynamics_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_DYNAMICS_PATH_WRITABLE:
|
|
|
|
g_free (core_config->dynamics_path_writable);
|
|
|
|
core_config->dynamics_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2015-12-20 23:20:06 +01:00
|
|
|
case PROP_MYPAINT_BRUSH_PATH:
|
|
|
|
g_free (core_config->mypaint_brush_path);
|
|
|
|
core_config->mypaint_brush_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
|
|
|
|
g_free (core_config->mypaint_brush_path_writable);
|
|
|
|
core_config->mypaint_brush_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_PATTERN_PATH:
|
|
|
|
g_free (core_config->pattern_path);
|
|
|
|
core_config->pattern_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_PATTERN_PATH_WRITABLE:
|
|
|
|
g_free (core_config->pattern_path_writable);
|
|
|
|
core_config->pattern_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_PALETTE_PATH:
|
|
|
|
g_free (core_config->palette_path);
|
|
|
|
core_config->palette_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_PALETTE_PATH_WRITABLE:
|
|
|
|
g_free (core_config->palette_path_writable);
|
|
|
|
core_config->palette_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_GRADIENT_PATH:
|
|
|
|
g_free (core_config->gradient_path);
|
|
|
|
core_config->gradient_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_GRADIENT_PATH_WRITABLE:
|
|
|
|
g_free (core_config->gradient_path_writable);
|
|
|
|
core_config->gradient_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2010-04-04 13:58:55 +02:00
|
|
|
case PROP_TOOL_PRESET_PATH:
|
|
|
|
g_free (core_config->tool_preset_path);
|
|
|
|
core_config->tool_preset_path = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_TOOL_PRESET_PATH_WRITABLE:
|
|
|
|
g_free (core_config->tool_preset_path_writable);
|
|
|
|
core_config->tool_preset_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2003-09-01 18:20:56 +00:00
|
|
|
case PROP_FONT_PATH:
|
|
|
|
g_free (core_config->font_path);
|
|
|
|
core_config->font_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_FONT_PATH_WRITABLE:
|
|
|
|
g_free (core_config->font_path_writable);
|
|
|
|
core_config->font_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-11 15:58:07 +00:00
|
|
|
case PROP_DEFAULT_BRUSH:
|
|
|
|
g_free (core_config->default_brush);
|
|
|
|
core_config->default_brush = g_value_dup_string (value);
|
|
|
|
break;
|
2009-10-11 01:30:54 +02:00
|
|
|
case PROP_DEFAULT_DYNAMICS:
|
|
|
|
g_free (core_config->default_dynamics);
|
|
|
|
core_config->default_dynamics = g_value_dup_string (value);
|
|
|
|
break;
|
2015-12-20 23:20:06 +01:00
|
|
|
case PROP_DEFAULT_MYPAINT_BRUSH:
|
|
|
|
g_free (core_config->default_mypaint_brush);
|
|
|
|
core_config->default_mypaint_brush = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-11 15:58:07 +00:00
|
|
|
case PROP_DEFAULT_PATTERN:
|
|
|
|
g_free (core_config->default_pattern);
|
|
|
|
core_config->default_pattern = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_DEFAULT_PALETTE:
|
|
|
|
g_free (core_config->default_palette);
|
|
|
|
core_config->default_palette = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
case PROP_DEFAULT_GRADIENT:
|
|
|
|
g_free (core_config->default_gradient);
|
|
|
|
core_config->default_gradient = g_value_dup_string (value);
|
|
|
|
break;
|
2010-04-03 18:25:31 +03:00
|
|
|
case PROP_DEFAULT_TOOL_PRESET:
|
|
|
|
g_free (core_config->default_tool_preset);
|
|
|
|
core_config->default_tool_preset = g_value_dup_string (value);
|
|
|
|
break;
|
2003-03-25 22:06:03 +00:00
|
|
|
case PROP_DEFAULT_FONT:
|
|
|
|
g_free (core_config->default_font);
|
|
|
|
core_config->default_font = g_value_dup_string (value);
|
|
|
|
break;
|
2004-03-04 14:04:22 +00:00
|
|
|
case PROP_GLOBAL_BRUSH:
|
|
|
|
core_config->global_brush = g_value_get_boolean (value);
|
|
|
|
break;
|
2009-10-11 01:30:54 +02:00
|
|
|
case PROP_GLOBAL_DYNAMICS:
|
|
|
|
core_config->global_dynamics = g_value_get_boolean (value);
|
|
|
|
break;
|
2004-03-04 14:04:22 +00:00
|
|
|
case PROP_GLOBAL_PATTERN:
|
|
|
|
core_config->global_pattern = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_GLOBAL_PALETTE:
|
|
|
|
core_config->global_palette = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_GLOBAL_GRADIENT:
|
|
|
|
core_config->global_gradient = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_GLOBAL_FONT:
|
|
|
|
core_config->global_font = g_value_get_boolean (value);
|
|
|
|
break;
|
2023-08-18 08:51:46 +05:30
|
|
|
case PROP_GLOBAL_EXPAND:
|
|
|
|
core_config->global_expand = g_value_get_boolean (value);
|
|
|
|
break;
|
2003-10-14 15:20:59 +00:00
|
|
|
case PROP_DEFAULT_IMAGE:
|
|
|
|
if (g_value_get_object (value))
|
2005-04-07 10:05:54 +00:00
|
|
|
gimp_config_sync (g_value_get_object (value) ,
|
|
|
|
G_OBJECT (core_config->default_image), 0);
|
2003-10-14 15:20:59 +00:00
|
|
|
break;
|
|
|
|
case PROP_DEFAULT_GRID:
|
|
|
|
if (g_value_get_object (value))
|
2005-04-07 10:05:54 +00:00
|
|
|
gimp_config_sync (g_value_get_object (value),
|
|
|
|
G_OBJECT (core_config->default_grid), 0);
|
2001-12-16 16:33:18 +00:00
|
|
|
break;
|
2015-12-30 11:53:52 +01:00
|
|
|
case PROP_FILTER_HISTORY_SIZE:
|
|
|
|
core_config->filter_history_size = g_value_get_int (value);
|
2006-02-20 16:38:09 +00:00
|
|
|
break;
|
2001-12-16 16:33:18 +00:00
|
|
|
case PROP_UNDO_LEVELS:
|
|
|
|
core_config->levels_of_undo = g_value_get_int (value);
|
|
|
|
break;
|
2003-02-12 17:11:34 +00:00
|
|
|
case PROP_UNDO_SIZE:
|
2003-11-14 13:41:16 +00:00
|
|
|
core_config->undo_size = g_value_get_uint64 (value);
|
2003-02-12 17:11:34 +00:00
|
|
|
break;
|
2004-03-07 15:33:04 +00:00
|
|
|
case PROP_UNDO_PREVIEW_SIZE:
|
|
|
|
core_config->undo_preview_size = g_value_get_enum (value);
|
|
|
|
break;
|
2001-12-16 16:33:18 +00:00
|
|
|
case PROP_PLUGINRC_PATH:
|
|
|
|
g_free (core_config->plug_in_rc_path);
|
|
|
|
core_config->plug_in_rc_path = g_value_dup_string (value);
|
|
|
|
break;
|
2003-03-06 16:47:34 +00:00
|
|
|
case PROP_LAYER_PREVIEWS:
|
|
|
|
core_config->layer_previews = g_value_get_boolean (value);
|
|
|
|
break;
|
2018-07-01 13:15:21 -04:00
|
|
|
case PROP_GROUP_LAYER_PREVIEWS:
|
|
|
|
core_config->group_layer_previews = g_value_get_boolean (value);
|
|
|
|
break;
|
2003-03-06 16:47:34 +00:00
|
|
|
case PROP_LAYER_PREVIEW_SIZE:
|
|
|
|
core_config->layer_preview_size = g_value_get_enum (value);
|
2001-12-18 12:39:45 +00:00
|
|
|
break;
|
2002-04-29 19:41:45 +00:00
|
|
|
case PROP_THUMBNAIL_SIZE:
|
|
|
|
core_config->thumbnail_size = g_value_get_enum (value);
|
2001-12-16 18:31:30 +00:00
|
|
|
break;
|
2004-10-08 19:29:33 +00:00
|
|
|
case PROP_THUMBNAIL_FILESIZE_LIMIT:
|
|
|
|
core_config->thumbnail_filesize_limit = g_value_get_uint64 (value);
|
|
|
|
break;
|
2005-02-07 16:19:08 +00:00
|
|
|
case PROP_COLOR_MANAGEMENT:
|
|
|
|
if (g_value_get_object (value))
|
2005-04-07 10:05:54 +00:00
|
|
|
gimp_config_sync (g_value_get_object (value),
|
|
|
|
G_OBJECT (core_config->color_management), 0);
|
2005-02-07 16:19:08 +00:00
|
|
|
break;
|
2019-12-08 19:08:49 +01:00
|
|
|
case PROP_CHECK_UPDATES:
|
|
|
|
core_config->check_updates = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_CHECK_UPDATE_TIMESTAMP:
|
|
|
|
core_config->check_update_timestamp = g_value_get_int64 (value);
|
|
|
|
break;
|
2020-01-02 23:09:23 +01:00
|
|
|
case PROP_LAST_RELEASE_TIMESTAMP:
|
|
|
|
core_config->last_release_timestamp = g_value_get_int64 (value);
|
|
|
|
break;
|
2020-03-30 15:37:34 +02:00
|
|
|
case PROP_LAST_RELEASE_COMMENT:
|
2020-10-22 16:04:38 +02:00
|
|
|
g_clear_pointer (&core_config->last_release_comment, g_free);
|
2020-03-30 15:37:34 +02:00
|
|
|
core_config->last_release_comment = g_value_dup_string (value);
|
|
|
|
break;
|
2020-02-06 21:47:00 +01:00
|
|
|
case PROP_LAST_REVISION:
|
|
|
|
core_config->last_revision = g_value_get_int (value);
|
|
|
|
break;
|
2019-12-08 19:08:49 +01:00
|
|
|
case PROP_LAST_KNOWN_RELEASE:
|
2025-01-07 17:10:57 +01:00
|
|
|
if (core_config->last_known_release != g_value_get_string (value))
|
|
|
|
{
|
|
|
|
g_clear_pointer (&core_config->last_known_release, g_free);
|
|
|
|
core_config->last_known_release = g_value_dup_string (value);
|
|
|
|
}
|
2019-12-08 19:08:49 +01:00
|
|
|
break;
|
2022-02-22 12:13:46 +01:00
|
|
|
case PROP_CONFIG_VERSION:
|
|
|
|
g_clear_pointer (&core_config->config_version, g_free);
|
|
|
|
core_config->config_version = g_value_dup_string (value);
|
2022-02-20 20:21:14 +01:00
|
|
|
break;
|
2005-10-31 20:57:03 +00:00
|
|
|
case PROP_SAVE_DOCUMENT_HISTORY:
|
|
|
|
core_config->save_document_history = g_value_get_boolean (value);
|
|
|
|
break;
|
2012-02-27 19:24:09 +02:00
|
|
|
case PROP_QUICK_MASK_COLOR:
|
2023-11-20 00:20:03 +01:00
|
|
|
g_clear_object (&core_config->quick_mask_color);
|
|
|
|
core_config->quick_mask_color = gegl_color_duplicate (g_value_get_object (value));
|
2012-02-27 19:24:09 +02:00
|
|
|
break;
|
2017-01-22 22:03:55 +01:00
|
|
|
case PROP_IMPORT_PROMOTE_FLOAT:
|
|
|
|
core_config->import_promote_float = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_IMPORT_PROMOTE_DITHER:
|
|
|
|
core_config->import_promote_dither = g_value_get_boolean (value);
|
|
|
|
break;
|
2017-02-17 22:07:43 +01:00
|
|
|
case PROP_IMPORT_ADD_ALPHA:
|
|
|
|
core_config->import_add_alpha = g_value_get_boolean (value);
|
|
|
|
break;
|
2017-05-04 20:35:53 +02:00
|
|
|
case PROP_IMPORT_RAW_PLUG_IN:
|
|
|
|
g_free (core_config->import_raw_plug_in);
|
|
|
|
core_config->import_raw_plug_in = g_value_dup_string (value);
|
|
|
|
break;
|
2018-12-05 21:59:19 +03:00
|
|
|
case PROP_EXPORT_FILE_TYPE:
|
|
|
|
core_config->export_file_type = g_value_get_enum (value);
|
|
|
|
break;
|
2023-11-14 14:48:21 +00:00
|
|
|
case PROP_EXPORT_FILE_TYPE_ALWAYS:
|
|
|
|
core_config->export_file_type_always = g_value_get_boolean (value);
|
|
|
|
break;
|
2018-06-18 02:19:41 +02:00
|
|
|
case PROP_EXPORT_COLOR_PROFILE:
|
|
|
|
core_config->export_color_profile = g_value_get_boolean (value);
|
|
|
|
break;
|
2019-10-10 00:45:41 +02:00
|
|
|
case PROP_EXPORT_COMMENT:
|
|
|
|
core_config->export_comment = g_value_get_boolean (value);
|
|
|
|
break;
|
2021-08-25 15:00:45 -04:00
|
|
|
case PROP_EXPORT_THUMBNAIL:
|
|
|
|
core_config->export_thumbnail = g_value_get_boolean (value);
|
|
|
|
break;
|
2018-01-11 01:53:35 +01:00
|
|
|
case PROP_EXPORT_METADATA_EXIF:
|
|
|
|
core_config->export_metadata_exif = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_EXPORT_METADATA_XMP:
|
|
|
|
core_config->export_metadata_xmp = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_EXPORT_METADATA_IPTC:
|
|
|
|
core_config->export_metadata_iptc = g_value_get_boolean (value);
|
|
|
|
break;
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
case PROP_DEBUG_POLICY:
|
|
|
|
core_config->debug_policy = g_value_get_enum (value);
|
2018-01-26 01:55:54 +01:00
|
|
|
break;
|
2021-06-29 16:11:03 +02:00
|
|
|
#ifdef G_OS_WIN32
|
|
|
|
case PROP_WIN32_POINTER_INPUT_API:
|
2021-08-19 21:55:20 +02:00
|
|
|
{
|
|
|
|
GimpWin32PointerInputAPI api = g_value_get_enum (value);
|
|
|
|
gboolean have_wintab = gimp_win32_have_wintab ();
|
|
|
|
gboolean have_windows_ink = gimp_win32_have_windows_ink ();
|
|
|
|
gboolean api_is_wintab = (api == GIMP_WIN32_POINTER_INPUT_API_WINTAB);
|
|
|
|
gboolean api_is_windows_ink = (api == GIMP_WIN32_POINTER_INPUT_API_WINDOWS_INK);
|
|
|
|
|
|
|
|
if (api_is_wintab && !have_wintab && have_windows_ink)
|
|
|
|
{
|
|
|
|
core_config->win32_pointer_input_api = GIMP_WIN32_POINTER_INPUT_API_WINDOWS_INK;
|
|
|
|
}
|
|
|
|
else if (api_is_windows_ink && !have_windows_ink && have_wintab)
|
|
|
|
{
|
|
|
|
core_config->win32_pointer_input_api = GIMP_WIN32_POINTER_INPUT_API_WINTAB;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
core_config->win32_pointer_input_api = api;
|
|
|
|
}
|
|
|
|
}
|
2021-06-29 16:11:03 +02:00
|
|
|
break;
|
|
|
|
#endif
|
2021-10-05 01:56:51 +02:00
|
|
|
case PROP_ITEMS_SELECT_METHOD:
|
|
|
|
core_config->items_select_method = g_value_get_enum (value);
|
|
|
|
break;
|
2001-12-16 18:31:30 +00:00
|
|
|
|
2010-10-19 10:13:01 +02:00
|
|
|
case PROP_INSTALL_COLORMAP:
|
|
|
|
case PROP_MIN_COLORS:
|
|
|
|
/* ignored */
|
|
|
|
break;
|
|
|
|
|
2001-12-10 20:43:51 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_core_config_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2003-11-16 21:57:46 +00:00
|
|
|
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (object);
|
2001-12-10 20:43:51 +00:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2009-12-30 00:38:31 +01:00
|
|
|
case PROP_LANGUAGE:
|
|
|
|
g_value_set_string (value, core_config->language);
|
|
|
|
break;
|
2022-07-06 19:33:00 +02:00
|
|
|
case PROP_PREV_LANGUAGE:
|
|
|
|
g_value_set_string (value, core_config->prev_language);
|
|
|
|
break;
|
2002-02-12 02:31:45 +00:00
|
|
|
case PROP_INTERPOLATION_TYPE:
|
|
|
|
g_value_set_enum (value, core_config->interpolation_type);
|
|
|
|
break;
|
2011-02-04 15:19:44 +01:00
|
|
|
case PROP_DEFAULT_THRESHOLD:
|
|
|
|
g_value_set_int (value, core_config->default_threshold);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_PLUG_IN_PATH:
|
|
|
|
g_value_set_string (value, core_config->plug_in_path);
|
|
|
|
break;
|
|
|
|
case PROP_MODULE_PATH:
|
|
|
|
g_value_set_string (value, core_config->module_path);
|
|
|
|
break;
|
2005-02-21 02:56:29 +00:00
|
|
|
case PROP_INTERPRETER_PATH:
|
|
|
|
g_value_set_string (value, core_config->interpreter_path);
|
|
|
|
break;
|
2002-11-12 03:34:11 +00:00
|
|
|
case PROP_ENVIRON_PATH:
|
|
|
|
g_value_set_string (value, core_config->environ_path);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_BRUSH_PATH:
|
|
|
|
g_value_set_string (value, core_config->brush_path);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_BRUSH_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->brush_path_writable);
|
|
|
|
break;
|
2009-10-11 01:30:54 +02:00
|
|
|
case PROP_DYNAMICS_PATH:
|
|
|
|
g_value_set_string (value, core_config->dynamics_path);
|
|
|
|
break;
|
|
|
|
case PROP_DYNAMICS_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->dynamics_path_writable);
|
|
|
|
break;
|
2015-12-20 23:20:06 +01:00
|
|
|
case PROP_MYPAINT_BRUSH_PATH:
|
|
|
|
g_value_set_string (value, core_config->mypaint_brush_path);
|
|
|
|
break;
|
|
|
|
case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->mypaint_brush_path_writable);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_PATTERN_PATH:
|
|
|
|
g_value_set_string (value, core_config->pattern_path);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_PATTERN_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->pattern_path_writable);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_PALETTE_PATH:
|
|
|
|
g_value_set_string (value, core_config->palette_path);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_PALETTE_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->palette_path_writable);
|
|
|
|
break;
|
2001-12-10 20:43:51 +00:00
|
|
|
case PROP_GRADIENT_PATH:
|
|
|
|
g_value_set_string (value, core_config->gradient_path);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_GRADIENT_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->gradient_path_writable);
|
|
|
|
break;
|
2010-04-04 13:58:55 +02:00
|
|
|
case PROP_TOOL_PRESET_PATH:
|
|
|
|
g_value_set_string (value, core_config->tool_preset_path);
|
|
|
|
break;
|
|
|
|
case PROP_TOOL_PRESET_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->tool_preset_path_writable);
|
|
|
|
break;
|
2003-09-01 18:20:56 +00:00
|
|
|
case PROP_FONT_PATH:
|
|
|
|
g_value_set_string (value, core_config->font_path);
|
|
|
|
break;
|
2004-01-28 21:53:50 +00:00
|
|
|
case PROP_FONT_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->font_path_writable);
|
|
|
|
break;
|
2001-12-11 15:58:07 +00:00
|
|
|
case PROP_DEFAULT_BRUSH:
|
|
|
|
g_value_set_string (value, core_config->default_brush);
|
|
|
|
break;
|
2009-10-11 01:30:54 +02:00
|
|
|
case PROP_DEFAULT_DYNAMICS:
|
|
|
|
g_value_set_string (value, core_config->default_dynamics);
|
|
|
|
break;
|
2015-12-20 23:20:06 +01:00
|
|
|
case PROP_DEFAULT_MYPAINT_BRUSH:
|
|
|
|
g_value_set_string (value, core_config->default_mypaint_brush);
|
|
|
|
break;
|
2001-12-11 15:58:07 +00:00
|
|
|
case PROP_DEFAULT_PATTERN:
|
|
|
|
g_value_set_string (value, core_config->default_pattern);
|
|
|
|
break;
|
|
|
|
case PROP_DEFAULT_PALETTE:
|
|
|
|
g_value_set_string (value, core_config->default_palette);
|
|
|
|
break;
|
|
|
|
case PROP_DEFAULT_GRADIENT:
|
|
|
|
g_value_set_string (value, core_config->default_gradient);
|
|
|
|
break;
|
2010-04-03 18:25:31 +03:00
|
|
|
case PROP_DEFAULT_TOOL_PRESET:
|
|
|
|
g_value_set_string (value, core_config->default_tool_preset);
|
|
|
|
break;
|
2003-03-25 22:06:03 +00:00
|
|
|
case PROP_DEFAULT_FONT:
|
|
|
|
g_value_set_string (value, core_config->default_font);
|
|
|
|
break;
|
2004-03-04 14:04:22 +00:00
|
|
|
case PROP_GLOBAL_BRUSH:
|
|
|
|
g_value_set_boolean (value, core_config->global_brush);
|
|
|
|
break;
|
2009-10-11 01:30:54 +02:00
|
|
|
case PROP_GLOBAL_DYNAMICS:
|
|
|
|
g_value_set_boolean (value, core_config->global_dynamics);
|
|
|
|
break;
|
2004-03-04 14:04:22 +00:00
|
|
|
case PROP_GLOBAL_PATTERN:
|
|
|
|
g_value_set_boolean (value, core_config->global_pattern);
|
|
|
|
break;
|
|
|
|
case PROP_GLOBAL_PALETTE:
|
|
|
|
g_value_set_boolean (value, core_config->global_palette);
|
|
|
|
break;
|
|
|
|
case PROP_GLOBAL_GRADIENT:
|
|
|
|
g_value_set_boolean (value, core_config->global_gradient);
|
|
|
|
break;
|
|
|
|
case PROP_GLOBAL_FONT:
|
|
|
|
g_value_set_boolean (value, core_config->global_font);
|
|
|
|
break;
|
2023-08-18 08:51:46 +05:30
|
|
|
case PROP_GLOBAL_EXPAND:
|
|
|
|
g_value_set_boolean (value, core_config->global_expand);
|
|
|
|
break;
|
2003-10-14 15:20:59 +00:00
|
|
|
case PROP_DEFAULT_IMAGE:
|
|
|
|
g_value_set_object (value, core_config->default_image);
|
|
|
|
break;
|
|
|
|
case PROP_DEFAULT_GRID:
|
|
|
|
g_value_set_object (value, core_config->default_grid);
|
2001-12-16 16:33:18 +00:00
|
|
|
break;
|
2015-12-30 11:53:52 +01:00
|
|
|
case PROP_FILTER_HISTORY_SIZE:
|
|
|
|
g_value_set_int (value, core_config->filter_history_size);
|
2006-02-20 16:38:09 +00:00
|
|
|
break;
|
2001-12-16 16:33:18 +00:00
|
|
|
case PROP_UNDO_LEVELS:
|
|
|
|
g_value_set_int (value, core_config->levels_of_undo);
|
|
|
|
break;
|
2003-02-12 17:11:34 +00:00
|
|
|
case PROP_UNDO_SIZE:
|
2003-11-14 13:41:16 +00:00
|
|
|
g_value_set_uint64 (value, core_config->undo_size);
|
2003-02-12 17:11:34 +00:00
|
|
|
break;
|
2004-03-07 15:33:04 +00:00
|
|
|
case PROP_UNDO_PREVIEW_SIZE:
|
|
|
|
g_value_set_enum (value, core_config->undo_preview_size);
|
|
|
|
break;
|
2001-12-16 16:33:18 +00:00
|
|
|
case PROP_PLUGINRC_PATH:
|
|
|
|
g_value_set_string (value, core_config->plug_in_rc_path);
|
|
|
|
break;
|
2003-03-06 16:47:34 +00:00
|
|
|
case PROP_LAYER_PREVIEWS:
|
|
|
|
g_value_set_boolean (value, core_config->layer_previews);
|
|
|
|
break;
|
2018-07-01 13:15:21 -04:00
|
|
|
case PROP_GROUP_LAYER_PREVIEWS:
|
|
|
|
g_value_set_boolean (value, core_config->group_layer_previews);
|
|
|
|
break;
|
2003-03-06 16:47:34 +00:00
|
|
|
case PROP_LAYER_PREVIEW_SIZE:
|
|
|
|
g_value_set_enum (value, core_config->layer_preview_size);
|
2001-12-18 12:39:45 +00:00
|
|
|
break;
|
2002-04-29 19:41:45 +00:00
|
|
|
case PROP_THUMBNAIL_SIZE:
|
|
|
|
g_value_set_enum (value, core_config->thumbnail_size);
|
2001-12-16 18:31:30 +00:00
|
|
|
break;
|
2004-10-08 19:29:33 +00:00
|
|
|
case PROP_THUMBNAIL_FILESIZE_LIMIT:
|
|
|
|
g_value_set_uint64 (value, core_config->thumbnail_filesize_limit);
|
|
|
|
break;
|
2005-02-07 16:19:08 +00:00
|
|
|
case PROP_COLOR_MANAGEMENT:
|
|
|
|
g_value_set_object (value, core_config->color_management);
|
|
|
|
break;
|
2019-12-08 19:08:49 +01:00
|
|
|
case PROP_CHECK_UPDATES:
|
|
|
|
g_value_set_boolean (value, core_config->check_updates);
|
|
|
|
break;
|
|
|
|
case PROP_CHECK_UPDATE_TIMESTAMP:
|
|
|
|
g_value_set_int64 (value, core_config->check_update_timestamp);
|
|
|
|
break;
|
2020-01-02 23:09:23 +01:00
|
|
|
case PROP_LAST_RELEASE_TIMESTAMP:
|
|
|
|
g_value_set_int64 (value, core_config->last_release_timestamp);
|
|
|
|
break;
|
2020-03-30 15:37:34 +02:00
|
|
|
case PROP_LAST_RELEASE_COMMENT:
|
|
|
|
g_value_set_string (value, core_config->last_release_comment);
|
|
|
|
break;
|
2020-02-06 21:47:00 +01:00
|
|
|
case PROP_LAST_REVISION:
|
|
|
|
g_value_set_int (value, core_config->last_revision);
|
|
|
|
break;
|
2019-12-08 19:08:49 +01:00
|
|
|
case PROP_LAST_KNOWN_RELEASE:
|
|
|
|
g_value_set_string (value, core_config->last_known_release);
|
|
|
|
break;
|
2022-02-22 12:13:46 +01:00
|
|
|
case PROP_CONFIG_VERSION:
|
|
|
|
g_value_set_string (value, core_config->config_version);
|
2022-02-20 20:21:14 +01:00
|
|
|
break;
|
2005-10-31 20:57:03 +00:00
|
|
|
case PROP_SAVE_DOCUMENT_HISTORY:
|
|
|
|
g_value_set_boolean (value, core_config->save_document_history);
|
|
|
|
break;
|
2012-02-27 19:24:09 +02:00
|
|
|
case PROP_QUICK_MASK_COLOR:
|
2023-11-20 00:20:03 +01:00
|
|
|
g_value_set_object (value, core_config->quick_mask_color);
|
2012-02-27 19:24:09 +02:00
|
|
|
break;
|
2017-01-22 22:03:55 +01:00
|
|
|
case PROP_IMPORT_PROMOTE_FLOAT:
|
|
|
|
g_value_set_boolean (value, core_config->import_promote_float);
|
|
|
|
break;
|
|
|
|
case PROP_IMPORT_PROMOTE_DITHER:
|
|
|
|
g_value_set_boolean (value, core_config->import_promote_dither);
|
|
|
|
break;
|
2017-02-17 22:07:43 +01:00
|
|
|
case PROP_IMPORT_ADD_ALPHA:
|
|
|
|
g_value_set_boolean (value, core_config->import_add_alpha);
|
|
|
|
break;
|
2017-05-04 20:35:53 +02:00
|
|
|
case PROP_IMPORT_RAW_PLUG_IN:
|
|
|
|
g_value_set_string (value, core_config->import_raw_plug_in);
|
|
|
|
break;
|
2018-12-05 21:59:19 +03:00
|
|
|
case PROP_EXPORT_FILE_TYPE:
|
|
|
|
g_value_set_enum (value, core_config->export_file_type);
|
|
|
|
break;
|
2023-11-14 14:48:21 +00:00
|
|
|
case PROP_EXPORT_FILE_TYPE_ALWAYS:
|
|
|
|
g_value_set_boolean (value, core_config->export_file_type_always);
|
|
|
|
break;
|
2018-06-18 02:19:41 +02:00
|
|
|
case PROP_EXPORT_COLOR_PROFILE:
|
|
|
|
g_value_set_boolean (value, core_config->export_color_profile);
|
|
|
|
break;
|
2019-10-10 00:45:41 +02:00
|
|
|
case PROP_EXPORT_COMMENT:
|
|
|
|
g_value_set_boolean (value, core_config->export_comment);
|
|
|
|
break;
|
2021-08-25 15:00:45 -04:00
|
|
|
case PROP_EXPORT_THUMBNAIL:
|
|
|
|
g_value_set_boolean (value, core_config->export_thumbnail);
|
|
|
|
break;
|
2018-01-11 01:53:35 +01:00
|
|
|
case PROP_EXPORT_METADATA_EXIF:
|
|
|
|
g_value_set_boolean (value, core_config->export_metadata_exif);
|
|
|
|
break;
|
|
|
|
case PROP_EXPORT_METADATA_XMP:
|
|
|
|
g_value_set_boolean (value, core_config->export_metadata_xmp);
|
|
|
|
break;
|
|
|
|
case PROP_EXPORT_METADATA_IPTC:
|
|
|
|
g_value_set_boolean (value, core_config->export_metadata_iptc);
|
|
|
|
break;
|
app: make debugging preference finer-grained than a boolean.
Replacing the boolean property "generate-backtrace" by an enum
"debug-policy". This property allows one to choose whether to debug
WARNING, CRITICAL and FATAL (crashes), or CRITICAL and FATAL only, or
only FATAL, or finally nothing.
By default, a stable release will debug CRITICAL and crashes, and
unstable builds will start debugging at WARNINGs.
The reason for the settings is that if you stumble upon a reccurring bug
in your workflow (and this bug is not major enough for data corruption,
and "you can live with it"), you still have to wait for a new release.
At some point, you may want to disable getting a debug dialog, at least
temporarily. Oppositely, even when using a stable build, you may want to
obtain debug info for lesser issues, even WARNINGs, if you wish to help
the GIMP project.
It can be argued though whether the value GIMP_DEBUG_POLICY_NEVER is
really useful. There is nothing to gain from refusing debugging info
when the software crashed anyway. But I could still imagine that someone
is not interested in helping at all. It's sad but not like we are going
to force people to report. Let's just allow disabling the whole
debugging system.
2018-02-08 20:48:16 +01:00
|
|
|
case PROP_DEBUG_POLICY:
|
|
|
|
g_value_set_enum (value, core_config->debug_policy);
|
2018-01-26 01:55:54 +01:00
|
|
|
break;
|
2021-06-29 16:11:03 +02:00
|
|
|
#ifdef G_OS_WIN32
|
|
|
|
case PROP_WIN32_POINTER_INPUT_API:
|
|
|
|
g_value_set_enum (value, core_config->win32_pointer_input_api);
|
|
|
|
break;
|
|
|
|
#endif
|
2021-10-05 01:56:51 +02:00
|
|
|
case PROP_ITEMS_SELECT_METHOD:
|
|
|
|
g_value_set_enum (value, core_config->items_select_method);
|
|
|
|
break;
|
2001-12-16 18:31:30 +00:00
|
|
|
|
2010-10-19 10:13:01 +02:00
|
|
|
case PROP_INSTALL_COLORMAP:
|
|
|
|
case PROP_MIN_COLORS:
|
|
|
|
/* ignored */
|
|
|
|
break;
|
|
|
|
|
2001-12-10 20:43:51 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2003-10-10 14:11:47 +00:00
|
|
|
|
2003-10-14 15:20:59 +00:00
|
|
|
static void
|
2003-10-22 12:37:10 +00:00
|
|
|
gimp_core_config_default_image_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
2003-10-14 15:20:59 +00:00
|
|
|
{
|
2003-10-22 12:37:10 +00:00
|
|
|
g_object_notify (G_OBJECT (data), "default-image");
|
2003-10-14 15:20:59 +00:00
|
|
|
}
|
|
|
|
|
2003-10-10 14:11:47 +00:00
|
|
|
static void
|
2003-10-22 12:37:10 +00:00
|
|
|
gimp_core_config_default_grid_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
2003-10-10 14:11:47 +00:00
|
|
|
{
|
2003-10-22 12:37:10 +00:00
|
|
|
g_object_notify (G_OBJECT (data), "default-grid");
|
2003-10-10 14:11:47 +00:00
|
|
|
}
|
2005-02-07 16:19:08 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_core_config_color_management_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
g_object_notify (G_OBJECT (data), "color-management");
|
|
|
|
}
|