allow object properties to be set again if they are G_PARAM_WRITABLE.

2003-03-27  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_property): allow object properties to be
	set again if they are G_PARAM_WRITABLE. Fixes active brush,
	pattern etc. deserialization.
This commit is contained in:
Michael Natterer 2003-03-27 11:36:01 +00:00 committed by Michael Natterer
parent 86f8c5fccf
commit 21def17709
3 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2003-03-27 Michael Natterer <mitch@gimp.org>
* app/config/gimpconfig-deserialize.c
(gimp_config_deserialize_property): allow object properties to be
set again if they are G_PARAM_WRITABLE. Fixes active brush,
pattern etc. deserialization.
2003-03-27 Christian Rose <menthos@menthos.com> 2003-03-27 Christian Rose <menthos@menthos.com>
* configure.in: Added "yi" to ALL_LINGUAS again. Po files for * configure.in: Added "yi" to ALL_LINGUAS again. Po files for

View File

@ -159,8 +159,8 @@ gimp_config_deserialize_properties (GObject *object,
next = g_scanner_peek_next_token (scanner); next = g_scanner_peek_next_token (scanner);
if (next != token && if (next != token &&
! (store_unknown_tokens && ! (store_unknown_tokens &&
token == G_TOKEN_SYMBOL && next == G_TOKEN_IDENTIFIER)) token == G_TOKEN_SYMBOL && next == G_TOKEN_IDENTIFIER))
{ {
break; break;
} }
@ -301,7 +301,8 @@ gimp_config_deserialize_property (GObject *object,
if (token == G_TOKEN_RIGHT_PAREN && if (token == G_TOKEN_RIGHT_PAREN &&
g_scanner_peek_next_token (scanner) == token) g_scanner_peek_next_token (scanner) == token)
{ {
if (!G_VALUE_HOLDS_OBJECT (&value)) if (!G_VALUE_HOLDS_OBJECT (&value) ||
prop_spec->flags & G_PARAM_WRITABLE)
g_object_set_property (object, prop_spec->name, &value); g_object_set_property (object, prop_spec->name, &value);
} }
#if CONFIG_DEBUG #if CONFIG_DEBUG

View File

@ -159,8 +159,8 @@ gimp_config_deserialize_properties (GObject *object,
next = g_scanner_peek_next_token (scanner); next = g_scanner_peek_next_token (scanner);
if (next != token && if (next != token &&
! (store_unknown_tokens && ! (store_unknown_tokens &&
token == G_TOKEN_SYMBOL && next == G_TOKEN_IDENTIFIER)) token == G_TOKEN_SYMBOL && next == G_TOKEN_IDENTIFIER))
{ {
break; break;
} }
@ -301,7 +301,8 @@ gimp_config_deserialize_property (GObject *object,
if (token == G_TOKEN_RIGHT_PAREN && if (token == G_TOKEN_RIGHT_PAREN &&
g_scanner_peek_next_token (scanner) == token) g_scanner_peek_next_token (scanner) == token)
{ {
if (!G_VALUE_HOLDS_OBJECT (&value)) if (!G_VALUE_HOLDS_OBJECT (&value) ||
prop_spec->flags & G_PARAM_WRITABLE)
g_object_set_property (object, prop_spec->name, &value); g_object_set_property (object, prop_spec->name, &value);
} }
#if CONFIG_DEBUG #if CONFIG_DEBUG