renamed GIMP_PARAM_ #defines to GIMP_CONFIG_PARAM_.

2005-02-05  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-params.h: renamed GIMP_PARAM_ #defines
	to GIMP_CONFIG_PARAM_.

	* app/config/gimpbaseconfig.c
	* app/config/gimpconfig-dump.c
	* app/config/gimpcoreconfig.c
	* app/config/gimpdisplayconfig.c
	* app/config/gimpguiconfig.c
	* app/config/gimprc-deserialize.c
	* app/config/gimprc-serialize.c
	* app/config/gimprc.c
	* app/core/gimp.c
	* app/core/gimpstrokedesc.c
	* app/dialogs/preferences-dialog.c
	* app/text/gimptext.c
	* app/tools/gimptextoptions.c
	* libgimpconfig/gimpconfig-deserialize.c
	* libgimpconfig/gimpconfig-iface.c
	* libgimpconfig/gimpconfig-serialize.c
	* libgimpconfig/gimpconfig-utils.c: changed accordingly.

	* libgimpmodule/gimpmoduletypes.h: deprecate the
	GIMP_MODULE_PARAM_SERIALIZE #define, GIMP_CONFIG_PARAM_SERIALIZE
	should be used instead.

	* modules/controller_linux_input.c
	* modules/controller_midi.c: changed accordingly.
This commit is contained in:
Sven Neumann 2005-02-05 14:52:58 +00:00 committed by Sven Neumann
parent d44700a1d1
commit 692669f4d8
24 changed files with 178 additions and 116 deletions

View File

@ -1,3 +1,33 @@
2005-02-05 Sven Neumann <sven@gimp.org>
* libgimpconfig/gimpconfig-params.h: renamed GIMP_PARAM_ #defines
to GIMP_CONFIG_PARAM_.
* app/config/gimpbaseconfig.c
* app/config/gimpconfig-dump.c
* app/config/gimpcoreconfig.c
* app/config/gimpdisplayconfig.c
* app/config/gimpguiconfig.c
* app/config/gimprc-deserialize.c
* app/config/gimprc-serialize.c
* app/config/gimprc.c
* app/core/gimp.c
* app/core/gimpstrokedesc.c
* app/dialogs/preferences-dialog.c
* app/text/gimptext.c
* app/tools/gimptextoptions.c
* libgimpconfig/gimpconfig-deserialize.c
* libgimpconfig/gimpconfig-iface.c
* libgimpconfig/gimpconfig-serialize.c
* libgimpconfig/gimpconfig-utils.c: changed accordingly.
* libgimpmodule/gimpmoduletypes.h: deprecate the
GIMP_MODULE_PARAM_SERIALIZE #define, GIMP_CONFIG_PARAM_SERIALIZE
should be used instead.
* modules/controller_linux_input.c
* modules/controller_midi.c: changed accordingly.
2005-02-05 Sven Neumann <sven@gimp.org>
* modules/cdisplay_colorblind.c

View File

@ -104,16 +104,16 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
"temp-path", TEMP_PATH_BLURB,
GIMP_CONFIG_PATH_DIR,
"${gimp_dir}" G_DIR_SEPARATOR_S "tmp",
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_SWAP_PATH,
"swap-path", SWAP_PATH_BLURB,
GIMP_CONFIG_PATH_DIR,
"${gimp_dir}",
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_STINGY_MEMORY_USE,
"stingy-memory-use", STINGY_MEMORY_USE_BLURB,
FALSE,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_UINT (object_class, PROP_NUM_PROCESSORS,
"num-processors", NUM_PROCESSORS_BLURB,
1, 30, 1,
@ -121,7 +121,7 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_TILE_CACHE_SIZE,
"tile-cache-size", TILE_CACHE_SIZE_BLURB,
0, GIMP_MAX_MEMSIZE, 1 << 27, /* 128MB */
GIMP_PARAM_CONFIRM);
GIMP_CONFIG_PARAM_CONFIRM);
}
static void

View File

