2001-12-11 04:43:51 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* GimpCoreConfig class
|
|
|
|
* Copyright (C) 2001 Sven Neumann <sven@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 2 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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
2001-12-17 00:33:18 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2005-01-26 03:11:26 +08:00
|
|
|
#include "libgimpconfig/gimpconfig.h"
|
2001-12-17 00:33:18 +08:00
|
|
|
|
2002-11-19 04:50:31 +08:00
|
|
|
#include "config-types.h"
|
|
|
|
|
2003-10-10 22:11:47 +08:00
|
|
|
#include "core/core-types.h"
|
|
|
|
#include "core/gimpgrid.h"
|
2003-10-14 23:20:59 +08:00
|
|
|
#include "core/gimptemplate.h"
|
2003-10-10 22:11:47 +08:00
|
|
|
|
2002-12-20 22:36:08 +08:00
|
|
|
#include "gimprc-blurbs.h"
|
2001-12-11 04:43:51 +08:00
|
|
|
#include "gimpcoreconfig.h"
|
|
|
|
|
2003-03-26 00:38:19 +08:00
|
|
|
#include "gimp-intl.h"
|
2003-01-26 04:29:42 +08:00
|
|
|
|
2001-12-11 04:43:51 +08:00
|
|
|
|
2003-01-23 08:40:34 +08:00
|
|
|
#define DEFAULT_BRUSH "Circle (11)"
|
|
|
|
#define DEFAULT_PATTERN "Pine"
|
|
|
|
#define DEFAULT_PALETTE "Default"
|
|
|
|
#define DEFAULT_GRADIENT "FG to BG (RGB)"
|
2003-03-26 06:06:03 +08:00
|
|
|
#define DEFAULT_FONT "Sans"
|
2005-10-06 08:44:41 +08:00
|
|
|
#define DEFAULT_COMMENT "Created with GIMP"
|
2003-01-23 08:40:34 +08:00
|
|
|
|
2005-12-11 03:24:36 +08:00
|
|
|
|
2001-12-11 04:43:51 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
2002-02-12 10:31:45 +08:00
|
|
|
PROP_INTERPOLATION_TYPE,
|
2001-12-11 04:43:51 +08:00
|
|
|
PROP_PLUG_IN_PATH,
|
|
|
|
PROP_MODULE_PATH,
|
2005-02-21 10:56:29 +08:00
|
|
|
PROP_INTERPRETER_PATH,
|
2002-11-12 11:34:11 +08:00
|
|
|
PROP_ENVIRON_PATH,
|
2001-12-11 04:43:51 +08:00
|
|
|
PROP_BRUSH_PATH,
|
2004-01-29 05:53:50 +08:00
|
|
|
PROP_BRUSH_PATH_WRITABLE,
|
2001-12-11 04:43:51 +08:00
|
|
|
PROP_PATTERN_PATH,
|
2004-01-29 05:53:50 +08:00
|
|
|
PROP_PATTERN_PATH_WRITABLE,
|
2001-12-11 04:43:51 +08:00
|
|
|
PROP_PALETTE_PATH,
|
2004-01-29 05:53:50 +08:00
|
|
|
PROP_PALETTE_PATH_WRITABLE,
|
2001-12-11 23:58:07 +08:00
|
|
|
PROP_GRADIENT_PATH,
|
2004-01-29 05:53:50 +08:00
|
|
|
PROP_GRADIENT_PATH_WRITABLE,
|
2003-09-02 02:20:56 +08:00
|
|
|
PROP_FONT_PATH,
|
2004-01-29 05:53:50 +08:00
|
|
|
PROP_FONT_PATH_WRITABLE,
|
2001-12-11 23:58:07 +08:00
|
|
|
PROP_DEFAULT_BRUSH,
|
|
|
|
PROP_DEFAULT_PATTERN,
|
|
|
|
PROP_DEFAULT_PALETTE,
|
|
|
|
PROP_DEFAULT_GRADIENT,
|
2003-03-26 06:06:03 +08:00
|
|
|
PROP_DEFAULT_FONT,
|
2004-03-04 22:04:22 +08:00
|
|
|
PROP_GLOBAL_BRUSH,
|
|
|
|
PROP_GLOBAL_PATTERN,
|
|
|
|
PROP_GLOBAL_PALETTE,
|
|
|
|
PROP_GLOBAL_GRADIENT,
|
|
|
|
PROP_GLOBAL_FONT,
|
2003-10-14 23:20:59 +08:00
|
|
|
PROP_DEFAULT_IMAGE,
|
|
|
|
PROP_DEFAULT_GRID,
|
2001-12-17 00:33:18 +08:00
|
|
|
PROP_UNDO_LEVELS,
|
2003-02-13 01:11:34 +08:00
|
|
|
PROP_UNDO_SIZE,
|
2004-03-07 23:33:04 +08:00
|
|
|
PROP_UNDO_PREVIEW_SIZE,
|
2001-12-17 00:33:18 +08:00
|
|
|
PROP_PLUGINRC_PATH,
|
2003-03-07 00:47:34 +08:00
|
|
|
PROP_LAYER_PREVIEWS,
|
|
|
|
PROP_LAYER_PREVIEW_SIZE,
|
2002-04-30 03:41:45 +08:00
|
|
|
PROP_THUMBNAIL_SIZE,
|
2004-10-09 03:29:33 +08:00
|
|
|
PROP_THUMBNAIL_FILESIZE_LIMIT,
|
2001-12-18 20:39:45 +08:00
|
|
|
PROP_INSTALL_COLORMAP,
|
2005-02-08 00:19:08 +08:00
|
|
|
PROP_MIN_COLORS,
|
2005-11-01 04:57:03 +08:00
|
|
|
PROP_COLOR_MANAGEMENT,
|
|
|
|
PROP_SAVE_DOCUMENT_HISTORY
|
2001-12-11 04:43:51 +08:00
|
|
|
};
|
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
|
2005-12-11 03:24:36 +08: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);
|
|
|
|
|
|
|
|
|
|
|
|
G_DEFINE_TYPE (GimpCoreConfig, gimp_core_config, GIMP_TYPE_BASE_CONFIG);
|
|
|
|
|
|
|
|
#define parent_class gimp_core_config_parent_class
|
2001-12-11 04:43:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_core_config_class_init (GimpCoreConfigClass *klass)
|
|
|
|
{
|
2005-12-11 03:24:36 +08:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
2005-04-08 01:10:05 +08:00
|
|
|
gchar *path;
|
2001-12-11 04:43:51 +08:00
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
object_class->finalize = gimp_core_config_finalize;
|
2001-12-11 04:43:51 +08:00
|
|
|
object_class->set_property = gimp_core_config_set_property;
|
|
|
|
object_class->get_property = gimp_core_config_get_property;
|
|
|
|
|
2002-02-12 10:31:45 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_INTERPOLATION_TYPE,
|
|
|
|
"interpolation-type",
|
2002-11-28 23:19:19 +08:00
|
|
|
INTERPOLATION_TYPE_BLURB,
|
2003-10-10 22:11:47 +08:00
|
|
|
GIMP_TYPE_INTERPOLATION_TYPE,
|
2002-11-21 03:09:40 +08:00
|
|
|
GIMP_INTERPOLATION_LINEAR,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2005-04-08 01:10:05 +08:00
|
|
|
path = gimp_config_build_plug_in_path ("plug-ins");
|
2001-12-11 04:43:51 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PLUG_IN_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"plug-in-path", PLUG_IN_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_plug_in_path ("modules");
|
2001-12-11 04:43:51 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MODULE_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"module-path", MODULE_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_plug_in_path ("interpreters");
|
2005-02-21 10:56:29 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_INTERPRETER_PATH,
|
|
|
|
"interpreter-path", INTERPRETER_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-21 10:56:29 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_plug_in_path ("environ");
|
2002-11-12 11:34:11 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_ENVIRON_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"environ-path", ENVIRON_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_data_path ("brushes");
|
2001-12-11 04:43:51 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"brush-path", BRUSH_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_writable_path ("brushes");
|
2004-01-29 05:53:50 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH_WRITABLE,
|
|
|
|
"brush-path-writable",
|
|
|
|
BRUSH_PATH_WRITABLE_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_data_path ("patterns");
|
2001-12-11 04:43:51 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"pattern-path", PATTERN_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_writable_path ("patterns");
|
2004-01-29 05:53:50 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH_WRITABLE,
|
|
|
|
"pattern-path-writable",
|
|
|
|
PATTERN_PATH_WRITABLE_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_data_path ("palettes");
|
2001-12-11 04:43:51 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"palette-path", PALETTE_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_writable_path ("palettes");
|
2004-01-29 05:53:50 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH_WRITABLE,
|
|
|
|
"palette-path-writable",
|
|
|
|
PALETTE_PATH_WRITABLE_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_data_path ("gradients");
|
2001-12-11 04:43:51 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"gradient-path", GRADIENT_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_writable_path ("gradients");
|
2004-01-29 05:53:50 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH_WRITABLE,
|
|
|
|
"gradient-path-writable",
|
|
|
|
GRADIENT_PATH_WRITABLE_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
|
|
|
path = gimp_config_build_data_path ("fonts");
|
2003-09-02 02:20:56 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH,
|
|
|
|
"font-path", FONT_PATH_BLURB,
|
2005-04-08 01:10:05 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, path,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-04-13 21:14:24 +08:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2005-04-08 01:10:05 +08:00
|
|
|
g_free (path);
|
2004-01-29 05:53:50 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH_WRITABLE,
|
2005-06-08 19:31:44 +08:00
|
|
|
"font-path-writable", NULL,
|
2005-04-13 21:14:24 +08:00
|
|
|
GIMP_CONFIG_PATH_DIR_LIST, NULL,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-04-13 21:14:24 +08:00
|
|
|
GIMP_CONFIG_PARAM_IGNORE);
|
2001-12-11 23:58:07 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_BRUSH,
|
2002-11-28 23:19:19 +08:00
|
|
|
"default-brush", DEFAULT_BRUSH_BLURB,
|
2003-01-23 08:40:34 +08:00
|
|
|
DEFAULT_BRUSH,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-11 23:58:07 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_PATTERN,
|
2002-11-28 23:19:19 +08:00
|
|
|
"default-pattern", DEFAULT_PATTERN_BLURB,
|
2003-01-23 08:40:34 +08:00
|
|
|
DEFAULT_PATTERN,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2002-11-28 23:19:19 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_PALETTE,
|
|
|
|
"default-palette", DEFAULT_PALETTE_BLURB,
|
2003-01-23 08:40:34 +08:00
|
|
|
DEFAULT_PALETTE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-11 23:58:07 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_GRADIENT,
|
2002-11-28 23:19:19 +08:00
|
|
|
"default-gradient", DEFAULT_GRADIENT_BLURB,
|
2003-01-23 08:40:34 +08:00
|
|
|
DEFAULT_GRADIENT,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2003-03-26 06:06:03 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_FONT,
|
|
|
|
"default-font", DEFAULT_FONT_BLURB,
|
|
|
|
DEFAULT_FONT,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-03-04 22:04:22 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_BRUSH,
|
|
|
|
"global-brush", GLOBAL_BRUSH_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-03-04 22:04:22 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_PATTERN,
|
|
|
|
"global-pattern", GLOBAL_PATTERN_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-03-04 22:04:22 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_PALETTE,
|
|
|
|
"global-palette", GLOBAL_PALETTE_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-03-04 22:04:22 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_GRADIENT,
|
|
|
|
"global-gradient", GLOBAL_GRADIENT_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-03-04 22:04:22 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_FONT,
|
|
|
|
"global-font", GLOBAL_FONT_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2003-10-14 23:20:59 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_IMAGE,
|
|
|
|
"default-image", DEFAULT_IMAGE_BLURB,
|
|
|
|
GIMP_TYPE_TEMPLATE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
2003-10-14 23:20:59 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_GRID,
|
|
|
|
"default-grid", DEFAULT_GRID_BLURB,
|
|
|
|
GIMP_TYPE_GRID,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
2001-12-17 00:33:18 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_UNDO_LEVELS,
|
2002-11-28 23:19:19 +08:00
|
|
|
"undo-levels", UNDO_LEVELS_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
0, G_MAXINT, 5,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2003-02-13 01:11:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_UNDO_SIZE,
|
|
|
|
"undo-size", UNDO_SIZE_BLURB,
|
2004-11-16 23:09:56 +08:00
|
|
|
0, GIMP_MAX_MEMSIZE, 1 << 24, /* 16MB */
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_CONFIRM);
|
2004-03-07 23:33:04 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_UNDO_PREVIEW_SIZE,
|
|
|
|
"undo-preview-size", UNDO_PREVIEW_SIZE_BLURB,
|
2004-08-29 19:58:05 +08:00
|
|
|
GIMP_TYPE_VIEW_SIZE,
|
|
|
|
GIMP_VIEW_SIZE_LARGE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2002-11-28 23:19:19 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class,
|
|
|
|
PROP_PLUGINRC_PATH,
|
|
|
|
"pluginrc-path", PLUGINRC_PATH_BLURB,
|
2005-01-26 07:44:05 +08:00
|
|
|
GIMP_CONFIG_PATH_FILE,
|
2002-12-30 02:58:24 +08:00
|
|
|
"${gimp_dir}" G_DIR_SEPARATOR_S "pluginrc",
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2003-03-07 00:47:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_LAYER_PREVIEWS,
|
|
|
|
"layer-previews", LAYER_PREVIEWS_BLURB,
|
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2003-03-07 00:47:34 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_LAYER_PREVIEW_SIZE,
|
|
|
|
"layer-preview-size", LAYER_PREVIEW_SIZE_BLURB,
|
2004-08-29 19:58:05 +08:00
|
|
|
GIMP_TYPE_VIEW_SIZE,
|
|
|
|
GIMP_VIEW_SIZE_MEDIUM,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2002-04-30 03:41:45 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_THUMBNAIL_SIZE,
|
2002-11-28 23:19:19 +08:00
|
|
|
"thumbnail-size", THUMBNAIL_SIZE_BLURB,
|
2002-04-30 03:41:45 +08:00
|
|
|
GIMP_TYPE_THUMBNAIL_SIZE,
|
2002-11-21 03:09:40 +08:00
|
|
|
GIMP_THUMBNAIL_SIZE_NORMAL,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2004-10-09 03:29:33 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_THUMBNAIL_FILESIZE_LIMIT,
|
|
|
|
"thumbnail-filesize-limit",
|
|
|
|
THUMBNAIL_FILESIZE_LIMIT_BLURB,
|
2004-10-09 03:35:27 +08:00
|
|
|
0, GIMP_MAX_MEMSIZE, 1 << 22,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-18 20:39:45 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INSTALL_COLORMAP,
|
2002-11-28 23:19:19 +08:00
|
|
|
"install-colormap", INSTALL_COLORMAP_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
FALSE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2001-12-18 20:39:45 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_MIN_COLORS,
|
2002-11-28 23:19:19 +08:00
|
|
|
"min-colors", MIN_COLORS_BLURB,
|
2002-11-21 03:09:40 +08:00
|
|
|
27, 256, 144,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-05 22:52:58 +08:00
|
|
|
GIMP_CONFIG_PARAM_RESTART);
|
2005-02-08 00:19:08 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_COLOR_MANAGEMENT,
|
|
|
|
"color-management", COLOR_MANAGEMENT_BLURB,
|
|
|
|
GIMP_TYPE_COLOR_CONFIG,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS |
|
2005-02-08 00:19:08 +08:00
|
|
|
GIMP_CONFIG_PARAM_AGGREGATE);
|
2005-11-01 04:57:03 +08:00
|
|
|
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_DOCUMENT_HISTORY,
|
2005-11-01 17:34:38 +08:00
|
|
|
"save-document-history",
|
|
|
|
SAVE_DOCUMENT_HISTORY_BLURB,
|
2005-11-01 04:57:03 +08:00
|
|
|
TRUE,
|
2006-01-19 04:29:40 +08:00
|
|
|
GIMP_PARAM_STATIC_STRINGS);
|
2001-12-11 04:43:51 +08:00
|
|
|
}
|
|
|
|
|
2003-10-10 22:11:47 +08:00
|
|
|
static void
|
2003-10-14 23:20:59 +08:00
|
|
|
gimp_core_config_init (GimpCoreConfig *config)
|
2003-10-10 22:11:47 +08:00
|
|
|
{
|
2003-10-15 23:30:11 +08:00
|
|
|
config->default_image = g_object_new (GIMP_TYPE_TEMPLATE,
|
|
|
|
"comment", DEFAULT_COMMENT,
|
|
|
|
NULL);
|
2003-10-14 23:20:59 +08:00
|
|
|
g_signal_connect (config->default_image, "notify",
|
2003-10-22 20:37:10 +08:00
|
|
|
G_CALLBACK (gimp_core_config_default_image_notify),
|
2003-10-14 23:20:59 +08:00
|
|
|
config);
|
2003-10-10 22:11:47 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
config->default_grid = g_object_new (GIMP_TYPE_GRID, NULL);
|
|
|
|
g_signal_connect (config->default_grid, "notify",
|
2003-10-22 20:37:10 +08:00
|
|
|
G_CALLBACK (gimp_core_config_default_grid_notify),
|
2003-10-14 23:20:59 +08:00
|
|
|
config);
|
2005-02-08 00:19:08 +08: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 22:11:47 +08:00
|
|
|
}
|
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
static void
|
|
|
|
gimp_core_config_finalize (GObject *object)
|
|
|
|
{
|
2003-11-17 05:57:46 +08:00
|
|
|
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (object);
|
2003-10-10 22:11:47 +08:00
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (core_config->plug_in_path);
|
|
|
|
g_free (core_config->module_path);
|
2005-02-21 10:56:29 +08:00
|
|
|
g_free (core_config->interpreter_path);
|
2002-11-12 11:34:11 +08:00
|
|
|
g_free (core_config->environ_path);
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (core_config->brush_path);
|
2004-01-29 05:53:50 +08:00
|
|
|
g_free (core_config->brush_path_writable);
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (core_config->pattern_path);
|
2004-01-29 05:53:50 +08:00
|
|
|
g_free (core_config->pattern_path_writable);
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (core_config->palette_path);
|
2004-01-29 05:53:50 +08:00
|
|
|
g_free (core_config->palette_path_writable);
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (core_config->gradient_path);
|
2004-01-29 05:53:50 +08:00
|
|
|
g_free (core_config->gradient_path_writable);
|
2003-09-02 02:20:56 +08:00
|
|
|
g_free (core_config->font_path);
|
2004-01-29 05:53:50 +08:00
|
|
|
g_free (core_config->font_path_writable);
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (core_config->default_brush);
|
|
|
|
g_free (core_config->default_pattern);
|
|
|
|
g_free (core_config->default_palette);
|
|
|
|
g_free (core_config->default_gradient);
|
2003-03-26 06:06:03 +08:00
|
|
|
g_free (core_config->default_font);
|
2002-02-08 20:35:38 +08:00
|
|
|
g_free (core_config->plug_in_rc_path);
|
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
if (core_config->default_image)
|
|
|
|
g_object_unref (core_config->default_image);
|
|
|
|
|
2003-10-10 22:11:47 +08:00
|
|
|
if (core_config->default_grid)
|
2003-10-14 23:20:59 +08:00
|
|
|
g_object_unref (core_config->default_grid);
|
2003-10-10 22:11:47 +08:00
|
|
|
|
2005-02-08 00:19:08 +08:00
|
|
|
if (core_config->color_management)
|
|
|
|
g_object_unref (core_config->color_management);
|
|
|
|
|
2002-02-08 20:35:38 +08:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
2001-12-11 04:43:51 +08:00
|
|
|
static void
|
|
|
|
gimp_core_config_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2003-11-17 05:57:46 +08:00
|
|
|
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (object);
|
2001-12-11 04:43:51 +08:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2002-02-12 10:31:45 +08:00
|
|
|
case PROP_INTERPOLATION_TYPE:
|
|
|
|
core_config->interpolation_type = g_value_get_enum (value);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08: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 10:56:29 +08:00
|
|
|
case PROP_INTERPRETER_PATH:
|
|
|
|
g_free (core_config->interpreter_path);
|
|
|
|
core_config->interpreter_path = g_value_dup_string (value);
|
|
|
|
break;
|
2002-11-12 11:34:11 +08:00
|
|
|
case PROP_ENVIRON_PATH:
|
|
|
|
g_free (core_config->environ_path);
|
|
|
|
core_config->environ_path = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08:00
|
|
|
case PROP_BRUSH_PATH:
|
|
|
|
g_free (core_config->brush_path);
|
|
|
|
core_config->brush_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08:00
|
|
|
case PROP_BRUSH_PATH_WRITABLE:
|
|
|
|
g_free (core_config->brush_path_writable);
|
|
|
|
core_config->brush_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08:00
|
|
|
case PROP_PATTERN_PATH:
|
|
|
|
g_free (core_config->pattern_path);
|
|
|
|
core_config->pattern_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08: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-11 04:43:51 +08:00
|
|
|
case PROP_PALETTE_PATH:
|
|
|
|
g_free (core_config->palette_path);
|
|
|
|
core_config->palette_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08: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-11 04:43:51 +08:00
|
|
|
case PROP_GRADIENT_PATH:
|
|
|
|
g_free (core_config->gradient_path);
|
|
|
|
core_config->gradient_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08:00
|
|
|
case PROP_GRADIENT_PATH_WRITABLE:
|
|
|
|
g_free (core_config->gradient_path_writable);
|
|
|
|
core_config->gradient_path_writable = g_value_dup_string (value);
|
|
|
|
break;
|
2003-09-02 02:20:56 +08:00
|
|
|
case PROP_FONT_PATH:
|
|
|
|
g_free (core_config->font_path);
|
|
|
|
core_config->font_path = g_value_dup_string (value);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08: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 23:58:07 +08:00
|
|
|
case PROP_DEFAULT_BRUSH:
|
|
|
|
g_free (core_config->default_brush);
|
|
|
|
core_config->default_brush = g_value_dup_string (value);
|
|
|
|
break;
|
|
|
|
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;
|
2003-03-26 06:06:03 +08:00
|
|
|
case PROP_DEFAULT_FONT:
|
|
|
|
g_free (core_config->default_font);
|
|
|
|
core_config->default_font = g_value_dup_string (value);
|
|
|
|
break;
|
2004-03-04 22:04:22 +08:00
|
|
|
case PROP_GLOBAL_BRUSH:
|
|
|
|
core_config->global_brush = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
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;
|
2003-10-14 23:20:59 +08:00
|
|
|
case PROP_DEFAULT_IMAGE:
|
|
|
|
if (g_value_get_object (value))
|
2005-04-07 18:05:54 +08:00
|
|
|
gimp_config_sync (g_value_get_object (value) ,
|
|
|
|
G_OBJECT (core_config->default_image), 0);
|
2003-10-14 23:20:59 +08:00
|
|
|
break;
|
|
|
|
case PROP_DEFAULT_GRID:
|
|
|
|
if (g_value_get_object (value))
|
2005-04-07 18:05:54 +08:00
|
|
|
gimp_config_sync (g_value_get_object (value),
|
|
|
|
G_OBJECT (core_config->default_grid), 0);
|
2001-12-17 00:33:18 +08:00
|
|
|
break;
|
|
|
|
case PROP_UNDO_LEVELS:
|
|
|
|
core_config->levels_of_undo = g_value_get_int (value);
|
|
|
|
break;
|
2003-02-13 01:11:34 +08:00
|
|
|
case PROP_UNDO_SIZE:
|
2003-11-14 21:41:16 +08:00
|
|
|
core_config->undo_size = g_value_get_uint64 (value);
|
2003-02-13 01:11:34 +08:00
|
|
|
break;
|
2004-03-07 23:33:04 +08:00
|
|
|
case PROP_UNDO_PREVIEW_SIZE:
|
|
|
|
core_config->undo_preview_size = g_value_get_enum (value);
|
|
|
|
break;
|
2001-12-17 00:33:18 +08: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-07 00:47:34 +08:00
|
|
|
case PROP_LAYER_PREVIEWS:
|
|
|
|
core_config->layer_previews = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_PREVIEW_SIZE:
|
|
|
|
core_config->layer_preview_size = g_value_get_enum (value);
|
2001-12-18 20:39:45 +08:00
|
|
|
break;
|
2002-04-30 03:41:45 +08:00
|
|
|
case PROP_THUMBNAIL_SIZE:
|
|
|
|
core_config->thumbnail_size = g_value_get_enum (value);
|
2001-12-17 02:31:30 +08:00
|
|
|
break;
|
2004-10-09 03:29:33 +08:00
|
|
|
case PROP_THUMBNAIL_FILESIZE_LIMIT:
|
|
|
|
core_config->thumbnail_filesize_limit = g_value_get_uint64 (value);
|
|
|
|
break;
|
2001-12-18 20:39:45 +08:00
|
|
|
case PROP_INSTALL_COLORMAP:
|
|
|
|
core_config->install_cmap = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case PROP_MIN_COLORS:
|
|
|
|
core_config->min_colors = g_value_get_int (value);
|
|
|
|
break;
|
2005-02-08 00:19:08 +08:00
|
|
|
case PROP_COLOR_MANAGEMENT:
|
|
|
|
if (g_value_get_object (value))
|
2005-04-07 18:05:54 +08:00
|
|
|
gimp_config_sync (g_value_get_object (value),
|
|
|
|
G_OBJECT (core_config->color_management), 0);
|
2005-02-08 00:19:08 +08:00
|
|
|
break;
|
2005-11-01 04:57:03 +08:00
|
|
|
case PROP_SAVE_DOCUMENT_HISTORY:
|
|
|
|
core_config->save_document_history = g_value_get_boolean (value);
|
|
|
|
break;
|
2001-12-17 02:31:30 +08:00
|
|
|
|
2001-12-11 04:43:51 +08: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-17 05:57:46 +08:00
|
|
|
GimpCoreConfig *core_config = GIMP_CORE_CONFIG (object);
|
2001-12-11 04:43:51 +08:00
|
|
|
|
|
|
|
switch (property_id)
|
|
|
|
{
|
2002-02-12 10:31:45 +08:00
|
|
|
case PROP_INTERPOLATION_TYPE:
|
|
|
|
g_value_set_enum (value, core_config->interpolation_type);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08: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 10:56:29 +08:00
|
|
|
case PROP_INTERPRETER_PATH:
|
|
|
|
g_value_set_string (value, core_config->interpreter_path);
|
|
|
|
break;
|
2002-11-12 11:34:11 +08:00
|
|
|
case PROP_ENVIRON_PATH:
|
|
|
|
g_value_set_string (value, core_config->environ_path);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08:00
|
|
|
case PROP_BRUSH_PATH:
|
|
|
|
g_value_set_string (value, core_config->brush_path);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08:00
|
|
|
case PROP_BRUSH_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->brush_path_writable);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08:00
|
|
|
case PROP_PATTERN_PATH:
|
|
|
|
g_value_set_string (value, core_config->pattern_path);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08:00
|
|
|
case PROP_PATTERN_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->pattern_path_writable);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08:00
|
|
|
case PROP_PALETTE_PATH:
|
|
|
|
g_value_set_string (value, core_config->palette_path);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08:00
|
|
|
case PROP_PALETTE_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->palette_path_writable);
|
|
|
|
break;
|
2001-12-11 04:43:51 +08:00
|
|
|
case PROP_GRADIENT_PATH:
|
|
|
|
g_value_set_string (value, core_config->gradient_path);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08:00
|
|
|
case PROP_GRADIENT_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->gradient_path_writable);
|
|
|
|
break;
|
2003-09-02 02:20:56 +08:00
|
|
|
case PROP_FONT_PATH:
|
|
|
|
g_value_set_string (value, core_config->font_path);
|
|
|
|
break;
|
2004-01-29 05:53:50 +08:00
|
|
|
case PROP_FONT_PATH_WRITABLE:
|
|
|
|
g_value_set_string (value, core_config->font_path_writable);
|
|
|
|
break;
|
2001-12-11 23:58:07 +08:00
|
|
|
case PROP_DEFAULT_BRUSH:
|
|
|
|
g_value_set_string (value, core_config->default_brush);
|
|
|
|
break;
|
|
|
|
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;
|
2003-03-26 06:06:03 +08:00
|
|
|
case PROP_DEFAULT_FONT:
|
|
|
|
g_value_set_string (value, core_config->default_font);
|
|
|
|
break;
|
2004-03-04 22:04:22 +08:00
|
|
|
case PROP_GLOBAL_BRUSH:
|
|
|
|
g_value_set_boolean (value, core_config->global_brush);
|
|
|
|
break;
|
|
|
|
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;
|
2003-10-14 23:20:59 +08: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-17 00:33:18 +08:00
|
|
|
break;
|
|
|
|
case PROP_UNDO_LEVELS:
|
|
|
|
g_value_set_int (value, core_config->levels_of_undo);
|
|
|
|
break;
|
2003-02-13 01:11:34 +08:00
|
|
|
case PROP_UNDO_SIZE:
|
2003-11-14 21:41:16 +08:00
|
|
|
g_value_set_uint64 (value, core_config->undo_size);
|
2003-02-13 01:11:34 +08:00
|
|
|
break;
|
2004-03-07 23:33:04 +08:00
|
|
|
case PROP_UNDO_PREVIEW_SIZE:
|
|
|
|
g_value_set_enum (value, core_config->undo_preview_size);
|
|
|
|
break;
|
2001-12-17 00:33:18 +08:00
|
|
|
case PROP_PLUGINRC_PATH:
|
|
|
|
g_value_set_string (value, core_config->plug_in_rc_path);
|
|
|
|
break;
|
2003-03-07 00:47:34 +08:00
|
|
|
case PROP_LAYER_PREVIEWS:
|
|
|
|
g_value_set_boolean (value, core_config->layer_previews);
|
|
|
|
break;
|
|
|
|
case PROP_LAYER_PREVIEW_SIZE:
|
|
|
|
g_value_set_enum (value, core_config->layer_preview_size);
|
2001-12-18 20:39:45 +08:00
|
|
|
break;
|
2002-04-30 03:41:45 +08:00
|
|
|
case PROP_THUMBNAIL_SIZE:
|
|
|
|
g_value_set_enum (value, core_config->thumbnail_size);
|
2001-12-17 02:31:30 +08:00
|
|
|
break;
|
2004-10-09 03:29:33 +08:00
|
|
|
case PROP_THUMBNAIL_FILESIZE_LIMIT:
|
|
|
|
g_value_set_uint64 (value, core_config->thumbnail_filesize_limit);
|
|
|
|
break;
|
2001-12-18 20:39:45 +08:00
|
|
|
case PROP_INSTALL_COLORMAP:
|
|
|
|
g_value_set_boolean (value, core_config->install_cmap);
|
|
|
|
break;
|
|
|
|
case PROP_MIN_COLORS:
|
|
|
|
g_value_set_int (value, core_config->min_colors);
|
|
|
|
break;
|
2005-02-08 00:19:08 +08:00
|
|
|
case PROP_COLOR_MANAGEMENT:
|
|
|
|
g_value_set_object (value, core_config->color_management);
|
|
|
|
break;
|
2005-11-01 04:57:03 +08:00
|
|
|
case PROP_SAVE_DOCUMENT_HISTORY:
|
|
|
|
g_value_set_boolean (value, core_config->save_document_history);
|
|
|
|
break;
|
2001-12-17 02:31:30 +08:00
|
|
|
|
2001-12-11 04:43:51 +08:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2003-10-10 22:11:47 +08:00
|
|
|
|
2003-10-14 23:20:59 +08:00
|
|
|
static void
|
2003-10-22 20:37:10 +08:00
|
|
|
gimp_core_config_default_image_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
2003-10-14 23:20:59 +08:00
|
|
|
{
|
2003-10-22 20:37:10 +08:00
|
|
|
g_object_notify (G_OBJECT (data), "default-image");
|
2003-10-14 23:20:59 +08:00
|
|
|
}
|
|
|
|
|
2003-10-10 22:11:47 +08:00
|
|
|
static void
|
2003-10-22 20:37:10 +08:00
|
|
|
gimp_core_config_default_grid_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
2003-10-10 22:11:47 +08:00
|
|
|
{
|
2003-10-22 20:37:10 +08:00
|
|
|
g_object_notify (G_OBJECT (data), "default-grid");
|
2003-10-10 22:11:47 +08:00
|
|
|
}
|
2005-02-08 00:19:08 +08:00
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_core_config_color_management_notify (GObject *object,
|
|
|
|
GParamSpec *pspec,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
g_object_notify (G_OBJECT (data), "color-management");
|
|
|
|
}
|