[gimp] app: some random tool cleanup



commit ea34b145e8cc83bdd9ae1780d886ad067eb6eae1
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 4 00:01:30 2011 +0200

    app: some random tool cleanup

 app/tools/gimpairbrushtool.c           |    2 +-
 app/tools/gimpaligntool.c              |    4 ++--
 app/tools/gimpblendtool.c              |    2 --
 app/tools/gimpbrightnesscontrasttool.c |    1 -
 app/tools/gimpbrushtool.c              |    6 +++---
 app/tools/gimpbycolorselecttool.c      |    4 ++--
 app/tools/gimpcagetool.h               |    1 -
 app/tools/gimpcolortool.c              |    2 +-
 8 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/app/tools/gimpairbrushtool.c b/app/tools/gimpairbrushtool.c
index f738a41..2dc2e72 100644
--- a/app/tools/gimpairbrushtool.c
+++ b/app/tools/gimpairbrushtool.c
@@ -35,7 +35,7 @@
 #include "gimp-intl.h"
 
 
-static GtkWidget * gimp_airbrush_options_gui (GimpToolOptions  *tool_options);
+static GtkWidget * gimp_airbrush_options_gui (GimpToolOptions *tool_options);
 
 
 G_DEFINE_TYPE (GimpAirbrushTool, gimp_airbrush_tool, GIMP_TYPE_PAINTBRUSH_TOOL)
diff --git a/app/tools/gimpaligntool.c b/app/tools/gimpaligntool.c
index c94e3fc..b0ba284 100644
--- a/app/tools/gimpaligntool.c
+++ b/app/tools/gimpaligntool.c
@@ -154,12 +154,12 @@ gimp_align_tool_init (GimpAlignTool *align_tool)
 {
   GimpTool *tool = GIMP_TOOL (align_tool);
 
-  align_tool->function = ALIGN_TOOL_IDLE;
-
   gimp_tool_control_set_snap_to     (tool->control, FALSE);
   gimp_tool_control_set_precision   (tool->control,
                                      GIMP_CURSOR_PRECISION_PIXEL_BORDER);
   gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_MOVE);
+
+  align_tool->function = ALIGN_TOOL_IDLE;
 }
 
 static void
diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c
index f1ce1c8..65bbe60 100644
--- a/app/tools/gimpblendtool.c
+++ b/app/tools/gimpblendtool.c
@@ -138,8 +138,6 @@ gimp_blend_tool_init (GimpBlendTool *blend_tool)
   gimp_tool_control_set_scroll_lock     (tool->control, TRUE);
   gimp_tool_control_set_precision       (tool->control,
                                          GIMP_CURSOR_PRECISION_SUBPIXEL);
-  gimp_tool_control_set_cursor          (tool->control,
-                                         GIMP_CURSOR_MOUSE);
   gimp_tool_control_set_tool_cursor     (tool->control,
                                          GIMP_TOOL_CURSOR_BLEND);
   gimp_tool_control_set_action_value_1  (tool->control,
diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c
index d8b3a79..be60f12 100644
--- a/app/tools/gimpbrightnesscontrasttool.c
+++ b/app/tools/gimpbrightnesscontrasttool.c
@@ -223,7 +223,6 @@ gimp_brightness_contrast_tool_map (GimpImageMapTool *im_tool)
                                  gimp_drawable_bytes (im_tool->drawable));
 }
 
-
 static void
 gimp_brightness_contrast_tool_button_press (GimpTool            *tool,
                                             const GimpCoords    *coords,
diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c
index b724dd3..f47f764 100644
--- a/app/tools/gimpbrushtool.c
+++ b/app/tools/gimpbrushtool.c
@@ -147,9 +147,9 @@ gimp_brush_tool_constructed (GObject *object)
                            G_CALLBACK (gimp_brush_tool_brush_changed),
                            brush_tool, 0);
 
-  g_signal_connect (paint_tool->core, "set-brush",
-                    G_CALLBACK (gimp_brush_tool_set_brush),
-                    brush_tool);
+  g_signal_connect_object (paint_tool->core, "set-brush",
+                           G_CALLBACK (gimp_brush_tool_set_brush),
+                           brush_tool, 0);
 }
 
 static void
diff --git a/app/tools/gimpbycolorselecttool.c b/app/tools/gimpbycolorselecttool.c
index 88ca30e..13ec589 100644
--- a/app/tools/gimpbycolorselecttool.c
+++ b/app/tools/gimpbycolorselecttool.c
@@ -133,6 +133,6 @@ gimp_by_color_select_tool_get_mask (GimpRegionSelectTool *region_select,
                                                   options->select_transparent,
                                                   options->select_criterion,
                                                   &color);
-  else
-    return NULL;
+
+  return NULL;
 }
diff --git a/app/tools/gimpcagetool.h b/app/tools/gimpcagetool.h
index 4e0e8bf..49d6ba4 100644
--- a/app/tools/gimpcagetool.h
+++ b/app/tools/gimpcagetool.h
@@ -22,7 +22,6 @@
 
 
 #include "gimpdrawtool.h"
-#include "libgimpmath/gimpvector.h"
 
 
 #define GIMP_TYPE_CAGE_TOOL            (gimp_cage_tool_get_type ())
diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c
index bf9abef..2f1e9d3 100644
--- a/app/tools/gimpcolortool.c
+++ b/app/tools/gimpcolortool.c
@@ -790,7 +790,7 @@ gimp_color_tool_start_sample_point (GimpTool    *tool,
   gimp_tool_control_activate (tool->control);
   gimp_tool_control_set_scroll_lock (tool->control, TRUE);
 
-  if (gimp_draw_tool_is_active  (GIMP_DRAW_TOOL (tool)))
+  if (gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tool)))
     gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
 
   color_tool->sample_point        = NULL;



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