[gimp] app: clean up dynamics duplicate implementation
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: clean up dynamics duplicate implementation
- Date: Thu, 3 Feb 2011 18:48:23 +0000 (UTC)
commit f8e8952147479438edd4fd634036ebc473546b00
Author: Michael Natterer <mitch gimp org>
Date: Thu Feb 3 19:46:58 2011 +0100
app: clean up dynamics duplicate implementation
app/core/gimpdynamics.c | 29 ++++++++++++-----------------
1 files changed, 12 insertions(+), 17 deletions(-)
---
diff --git a/app/core/gimpdynamics.c b/app/core/gimpdynamics.c
index 0f0a3bd..02347b2 100644
--- a/app/core/gimpdynamics.c
+++ b/app/core/gimpdynamics.c
@@ -70,6 +70,7 @@ static void
GParamSpec **pspecs);
static const gchar * gimp_dynamics_get_extension (GimpData *data);
+static GimpData * gimp_dynamics_duplicate (GimpData *data);
static GimpDynamicsOutput *
gimp_dynamics_create_output (GimpDynamics *dynamics,
@@ -79,7 +80,6 @@ static void gimp_dynamics_output_notify (GObject *output,
const GParamSpec *pspec,
GimpDynamics *dynamics);
-static GimpData * gimp_dynamics_duplicate (GimpData *data);
G_DEFINE_TYPE (GimpDynamics, gimp_dynamics,
@@ -398,6 +398,17 @@ gimp_dynamics_get_extension (GimpData *data)
return GIMP_DYNAMICS_FILE_EXTENSION;
}
+static GimpData *
+gimp_dynamics_duplicate (GimpData *data)
+{
+ GimpData *dest = g_object_new (GIMP_TYPE_DYNAMICS, NULL);
+
+ gimp_config_copy (GIMP_CONFIG (data),
+ GIMP_CONFIG (dest), 0);
+
+ return GIMP_DATA (dest);
+}
+
/* public functions */
@@ -443,7 +454,6 @@ gimp_dynamics_get_output (GimpDynamics *dynamics,
return dynamics->opacity_output;
break;
-
case GIMP_DYNAMICS_OUTPUT_FORCE:
return dynamics->force_output;
break;
@@ -514,18 +524,3 @@ gimp_dynamics_output_notify (GObject *output,
{
g_object_notify (G_OBJECT (dynamics), gimp_object_get_name (output));
}
-
-static GimpData *
-gimp_dynamics_duplicate (GimpData *data)
-{
-
- GimpData *dest;
-
- dest = gimp_dynamics_new (NULL, gimp_object_get_name (GIMP_DYNAMICS(data)));
-
- gimp_config_copy (GIMP_CONFIG (data),
- GIMP_CONFIG (dest),
- GIMP_CONFIG_PARAM_SERIALIZE);
-
- return GIMP_DATA(dest);
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]