[gimp/soc-2009-dynamics] Some more cleanup



commit 26bda5a2e229539799a4982583afe5dfb19cb8b3
Author: Michael Natterer <mitch gimp org>
Date:   Sun Oct 11 00:19:14 2009 +0200

    Some more cleanup
    
    - move the GimpDynamics typedef to core-types.h
    - related changes
    - clean up gimpcontext.c

 app/core/core-types.h        |    1 +
 app/core/gimpcontext.c       |   15 +++++++--------
 app/core/gimpcontext.h       |    4 ++--
 app/core/gimpdynamics.h      |    6 ++----
 app/paint/gimppaintoptions.c |    4 +---
 5 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/app/core/core-types.h b/app/core/core-types.h
index c88aa63..8091d7c 100644
--- a/app/core/core-types.h
+++ b/app/core/core-types.h
@@ -98,6 +98,7 @@ typedef struct _GimpBrushClipboard   GimpBrushClipboard;
 typedef struct _GimpBrushGenerated   GimpBrushGenerated;
 typedef struct _GimpBrushPipe        GimpBrushPipe;
 typedef struct _GimpCurve            GimpCurve;
+typedef struct _GimpDynamics         GimpDynamics;
 typedef struct _GimpGradient         GimpGradient;
 typedef struct _GimpPalette          GimpPalette;
 typedef struct _GimpPattern          GimpPattern;
diff --git a/app/core/gimpcontext.c b/app/core/gimpcontext.c
index cdbcea9..63722e5 100644
--- a/app/core/gimpcontext.c
+++ b/app/core/gimpcontext.c
@@ -2484,7 +2484,6 @@ gimp_context_real_set_brush (GimpContext *context,
 /*****************************************************************************/
 /*  dynamics *****************************************************************/
 
-
 GimpDynamics *
 gimp_context_get_dynamics (GimpContext *context)
 {
@@ -2522,9 +2521,10 @@ gimp_context_dynamics_dirty (GimpDynamics *dynamics,
   context->dynamics_name = g_strdup (GIMP_DYNAMICS (dynamics)->name);
 }
 
-static void gimp_context_dynamics_removed (GimpContainer *container,
-                                           GimpDynamics  *dynamics,
-                                           GimpContext   *context)
+static void
+gimp_context_dynamics_removed (GimpContainer *container,
+                               GimpDynamics  *dynamics,
+                               GimpContext   *context)
 {
   if (dynamics == context->dynamics)
     {
@@ -2540,9 +2540,9 @@ static void gimp_context_dynamics_removed (GimpContainer *container,
     }
 }
 
-
-static void gimp_context_dynamics_list_thaw (GimpContainer *container,
-                                             GimpContext   *context)
+static void
+gimp_context_dynamics_list_thaw (GimpContainer *container,
+                                 GimpContext   *context)
 {
   GimpDynamics *dynamics;
   /*
@@ -2556,7 +2556,6 @@ static void gimp_context_dynamics_list_thaw (GimpContainer *container,
   gimp_context_real_set_dynamics (context, dynamics);
 }
 
-
 static void
 gimp_context_real_set_dynamics (GimpContext  *context,
                                 GimpDynamics *dynamics)
diff --git a/app/core/gimpcontext.h b/app/core/gimpcontext.h
index 6d9eddf..31d5f40 100644
--- a/app/core/gimpcontext.h
+++ b/app/core/gimpcontext.h
@@ -23,7 +23,7 @@
 
 
 #include "gimpobject.h"
-#include "gimpdynamics.h"
+
 
 #define GIMP_TYPE_CONTEXT            (gimp_context_get_type ())
 #define GIMP_CONTEXT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CONTEXT, GimpContext))
@@ -271,6 +271,7 @@ void            gimp_context_set_brush          (GimpContext     *context,
                                                  GimpBrush       *brush);
 void            gimp_context_brush_changed      (GimpContext     *context);
 
+
 /*  dynamics  */
 GimpDynamics  * gimp_context_get_dynamics       (GimpContext     *context);
 void            gimp_context_set_dynamics       (GimpContext     *context,
@@ -278,7 +279,6 @@ void            gimp_context_set_dynamics       (GimpContext     *context,
 void            gimp_context_dynamics_changed   (GimpContext     *context);
 
 
-
 /*  pattern  */
 GimpPattern   * gimp_context_get_pattern        (GimpContext     *context);
 void            gimp_context_set_pattern        (GimpContext     *context,
diff --git a/app/core/gimpdynamics.h b/app/core/gimpdynamics.h
index cc4b9af..87dbfb7 100644
--- a/app/core/gimpdynamics.h
+++ b/app/core/gimpdynamics.h
@@ -53,7 +53,7 @@ struct _GimpDynamicsOutput
 #define GIMP_DYNAMICS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DYNAMICS, GimpDynamicsClass))
 
 
-typedef struct _GimpDynamics GimpDynamics;
+typedef struct _GimpDynamicsClass GimpDynamicsClass;
 
 struct _GimpDynamics
 {
@@ -72,11 +72,9 @@ struct _GimpDynamics
 
 };
 
-typedef struct _GimpDynamicsClass GimpDynamicsClass;
-
 struct _GimpDynamicsClass
 {
-  GimpDataClass  parent_instance;
+  GimpDataClass  parent_class;
 };
 
 
diff --git a/app/paint/gimppaintoptions.c b/app/paint/gimppaintoptions.c
index d77db67..6e4fa01 100644
--- a/app/paint/gimppaintoptions.c
+++ b/app/paint/gimppaintoptions.c
@@ -27,6 +27,7 @@
 
 #include "core/gimp.h"
 #include "core/gimpimage.h"
+#include "core/gimpdynamics.h"
 #include "core/gimpgradient.h"
 #include "core/gimppaintinfo.h"
 
@@ -681,6 +682,3 @@ gimp_paint_options_get_brush_mode (GimpPaintOptions *paint_options)
 
   return GIMP_BRUSH_SOFT;
 }
-
-
-



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