[gimp] app: implement GimpConfig::serialize() in GimpFillOptions
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: implement GimpConfig::serialize() in GimpFillOptions
- Date: Tue, 13 Sep 2016 22:28:29 +0000 (UTC)
commit 7daa7d080a722e87d35d30d7660fc3b0d2bfd894
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 14 00:27:31 2016 +0200
app: implement GimpConfig::serialize() in GimpFillOptions
so it doesn't inherit GimpContext's changed implementation.
app/core/gimpfilloptions.c | 40 +++++++++++++++++++++++++++++++---------
1 files changed, 31 insertions(+), 9 deletions(-)
---
diff --git a/app/core/gimpfilloptions.c b/app/core/gimpfilloptions.c
index 95366da..5a6c723 100644
--- a/app/core/gimpfilloptions.c
+++ b/app/core/gimpfilloptions.c
@@ -74,17 +74,25 @@ struct _GimpFillOptionsPrivate
GimpFillOptionsPrivate)
-static void gimp_fill_options_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gimp_fill_options_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
+static void gimp_fill_options_config_init (GimpConfigInterface *iface);
+static void gimp_fill_options_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_fill_options_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
-G_DEFINE_TYPE (GimpFillOptions, gimp_fill_options, GIMP_TYPE_CONTEXT)
+static gboolean gimp_fill_options_serialize (GimpConfig *config,
+ GimpConfigWriter *writer,
+ gpointer data);
+
+
+G_DEFINE_TYPE_WITH_CODE (GimpFillOptions, gimp_fill_options, GIMP_TYPE_CONTEXT,
+ G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
+ gimp_fill_options_config_init))
static void
@@ -131,6 +139,12 @@ gimp_fill_options_class_init (GimpFillOptionsClass *klass)
}
static void
+gimp_fill_options_config_init (GimpConfigInterface *iface)
+{
+ iface->serialize = gimp_fill_options_serialize;
+}
+
+static void
gimp_fill_options_init (GimpFillOptions *options)
{
}
@@ -196,6 +210,14 @@ gimp_fill_options_get_property (GObject *object,
}
}
+static gboolean
+gimp_fill_options_serialize (GimpConfig *config,
+ GimpConfigWriter *writer,
+ gpointer data)
+{
+ return gimp_config_serialize_properties (config, writer);
+}
+
/* public functions */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]