[gimp/soc-2010-cage-2] app: Generic cage cleanup



commit 1ae2ad856619831b6332ffebf74e01b47fed76d6
Author: Alexia Death <alexiadeath gmail com>
Date:   Tue Nov 2 21:28:01 2010 +0200

    app: Generic cage cleanup

 app/gegl/gimpcageconfig.c             |   15 ++++++---------
 app/gegl/gimpoperationcagetransform.c |    2 --
 app/tools/gimpcageoptions.c           |    2 +-
 3 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/app/gegl/gimpcageconfig.c b/app/gegl/gimpcageconfig.c
index e9c3408..65ea2e8 100644
--- a/app/gegl/gimpcageconfig.c
+++ b/app/gegl/gimpcageconfig.c
@@ -61,7 +61,9 @@ static void       gimp_cage_config_set_property               (GObject      *obj
 static void       gimp_cage_config_compute_scaling_factor     (GimpCageConfig *gcc);
 static void       gimp_cage_config_compute_edge_normal        (GimpCageConfig *gcc);
 
-/* FIXME: to debug only */
+/*#define DEBUG_CAGE */
+
+#ifdef DEBUG_CAGE
 static void
 print_cage (GimpCageConfig *gcc)
 {
@@ -78,7 +80,7 @@ print_cage (GimpCageConfig *gcc)
   printf("bounding box: x: %d  y: %d  width: %d  height: %d\n", bounding_box.x, bounding_box.y, bounding_box.width, bounding_box.height);
   printf("done\n");
 }
-
+#endif
 
 static void
 gimp_cage_config_class_init (GimpCageConfigClass *klass)
@@ -122,7 +124,6 @@ gimp_cage_config_get_property (GObject    *object,
                                GValue     *value,
                                GParamSpec *pspec)
 {
-  /* GimpCageConfig *gcc = GIMP_CAGE_CONFIG (object); */
 
   switch (property_id)
     {
@@ -139,7 +140,6 @@ gimp_cage_config_set_property (GObject      *object,
                                const GValue *value,
                                GParamSpec   *pspec)
 {
-  /* GimpCageConfig *gcc = GIMP_CAGE_CONFIG (object); */
 
   switch (property_id)
     {
@@ -330,11 +330,6 @@ gimp_cage_config_reverse_cage_if_needed (GimpCageConfig *gcc)
   if (sum > 0)
   {
     gimp_cage_config_reverse_cage (gcc);
-    printf("reverse the cage !\n");
-  }
-  else
-  {
-    printf("Cage OK !\n");
   }
 }
 
@@ -358,7 +353,9 @@ gimp_cage_config_compute_scaling_factor (GimpCageConfig *gcc)
     gcc->scaling_factor[i] = length_d / length;
   }
 
+#ifdef DEBUG_CAGE
   print_cage (gcc);
+#endif
 }
 
 static void
diff --git a/app/gegl/gimpoperationcagetransform.c b/app/gegl/gimpoperationcagetransform.c
index bcca9a0..5842294 100644
--- a/app/gegl/gimpoperationcagetransform.c
+++ b/app/gegl/gimpoperationcagetransform.c
@@ -218,8 +218,6 @@ gimp_operation_cage_transform_process (GeglOperation       *operation,
   plain_color.x = (gint) config->cage_vertices[0].x;
   plain_color.y = (gint) config->cage_vertices[0].y;
 
-  printf ("Color fill picked from (%f, %f)\n", plain_color.x, plain_color.y);
-
   while (gegl_buffer_iterator_next (it))
   {
     /* iterate inside the roi */
diff --git a/app/tools/gimpcageoptions.c b/app/tools/gimpcageoptions.c
index e32c1e8..98fa919 100644
--- a/app/tools/gimpcageoptions.c
+++ b/app/tools/gimpcageoptions.c
@@ -157,7 +157,7 @@ gimp_cage_options_gui (GimpToolOptions *tool_options)
 
 
   button = gimp_prop_check_button_new (config, "fill-plain-color",
-                                       _("Fill in background"));
+                                       _("Fill from first point"));
   gtk_box_pack_start (GTK_BOX (vbox),  button, FALSE, FALSE, 0);
   gtk_widget_show (button);
   



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