[gimp] app: cosmetic cleanups in the new dynamics stuff in core/



commit 652c6756c4b64bc34627e321cef00c2c9603cda5
Author: Michael Natterer <mitch gimp org>
Date:   Mon Feb 22 08:52:32 2010 +0100

    app: cosmetic cleanups in the new dynamics stuff in core/

 app/core/core-enums.h         |    1 +
 app/core/gimpdynamics.c       |    8 +++-----
 app/core/gimpdynamics.h       |   10 +++++-----
 app/core/gimpdynamicsoutput.c |   21 ++++++++++++---------
 app/core/gimpdynamicsoutput.h |   34 +++++++++++++++++-----------------
 5 files changed, 38 insertions(+), 36 deletions(-)
---
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 868f8a0..b5ff217 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -583,6 +583,7 @@ typedef enum  /*< pdb-skip >*/
   GIMP_COLOR_PROFILE_POLICY_CONVERT /*< desc="Convert to RGB workspace" >*/
 } GimpColorProfilePolicy;
 
+
 #define GIMP_TYPE_DYNAMICS_OUTPUT_TYPE (gimp_dynamics_output_type_get_type ())
 
 GType gimp_dynamics_output_type_get_type (void) G_GNUC_CONST;
diff --git a/app/core/gimpdynamics.c b/app/core/gimpdynamics.c
index 2531e1a..9d1fb46 100644
--- a/app/core/gimpdynamics.c
+++ b/app/core/gimpdynamics.c
@@ -437,9 +437,9 @@ gimp_dynamics_get_output (GimpDynamics           *dynamics,
 /*  private functions  */
 
 static GimpDynamicsOutput *
-gimp_dynamics_create_output (GimpDynamics *dynamics,
-                             const gchar  *name,
-                             GimpDynamicsOutputType type)
+gimp_dynamics_create_output (GimpDynamics           *dynamics,
+                             const gchar            *name,
+                             GimpDynamicsOutputType  type)
 {
   GimpDynamicsOutput *output = gimp_dynamics_output_new (name, type);
 
@@ -457,5 +457,3 @@ gimp_dynamics_output_notify (GObject          *output,
 {
   g_object_notify (G_OBJECT (dynamics), gimp_object_get_name (output));
 }
-
-
diff --git a/app/core/gimpdynamics.h b/app/core/gimpdynamics.h
index acdef54..efcfa26 100644
--- a/app/core/gimpdynamics.h
+++ b/app/core/gimpdynamics.h
@@ -53,13 +53,13 @@ struct _GimpDynamicsClass
 };
 
 
-GType      gimp_dynamics_get_type     (void) G_GNUC_CONST;
+GType                gimp_dynamics_get_type     (void) G_GNUC_CONST;
 
-GimpData * gimp_dynamics_new          (const gchar  *name);
-GimpData * gimp_dynamics_get_standard (void);
+GimpData           * gimp_dynamics_new          (const gchar            *name);
+GimpData           * gimp_dynamics_get_standard (void);
 
+GimpDynamicsOutput * gimp_dynamics_get_output   (GimpDynamics           *dynamics,
+                                                 GimpDynamicsOutputType  type);
 
-GimpDynamicsOutput * gimp_dynamics_get_output (GimpDynamics           *dynamics,
-                                               GimpDynamicsOutputType  type_id);
 
 #endif  /*  __GIMP_DYNAMICS_H__  */
diff --git a/app/core/gimpdynamicsoutput.c b/app/core/gimpdynamicsoutput.c
index f9132cd..a72bc37 100644
--- a/app/core/gimpdynamicsoutput.c
+++ b/app/core/gimpdynamicsoutput.c
@@ -83,6 +83,14 @@ gimp_dynamics_output_class_init (GimpDynamicsOutputClass *klass)
   object_class->set_property = gimp_dynamics_output_set_property;
   object_class->get_property = gimp_dynamics_output_get_property;
 
+  g_object_class_install_property (object_class, PROP_TYPE,
+                                   g_param_spec_enum ("type", NULL,
+                                                      _("Output type"),
+                                                      GIMP_TYPE_DYNAMICS_OUTPUT_TYPE,
+                                                      GIMP_DYNAMICS_OUTPUT_OPACITY,
+                                                      GIMP_PARAM_READWRITE |
+                                                      G_PARAM_CONSTRUCT));
+
   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_PRESSURE,
                                     "use-pressure", NULL,
                                     DEFAULT_USE_PRESSURE,
@@ -112,14 +120,6 @@ gimp_dynamics_output_class_init (GimpDynamicsOutputClass *klass)
                                     "use-fade", NULL,
                                     DEFAULT_USE_FADE,
                                     GIMP_PARAM_STATIC_STRINGS);
-
-  g_object_class_install_property (object_class, PROP_TYPE,
-                                   g_param_spec_enum ("type", NULL,
-                                                      _("Output type"),
-                                                      GIMP_TYPE_DYNAMICS_OUTPUT_TYPE,
-                                                      GIMP_DYNAMICS_OUTPUT_OPACITY,
-                                                      GIMP_PARAM_READWRITE |
-                                                      G_PARAM_CONSTRUCT));
 }
 
 static void
