mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
libgimpconfig: add GIMP_CONFIG_PARAM_DONT_COMPARE flag
... which excludes a property from comparison in the default implementation of GimpConfig::equal().
This commit is contained in:
parent
d25cddae8c
commit
c5c807d191
3 changed files with 14 additions and 4 deletions
|
@ -25,8 +25,8 @@
|
||||||
#include "gimpobject.h"
|
#include "gimpobject.h"
|
||||||
|
|
||||||
|
|
||||||
/* shift one more than GIMP_CONFIG_PARAM_IGNORE */
|
/* shift one more than GIMP_CONFIG_PARAM_DONT_COMPARE */
|
||||||
#define GIMP_SYMMETRY_PARAM_GUI (1 << (6 + G_PARAM_USER_SHIFT))
|
#define GIMP_SYMMETRY_PARAM_GUI (GIMP_CONFIG_PARAM_DONT_COMPARE << 1)
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_SYMMETRY (gimp_symmetry_get_type ())
|
#define GIMP_TYPE_SYMMETRY (gimp_symmetry_get_type ())
|
||||||
|
|
|
@ -220,8 +220,11 @@ gimp_config_iface_equal (GimpConfig *a,
|
||||||
|
|
||||||
prop_spec = property_specs[i];
|
prop_spec = property_specs[i];
|
||||||
|
|
||||||
if (! (prop_spec->flags & G_PARAM_READABLE))
|
if (! (prop_spec->flags & G_PARAM_READABLE) ||
|
||||||
continue;
|
(prop_spec->flags & GIMP_CONFIG_PARAM_DONT_COMPARE))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
g_value_init (&a_value, prop_spec->value_type);
|
g_value_init (&a_value, prop_spec->value_type);
|
||||||
g_value_init (&b_value, prop_spec->value_type);
|
g_value_init (&b_value, prop_spec->value_type);
|
||||||
|
|
|
@ -76,6 +76,13 @@ G_BEGIN_DECLS
|
||||||
**/
|
**/
|
||||||
#define GIMP_CONFIG_PARAM_IGNORE (1 << (5 + G_PARAM_USER_SHIFT))
|
#define GIMP_CONFIG_PARAM_IGNORE (1 << (5 + G_PARAM_USER_SHIFT))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GIMP_CONFIG_PARAM_DONT_COMPARE:
|
||||||
|
*
|
||||||
|
* Ignore this property when comparing objects.
|
||||||
|
**/
|
||||||
|
#define GIMP_CONFIG_PARAM_DONT_COMPARE (1 << (6 + G_PARAM_USER_SHIFT))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GIMP_CONFIG_PARAM_FLAGS:
|
* GIMP_CONFIG_PARAM_FLAGS:
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue