mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 03:52:33 +00:00
app: take the default value of GimpPDBContext::interpolation from gimprc
This commit is contained in:
parent
2643107912
commit
46e4fa93b2
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "pdb-types.h"
|
||||
|
||||
#include "config/gimpcoreconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "gimppdbcontext.h"
|
||||
|
@ -46,6 +48,7 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_pdb_context_constructed (GObject *object);
|
||||
static void gimp_pdb_context_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -66,6 +69,7 @@ gimp_pdb_context_class_init (GimpPDBContextClass *klass)
|
|||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->constructed = gimp_pdb_context_constructed;
|
||||
object_class->set_property = gimp_pdb_context_set_property;
|
||||
object_class->get_property = gimp_pdb_context_get_property;
|
||||
|
||||
|
@ -119,6 +123,26 @@ gimp_pdb_context_init (GimpPDBContext *options)
|
|||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_pdb_context_constructed (GObject *object)
|
||||
{
|
||||
GimpInterpolationType interpolation;
|
||||
GParamSpec *pspec;
|
||||
|
||||
interpolation = GIMP_CONTEXT (object)->gimp->config->interpolation_type;
|
||||
|
||||
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object),
|
||||
"interpolation");
|
||||
|
||||
if (pspec)
|
||||
G_PARAM_SPEC_ENUM (pspec)->default_value = interpolation;
|
||||
|
||||
g_object_set (object, "interpolation", interpolation, NULL);
|
||||
|
||||
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_pdb_context_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
|
Loading…
Reference in a new issue