@@ -161,6 +161,7 @@ gimp_dynamics_output_set_property (GObject      *object,
     case PROP_TYPE:
       output->type = g_value_get_enum (value);
       break;
+
     case PROP_USE_PRESSURE:
       output->use_pressure = g_value_get_boolean (value);
       break;
@@ -204,6 +205,7 @@ gimp_dynamics_output_get_property (GObject    *object,
     case PROP_TYPE:
       g_value_set_enum (value, output->type);
       break;
+
     case PROP_USE_PRESSURE:
       g_value_set_boolean (value, output->use_pressure);
       break;
@@ -238,7 +240,8 @@ gimp_dynamics_output_get_property (GObject    *object,
 /*  public functions  */
 
 GimpDynamicsOutput *
-gimp_dynamics_output_new (const gchar *name, GimpDynamicsOutputType type)
+gimp_dynamics_output_new (const gchar            *name,
+                          GimpDynamicsOutputType  type)
 {
   g_return_val_if_fail (name != NULL, NULL);
 
diff --git a/app/core/gimpdynamicsoutput.h b/app/core/gimpdynamicsoutput.h
index c703a0d..d807a50 100644
--- a/app/core/gimpdynamicsoutput.h
+++ b/app/core/gimpdynamicsoutput.h
@@ -34,23 +34,23 @@ typedef struct _GimpDynamicsOutputClass GimpDynamicsOutputClass;
 
 struct _GimpDynamicsOutput
 {
-  GimpObject parent_instance;
-
-  GimpDynamicsOutputType type;
-
-  gboolean   use_pressure;
-  gboolean   use_velocity;
-  gboolean   use_direction;
-  gboolean   use_tilt;
-  gboolean   use_random;
-  gboolean   use_fade;
-
-  GimpCurve *pressure_curve;
-  GimpCurve *velocity_curve;
-  GimpCurve *direction_curve;
-  GimpCurve *tilt_curve;
-  GimpCurve *random_curve;
-  GimpCurve *fade_curve;
+  GimpObject              parent_instance;
+
+  GimpDynamicsOutputType  type;
+
+  gboolean                use_pressure;
+  gboolean                use_velocity;
+  gboolean                use_direction;
+  gboolean                use_tilt;
+  gboolean                use_random;
+  gboolean                use_fade;
+
+  GimpCurve              *pressure_curve;
+  GimpCurve              *velocity_curve;
+  GimpCurve              *direction_curve;
+  GimpCurve              *tilt_curve;
+  GimpCurve              *random_curve;
+  GimpCurve              *fade_curve;
 };
 
 struct _GimpDynamicsOutputClass



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]