[gimp/gimp-2-10] app: some cosmetic cleanup in the guide code



commit f585cf94a0724d27cdadab446a8f148df93e0cc4
Author: Michael Natterer <mitch gimp org>
Date:   Sun Jul 15 15:51:40 2018 +0200

    app: some cosmetic cleanup in the guide code
    
    (cherry picked from commit e76eb736d45f76959a16902eeb20a733acacde50)

 app/core/gimpguide.c        | 25 ++++++++++++-------------
 app/core/gimpguide.h        | 10 ++++------
 app/core/gimpimage-guides.c |  6 +++---
 3 files changed, 19 insertions(+), 22 deletions(-)
---
diff --git a/app/core/gimpguide.c b/app/core/gimpguide.c
index fda6124301..33cd4895e5 100644
--- a/app/core/gimpguide.c
+++ b/app/core/gimpguide.c
@@ -90,7 +90,6 @@ gimp_guide_class_init (GimpGuideClass *klass)
                   gimp_marshal_VOID__VOID,
                   G_TYPE_NONE, 0);
 
-
   object_class->get_property = gimp_guide_get_property;
   object_class->set_property = gimp_guide_set_property;
 
@@ -135,10 +134,10 @@ gimp_guide_init (GimpGuide *guide)
 }
 
 static void
-gimp_guide_get_property (GObject      *object,
-                         guint         property_id,
-                         GValue       *value,
-                         GParamSpec   *pspec)
+gimp_guide_get_property (GObject    *object,
+                         guint       property_id,
+                         GValue     *value,
+                         GParamSpec *pspec)
 {
   GimpGuide *guide = GIMP_GUIDE (object);
 
@@ -241,6 +240,14 @@ gimp_guide_get_ID (GimpGuide *guide)
   return guide->priv->guide_ID;
 }
 
+void
+gimp_guide_removed (GimpGuide *guide)
+{
+  g_return_if_fail (GIMP_IS_GUIDE (guide));
+
+  g_signal_emit (guide, gimp_guide_signals[REMOVED], 0);
+}
+
 GimpOrientationType
 gimp_guide_get_orientation (GimpGuide *guide)
 {
@@ -279,14 +286,6 @@ gimp_guide_set_position (GimpGuide *guide,
   g_object_notify (G_OBJECT (guide), "position");
 }
 
-void
-gimp_guide_removed (GimpGuide *guide)
-{
-  g_return_if_fail (GIMP_IS_GUIDE (guide));
-
-  g_signal_emit (guide, gimp_guide_signals[REMOVED], 0);
-}
-
 GimpGuideStyle
 gimp_guide_get_style (GimpGuide *guide)
 {
diff --git a/app/core/gimpguide.h b/app/core/gimpguide.h
index 3e7b3a8c8e..05e7824edf 100644
--- a/app/core/gimpguide.h
+++ b/app/core/gimpguide.h
@@ -22,9 +22,6 @@
 #define __GIMP_GUIDE_H__
 
 
-#include "gimpobject.h"
-
-
 #define GIMP_GUIDE_POSITION_UNDEFINED G_MININT
 
 
@@ -48,10 +45,10 @@ struct _GimpGuide
 
 struct _GimpGuideClass
 {
-  GObjectClass      parent_class;
+  GObjectClass  parent_class;
 
   /*  signals  */
-  void (* removed) (GimpGuide  *guide);
+  void (* removed) (GimpGuide *guide);
 };
 
 
@@ -65,6 +62,8 @@ GimpGuide *         gimp_guide_custom_new       (GimpOrientationType  orientatio
 
 guint32             gimp_guide_get_ID           (GimpGuide           *guide);
 
+void                gimp_guide_removed          (GimpGuide           *guide);
+
 GimpOrientationType gimp_guide_get_orientation  (GimpGuide           *guide);
 void                gimp_guide_set_orientation  (GimpGuide           *guide,
                                                  GimpOrientationType  orientation);
@@ -72,7 +71,6 @@ void                gimp_guide_set_orientation  (GimpGuide           *guide,
 gint                gimp_guide_get_position     (GimpGuide           *guide);
 void                gimp_guide_set_position     (GimpGuide           *guide,
                                                  gint                 position);
-void                gimp_guide_removed          (GimpGuide           *guide);
 
 GimpGuideStyle      gimp_guide_get_style        (GimpGuide           *guide);
 gboolean            gimp_guide_is_custom        (GimpGuide           *guide);
diff --git a/app/core/gimpimage-guides.c b/app/core/gimpimage-guides.c
index 8d3433cc4c..370d64e3a9 100644
--- a/app/core/gimpimage-guides.c
+++ b/app/core/gimpimage-guides.c
@@ -77,7 +77,7 @@ gimp_image_add_vguide (GimpImage *image,
                                 C_("undo-type", "Add Vertical Guide"), guide);
 
   gimp_image_add_guide (image, guide, position);
-  g_object_unref (G_OBJECT (guide));
+  g_object_unref (guide);
 
   return guide;
 }
@@ -97,7 +97,7 @@ gimp_image_add_guide (GimpImage *image,
   private->guides = g_list_prepend (private->guides, guide);
 
   gimp_guide_set_position (guide, position);
-  g_object_ref (G_OBJECT (guide));
+  g_object_ref (guide);
 
   gimp_image_guide_added (image, guide);
 }
@@ -126,7 +126,7 @@ gimp_image_remove_guide (GimpImage *image,
   gimp_image_guide_removed (image, guide);
 
   gimp_guide_set_position (guide, GIMP_GUIDE_POSITION_UNDEFINED);
-  g_object_unref (G_OBJECT (guide));
+  g_object_unref (guide);
 }
 
 void


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