@ -129,7 +129,7 @@ dump_gimprc_system (GimpConfig *rc,
GParamSpec *prop_spec = property_specs[i];
gchar *comment;
if (! (prop_spec->flags & GIMP_PARAM_SERIALIZE))
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
continue;
comment = dump_describe_param (prop_spec);
@ -258,7 +258,7 @@ dump_gimprc_manpage (GimpConfig *rc,
GParamSpec *prop_spec = property_specs[i];
gchar *desc;
if (! (prop_spec->flags & GIMP_PARAM_SERIALIZE))
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
continue;
write (fd, ".TP\n", strlen (".TP\n"));

View File

@ -159,61 +159,61 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
"plug-in-path", PLUG_IN_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_plug_in_path ("plug-ins"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MODULE_PATH,
"module-path", MODULE_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_plug_in_path ("modules"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_ENVIRON_PATH,
"environ-path", ENVIRON_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_plug_in_path ("environ"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH,
"brush-path", BRUSH_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_data_path ("brushes"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH_WRITABLE,
"brush-path-writable",
BRUSH_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_writable_path ("brushes"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH,
"pattern-path", PATTERN_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_data_path ("patterns"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH_WRITABLE,
"pattern-path-writable",
PATTERN_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_writable_path ("patterns"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH,
"palette-path", PALETTE_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_data_path ("palettes"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH_WRITABLE,
"palette-path-writable",
PALETTE_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_writable_path ("palettes"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH,
"gradient-path", GRADIENT_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_data_path ("gradients"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH_WRITABLE,
"gradient-path-writable",
GRADIENT_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_writable_path ("gradients"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH,
"font-path", FONT_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
@ -224,7 +224,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
FONT_PATH_WRITABLE_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_writable_path ("fonts"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_BRUSH,
"default-brush", DEFAULT_BRUSH_BLURB,
DEFAULT_BRUSH,
@ -268,30 +268,30 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_IMAGE,
"default-image", DEFAULT_IMAGE_BLURB,
GIMP_TYPE_TEMPLATE,
GIMP_PARAM_AGGREGATE);
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_GRID,
"default-grid", DEFAULT_GRID_BLURB,
GIMP_TYPE_GRID,
GIMP_PARAM_AGGREGATE);
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_UNDO_LEVELS,
"undo-levels", UNDO_LEVELS_BLURB,
0, G_MAXINT, 5,
GIMP_PARAM_CONFIRM);
GIMP_CONFIG_PARAM_CONFIRM);
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_UNDO_SIZE,
"undo-size", UNDO_SIZE_BLURB,
0, GIMP_MAX_MEMSIZE, 1 << 24, /* 16MB */
GIMP_PARAM_CONFIRM);
GIMP_CONFIG_PARAM_CONFIRM);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_UNDO_PREVIEW_SIZE,
"undo-preview-size", UNDO_PREVIEW_SIZE_BLURB,
GIMP_TYPE_VIEW_SIZE,
GIMP_VIEW_SIZE_LARGE,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class,
PROP_PLUGINRC_PATH,
"pluginrc-path", PLUGINRC_PATH_BLURB,
GIMP_CONFIG_PATH_FILE,
"${gimp_dir}" G_DIR_SEPARATOR_S "pluginrc",
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_LAYER_PREVIEWS,
"layer-previews", LAYER_PREVIEWS_BLURB,
TRUE,
@ -314,11 +314,11 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INSTALL_COLORMAP,
"install-colormap", INSTALL_COLORMAP_BLURB,
FALSE,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_MIN_COLORS,
"min-colors", MIN_COLORS_BLURB,
27, 256, 144,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
}
static void

View File

@ -240,12 +240,12 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
"default-view",
DEFAULT_VIEW_BLURB,
GIMP_TYPE_DISPLAY_OPTIONS,
GIMP_PARAM_AGGREGATE);
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_FULLSCREEN_VIEW,
"default-fullscreen-view",
DEFAULT_FULLSCREEN_VIEW_BLURB,
GIMP_TYPE_DISPLAY_OPTIONS,
GIMP_PARAM_AGGREGATE);
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_ACTIVATE_ON_FOCUS,
"activate-on-focus",
ACTIVATE_ON_FOCUS_BLURB,

View File

@ -147,7 +147,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
"info-window-per-display",
INFO_WINDOW_PER_DISPLAY_BLURB,
FALSE,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TRUST_DIRTY_FLAG,
"trust-dirty-flag",
TRUST_DIRTY_FLAG_BLURB,
@ -194,11 +194,11 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MENU_MNEMONICS,
"menu-mnemonics", MENU_MNEMONICS_BLURB,
TRUE,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_LAST_OPENED_SIZE,
"last-opened-size", LAST_OPENED_SIZE_BLURB,
0, 1024, 10,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_MAX_NEW_IMAGE_SIZE,
"max-new-image-size",
MAX_NEW_IMAGE_SIZE_BLURB,
@ -223,7 +223,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
"theme-path", THEME_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST,
gimp_config_build_data_path ("themes"),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_THEME,
"theme", THEME_BLURB,
DEFAULT_THEME,
@ -255,13 +255,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
TOOLBOX_WINDOW_HINT_BLURB,
GIMP_TYPE_WINDOW_HINT,
GIMP_WINDOW_HINT_NORMAL,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_DOCK_WINDOW_HINT,
"dock-window-hint",
DOCK_WINDOW_HINT_BLURB,
GIMP_TYPE_WINDOW_HINT,
GIMP_WINDOW_HINT_NORMAL,
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CURSOR_FORMAT,
"cursor-format", CURSOR_FORMAT_BLURB,
GIMP_TYPE_CURSOR_FORMAT,

View File

@ -69,7 +69,7 @@ gimp_rc_deserialize (GimpConfig *config,
{
GParamSpec *prop_spec = property_specs[i];
if (prop_spec->flags & GIMP_PARAM_SERIALIZE)
if (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE)
{
g_scanner_scope_add_symbol (scanner, scope_id,
prop_spec->name, prop_spec);

View File

@ -76,16 +76,16 @@ gimp_rc_serialize_properties_diff (GimpConfig *config,
klass = G_OBJECT_GET_CLASS (config);
diff = gimp_config_diff (config, compare, GIMP_PARAM_SERIALIZE);
diff = gimp_config_diff (config, compare, GIMP_CONFIG_PARAM_SERIALIZE);
if (! diff)
return TRUE;
for (list = diff; list; list = g_list_next (list))
{
GParamSpec *prop_spec = (GParamSpec *) list->data;
GParamSpec *prop_spec = list->data;
if (! (prop_spec->flags & GIMP_PARAM_SERIALIZE))
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
continue;
if (! gimp_config_serialize_property (config, prop_spec, writer))

View File

@ -435,7 +435,7 @@ gimp_rc_query (GimpRc *rc,
{
prop_spec = property_specs[i];
if (! (prop_spec->flags & GIMP_PARAM_SERIALIZE) ||
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE) ||
strcmp (prop_spec->name, key))
{
prop_spec = NULL;

View File

@ -756,7 +756,7 @@ gimp_edit_config_notify (GObject *edit_config,
if (g_param_values_cmp (param_spec, &edit_value, &global_value))
{
if (param_spec->flags & GIMP_PARAM_RESTART)
if (param_spec->flags & GIMP_CONFIG_PARAM_RESTART)
{
#ifdef GIMP_CONFIG_DEBUG
g_print ("NOT Applying edit_config change of '%s' to global_config "

View File

@ -136,7 +136,7 @@ gimp_stroke_desc_class_init (GimpStrokeDescClass *klass)
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_STROKE_OPTIONS,
"stroke-options", NULL,
GIMP_TYPE_STROKE_OPTIONS,
GIMP_PARAM_AGGREGATE);
GIMP_CONFIG_PARAM_AGGREGATE);
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_PAINT_INFO,
"paint-info", NULL,
GIMP_TYPE_PAINT_INFO,

View File

@ -198,7 +198,7 @@ prefs_config_copy_notify (GObject *config_copy,
if (g_param_values_cmp (param_spec, &copy_value, &global_value))
{
if (param_spec->flags & GIMP_PARAM_CONFIRM)
if (param_spec->flags & GIMP_CONFIG_PARAM_CONFIRM)
{
#ifdef GIMP_CONFIG_DEBUG
g_print ("NOT Applying prefs change of '%s' to edit_config "
@ -251,7 +251,7 @@ prefs_response (GtkWidget *widget,
confirm_diff = gimp_config_diff (GIMP_CONFIG (gimp->edit_config),
config_copy,
GIMP_PARAM_CONFIRM);
GIMP_CONFIG_PARAM_CONFIRM);
g_object_freeze_notify (G_OBJECT (gimp->edit_config));
@ -283,7 +283,7 @@ prefs_response (GtkWidget *widget,
*/
restart_diff = gimp_config_diff (GIMP_CONFIG (gimp->edit_config),
GIMP_CONFIG (gimp->config),
GIMP_PARAM_RESTART);
GIMP_CONFIG_PARAM_RESTART);
if (restart_diff)
{
@ -321,7 +321,7 @@ prefs_response (GtkWidget *widget,
gtk_widget_set_sensitive (GTK_WIDGET (dialog), FALSE);
diff = gimp_config_diff (GIMP_CONFIG (gimp->edit_config), config_orig,
GIMP_PARAM_SERIALIZE);
GIMP_CONFIG_PARAM_SERIALIZE);
g_object_freeze_notify (G_OBJECT (gimp->edit_config));

View File

@ -173,7 +173,7 @@ gimp_text_class_init (GimpTextClass *klass)
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_AUTOHINT,
"autohint", NULL,
FALSE,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_ANTIALIAS,
"antialias", NULL,
TRUE,
@ -181,7 +181,7 @@ gimp_text_class_init (GimpTextClass *klass)
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_KERNING,
"kerning", NULL,
FALSE,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_LANGUAGE,
"language", NULL,
language,
@ -199,7 +199,7 @@ gimp_text_class_init (GimpTextClass *klass)
"outline", NULL,
GIMP_TYPE_TEXT_OUTLINE,
GIMP_TEXT_OUTLINE_NONE,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_JUSTIFICATION,
"justify", NULL,
GIMP_TYPE_TEXT_JUSTIFICATION,
@ -208,15 +208,15 @@ gimp_text_class_init (GimpTextClass *klass)
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_INDENTATION,
"indent", NULL,
-8192.0, 8192.0, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_LINE_SPACING,
"line-spacing", NULL,
-8192.0, 8192.0, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_LETTER_SPACING,
"letter-spacing", NULL,
-8192.0, 8192.0, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_BOX_MODE,
"box-mode",
NULL,
@ -226,11 +226,11 @@ gimp_text_class_init (GimpTextClass *klass)
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_BOX_WIDTH,
"box-width", NULL,
0.0, GIMP_MAX_IMAGE_SIZE, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_BOX_HEIGHT,
"box-height", NULL,
0.0, GIMP_MAX_IMAGE_SIZE, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_BOX_UNIT,
"box-unit", NULL,
TRUE, FALSE, GIMP_UNIT_PIXEL,
@ -238,15 +238,15 @@ gimp_text_class_init (GimpTextClass *klass)
GIMP_CONFIG_INSTALL_PROP_MATRIX2 (object_class, PROP_TRANSFORMATION,
"transformation", NULL,
&identity,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OFFSET_X,
"offset-x", NULL,
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_OFFSET_Y,
"offset-y", NULL,
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
/* border does only exist to implement the old text API */
param_spec = g_param_spec_int ("border", NULL, NULL,

View File

@ -176,12 +176,12 @@ gimp_text_options_class_init (GimpTextOptionsClass *klass)
"indent",
N_("Indentation of the first line"),
-8192.0, 8192.0, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_LINE_SPACING,
"line-spacing",
N_("Modify line spacing"),
-8192.0, 8192.0, 0.0,
GIMP_PARAM_DEFAULTS);
GIMP_CONFIG_PARAM_DEFAULTS);
}
static void

View File

@ -33,12 +33,12 @@ gimp_config_error_quark
<SECTION>
<FILE>gimpconfig-params</FILE>
GIMP_PARAM_SERIALIZE
GIMP_PARAM_AGGREGATE
GIMP_PARAM_RESTART
GIMP_PARAM_CONFIRM
GIMP_PARAM_DEFAULTS
GIMP_PARAM_IGNORE
GIMP_CONFIG_PARAM_SERIALIZE
GIMP_CONFIG_PARAM_AGGREGATE
GIMP_CONFIG_PARAM_RESTART
GIMP_CONFIG_PARAM_CONFIRM
GIMP_CONFIG_PARAM_DEFAULTS
GIMP_CONFIG_PARAM_IGNORE
GIMP_CONFIG_PARAM_FLAGS
GIMP_CONFIG_INSTALL_PROP_BOOLEAN
GIMP_CONFIG_INSTALL_PROP_RGB

View File

@ -14,42 +14,42 @@ gimpconfig-params
</para>
<!-- ##### MACRO GIMP_PARAM_SERIALIZE ##### -->
<!-- ##### MACRO GIMP_CONFIG_PARAM_SERIALIZE ##### -->
<para>
</para>
<!-- ##### MACRO GIMP_PARAM_AGGREGATE ##### -->
<!-- ##### MACRO GIMP_CONFIG_PARAM_AGGREGATE ##### -->
<para>
</para>
<!-- ##### MACRO GIMP_PARAM_RESTART ##### -->
<!-- ##### MACRO GIMP_CONFIG_PARAM_RESTART ##### -->
<para>
</para>
<!-- ##### MACRO GIMP_PARAM_CONFIRM ##### -->
<!-- ##### MACRO GIMP_CONFIG_PARAM_CONFIRM ##### -->
<para>
</para>
<!-- ##### MACRO GIMP_PARAM_DEFAULTS ##### -->
<!-- ##### MACRO GIMP_CONFIG_PARAM_DEFAULTS ##### -->
<para>
</para>
<!-- ##### MACRO GIMP_PARAM_IGNORE ##### -->
<!-- ##### MACRO GIMP_CONFIG_PARAM_IGNORE ##### -->
<para>
</para>
@ -80,6 +80,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -104,6 +106,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -128,6 +132,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -154,6 +160,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -178,6 +186,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -203,6 +213,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -229,6 +241,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -253,6 +267,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -279,6 +295,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -306,6 +324,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -330,6 +350,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -356,6 +378,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -382,6 +406,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:
@ -406,6 +432,8 @@ gimpconfig-params
name:
@\
name:
@\
name:
@\
name:
@blurb:

View File

@ -139,7 +139,7 @@ gimp_config_deserialize_properties (GimpConfig *config,
{
GParamSpec *prop_spec = property_specs[i];
if (prop_spec->flags & GIMP_PARAM_SERIALIZE)
if (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE)
{
g_scanner_scope_add_symbol (scanner, scope_id,
prop_spec->name, prop_spec);
@ -277,7 +277,7 @@ gimp_config_deserialize_property (GimpConfig *config,
g_scanner_peek_next_token (scanner) == token)
{
if (! (G_VALUE_HOLDS_OBJECT (&value) &&
(prop_spec->flags & GIMP_PARAM_AGGREGATE)))
(prop_spec->flags & GIMP_CONFIG_PARAM_AGGREGATE)))
g_object_set_property (G_OBJECT (config), prop_spec->name, &value);
}
#ifdef CONFIG_DEBUG
@ -639,10 +639,10 @@ gimp_config_deserialize_object (GValue *value,
if (! prop_object)
{
/* if the object property is not GIMP_PARAM_AGGREGATE, read
/* if the object property is not GIMP_CONFIG_PARAM_AGGREGATE, read
* the type of the object and create it
*/
if (! (prop_spec->flags & GIMP_PARAM_AGGREGATE))
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_AGGREGATE))
{
gchar *type_name;
GType type;

View File

@ -204,7 +204,7 @@ gimp_config_iface_equal (GimpConfig *a,
if (g_param_values_cmp (prop_spec, &a_value, &b_value))
{
if ((prop_spec->flags & GIMP_PARAM_AGGREGATE) &&
if ((prop_spec->flags & GIMP_CONFIG_PARAM_AGGREGATE) &&
G_IS_PARAM_SPEC_OBJECT (prop_spec) &&
g_type_interface_peek (g_type_class_peek (prop_spec->value_type),
GIMP_TYPE_CONFIG))

View File

@ -25,31 +25,31 @@
/*
* GIMP_PARAM_SERIALIZE - A property that can and should be
* serialized and deserialized.
* GIMP_PARAM_AGGREGATE - The object property is to be treated as
* part of the parent object.
* GIMP_PARAM_RESTART - Changes to this property take effect only
* after a restart.
* GIMP_PARAM_CONFIRM - Changes to this property should be
* confirmed by the user before being applied.
* GIMP_PARAM_DEFAULTS - Don't serialize this property if it has the
* default value.
* GIMP_PARAM_IGNORE - This property exists for obscure reasons
* and is needed for backward compatibility.
* Ignore the value read and don't serialize it.
* GIMP_CONFIG_PARAM_SERIALIZE - A property that can and should be
* serialized and deserialized.
* GIMP_CONFIG_PARAM_AGGREGATE - The object property is to be treated as
* part of the parent object.
* GIMP_CONFIG_PARAM_RESTART - Changes to this property take effect only
* after a restart.
* GIMP_CONFIG_PARAM_CONFIRM - Changes to this property should be
* confirmed by the user before being applied.
* GIMP_CONFIG_PARAM_DEFAULTS - Don't serialize this property if it has the
* default value.
* GIMP_CONFIG_PARAM_IGNORE - This property exists for obscure reasons
* and is needed for backward compatibility.
* Ignore the value read and don't serialize it.
*/
#define GIMP_PARAM_SERIALIZE (1 << (0 + G_PARAM_USER_SHIFT))
#define GIMP_PARAM_AGGREGATE (1 << (1 + G_PARAM_USER_SHIFT))
#define GIMP_PARAM_RESTART (1 << (2 + G_PARAM_USER_SHIFT))
#define GIMP_PARAM_CONFIRM (1 << (3 + G_PARAM_USER_SHIFT))
#define GIMP_PARAM_DEFAULTS (1 << (4 + G_PARAM_USER_SHIFT))
#define GIMP_PARAM_IGNORE (1 << (5 + G_PARAM_USER_SHIFT))
#define GIMP_CONFIG_PARAM_SERIALIZE (1 << (0 + G_PARAM_USER_SHIFT))
#define GIMP_CONFIG_PARAM_AGGREGATE (1 << (1 + G_PARAM_USER_SHIFT))
#define GIMP_CONFIG_PARAM_RESTART (1 << (2 + G_PARAM_USER_SHIFT))
#define GIMP_CONFIG_PARAM_CONFIRM (1 << (3 + G_PARAM_USER_SHIFT))
#define GIMP_CONFIG_PARAM_DEFAULTS (1 << (4 + G_PARAM_USER_SHIFT))
#define GIMP_CONFIG_PARAM_IGNORE (1 << (5 + G_PARAM_USER_SHIFT))
#define GIMP_CONFIG_PARAM_FLAGS (G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GIMP_PARAM_SERIALIZE)
GIMP_CONFIG_PARAM_SERIALIZE)
@ -138,14 +138,16 @@
g_param_spec_object (name, NULL, blurb,\
object_type,\
flags |\
G_PARAM_READWRITE | GIMP_PARAM_SERIALIZE))
G_PARAM_READWRITE |\
GIMP_CONFIG_PARAM_SERIALIZE))
#define GIMP_CONFIG_INSTALL_PROP_POINTER(class, id,\
name, blurb, flags)\
g_object_class_install_property (class, id,\
g_param_spec_pointer (name, NULL, blurb,\
flags |\
G_PARAM_READWRITE | GIMP_PARAM_SERIALIZE))
G_PARAM_READWRITE |\
GIMP_CONFIG_PARAM_SERIALIZE))
#endif /* __GIMP_CONFIG_PARAMS_H__ */

View File

@ -69,7 +69,7 @@ gimp_config_serialize_properties (GimpConfig *config,
{
GParamSpec *prop_spec = property_specs[i];
if (! (prop_spec->flags & GIMP_PARAM_SERIALIZE))
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
continue;
if (! gimp_config_serialize_property (config, prop_spec, writer))
@ -116,7 +116,7 @@ gimp_config_serialize_changed_properties (GimpConfig *config,
{
GParamSpec *prop_spec = property_specs[i];
if (! (prop_spec->flags & GIMP_PARAM_SERIALIZE))
if (! (prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
continue;
g_value_init (&value, prop_spec->value_type);
@ -158,16 +158,16 @@ gimp_config_serialize_property (GimpConfig *config,
GValue value = { 0, };
gboolean success = FALSE;
if (! (param_spec->flags & GIMP_PARAM_SERIALIZE))
if (! (param_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE))
return FALSE;
if (param_spec->flags & GIMP_PARAM_IGNORE)
if (param_spec->flags & GIMP_CONFIG_PARAM_IGNORE)
return TRUE;
g_value_init (&value, param_spec->value_type);
g_object_get_property (G_OBJECT (config), param_spec->name, &value);
if (param_spec->flags & GIMP_PARAM_DEFAULTS &&
if (param_spec->flags & GIMP_CONFIG_PARAM_DEFAULTS &&
g_param_value_defaults (param_spec, &value))
{
g_value_unset (&value);
@ -232,11 +232,11 @@ gimp_config_serialize_property (GimpConfig *config,
{
gimp_config_writer_open (writer, param_spec->name);
/* if the object property is not GIMP_PARAM_AGGREGATE,
/* if the object property is not GIMP_CONFIG_PARAM_AGGREGATE,
* deserializing will need to know the exact type
* in order to create the object
*/
if (! (param_spec->flags & GIMP_PARAM_AGGREGATE))
if (! (param_spec->flags & GIMP_CONFIG_PARAM_AGGREGATE))
{
GType object_type = G_TYPE_FROM_INSTANCE (prop_object);

View File

@ -50,7 +50,7 @@ gimp_config_diff_property (GObject *a,
if (g_param_values_cmp (prop_spec, &a_value, &b_value))
{
if ((prop_spec->flags & GIMP_PARAM_AGGREGATE) &&
if ((prop_spec->flags & GIMP_CONFIG_PARAM_AGGREGATE) &&
G_IS_PARAM_SPEC_OBJECT (prop_spec) &&
g_type_interface_peek (g_type_class_peek (prop_spec->value_type),
GIMP_TYPE_CONFIG))
@ -282,8 +282,8 @@ gimp_config_reset_properties (GimpConfig *config)
{
if (G_IS_PARAM_SPEC_OBJECT (prop_spec))
{
if ((prop_spec->flags & GIMP_PARAM_SERIALIZE) &&
(prop_spec->flags & GIMP_PARAM_AGGREGATE) &&
if ((prop_spec->flags & GIMP_CONFIG_PARAM_SERIALIZE) &&
(prop_spec->flags & GIMP_CONFIG_PARAM_AGGREGATE) &&
g_type_interface_peek (g_type_class_peek (prop_spec->value_type),
GIMP_TYPE_CONFIG))
{

View File

@ -25,7 +25,13 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
#ifndef GIMP_DISABLE_DEPRECATED
/*
* GIMP_MODULE_PARAM_SERIALIZE is deprecated, use
* GIMP_CONFIG_PARAM_SERIALIZE instead.
*/
#define GIMP_MODULE_PARAM_SERIALIZE (1 << (0 + G_PARAM_USER_SHIFT))
#endif
typedef struct _GimpModule GimpModule;

View File

@ -32,6 +32,7 @@
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
#include "libgimpmodule/gimpmodule.h"
#include "libgimpwidgets/gimpwidgets.h"
@ -219,9 +220,7 @@ linux_input_class_init (ControllerLinuxInputClass *klass)
_("Device:"),
_("The name of the device to read Linux Input events from."),
NULL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
GIMP_MODULE_PARAM_SERIALIZE));
GIMP_CONFIG_PARAM_FLAGS));
controller_class->name = _("Linux Input");
controller_class->help_id = "gimp-controller-linux-input";

View File

@ -35,6 +35,7 @@
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
#include "libgimpmodule/gimpmodule.h"
#include "libgimpwidgets/gimpwidgets.h"
@ -241,9 +242,7 @@ midi_class_init (ControllerMidiClass *klass)
_("Device:"),
blurb,
NULL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
GIMP_MODULE_PARAM_SERIALIZE));
GIMP_CONFIG_PARAM_FLAGS));
g_free (blurb);
@ -252,9 +251,7 @@ midi_class_init (ControllerMidiClass *klass)
_("Channel:"),
_("The MIDI channel to read events from. Set to -1 for reading from all MIDI channels."),
-1, 15, -1,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
GIMP_MODULE_PARAM_SERIALIZE));
GIMP_CONFIG_PARAM_FLAGS));
controller_class->name = _("MIDI");
controller_class->help_id = "gimp-controller-midi";