app: take the default value of GimpPDBContext::interpolation from gimprc

This commit is contained in:
Michael Natterer 2010-09-16 20:16:12 +02:00
parent 2643107912
commit 46e4fa93b2

View file

@ -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,