Commit 974a7400 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

remove useless includes. Some minor cleanup.

2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: remove useless includes. Some minor cleanup.


svn path=/trunk/; revision=22083
parent 101d1b65
2007-03-09 Michael Natterer <mitch@gimp.org>
* app/tools/*.c: remove useless includes. Some minor cleanup.
2007-03-09 Sven Neumann <sven@gimp.org>
* app/base/pixel-surround.c: replaced inner loop by a call to memcpy.
......@@ -25,7 +25,6 @@
#include "tools-types.h"
#include "core/gimp.h"
#include "core/gimpdatafactory.h"
#include "widgets/gimppropwidgets.h"
......
......@@ -22,12 +22,10 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "core/gimp.h"
#include "core/gimpdrawable.h"
#include "core/gimpdrawable-blend.h"
#include "core/gimpgradient.h"
......
......@@ -20,8 +20,6 @@
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......
......@@ -20,8 +20,6 @@
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......
......@@ -21,19 +21,15 @@
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "core/gimp.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "widgets/gimpcolorframe.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h"
......
......@@ -207,15 +207,15 @@ gimp_color_tool_control (GimpTool *tool,
case GIMP_TOOL_ACTION_RESUME:
if (color_tool->sample_point &&
gimp_display_shell_get_show_sample_points (GIMP_DISPLAY_SHELL (shell)))
gimp_display_shell_draw_sample_point (GIMP_DISPLAY_SHELL (shell),
gimp_display_shell_get_show_sample_points (shell))
gimp_display_shell_draw_sample_point (shell,
color_tool->sample_point, TRUE);
break;
case GIMP_TOOL_ACTION_HALT:
if (color_tool->sample_point &&
gimp_display_shell_get_show_sample_points (GIMP_DISPLAY_SHELL (shell)))
gimp_display_shell_draw_sample_point (GIMP_DISPLAY_SHELL (shell),
gimp_display_shell_get_show_sample_points (shell))
gimp_display_shell_draw_sample_point (shell,
color_tool->sample_point, FALSE);
break;
}
......
......@@ -20,8 +20,6 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "tools-types.h"
#include "base/boundary.h"
......@@ -856,7 +854,7 @@ gimp_draw_tool_draw_corner (GimpDrawTool *draw_tool,
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
g_return_if_fail (width > 2 && height > 2);
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
canvas = GIMP_CANVAS (shell->canvas);
gimp_display_shell_transform_xy (shell, x1, y1, &tx1, &ty1, use_offsets);
......
......@@ -24,10 +24,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "base/boundary.h"
......@@ -117,15 +113,11 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_selection_tool)
static void
gimp_edit_selection_tool_calc_coords (GimpEditSelectionTool *edit_select,
GimpDisplay *display,
gdouble x,
gdouble y)
{
GimpDisplayShell *shell;
gdouble x1, y1;
gdouble dx, dy;
shell = GIMP_DISPLAY_SHELL (display->shell);
gdouble x1, y1;
gdouble dx, dy;
dx = x - edit_select->origx;
dy = y - edit_select->origy;
......@@ -257,7 +249,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
&edit_select->x2, &edit_select->y2);
}
gimp_edit_selection_tool_calc_coords (edit_select, display,
gimp_edit_selection_tool_calc_coords (edit_select,
edit_select->origx,
edit_select->origy);
......@@ -432,7 +424,7 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
else
active_item = GIMP_ITEM (gimp_image_active_drawable (display->image));
gimp_edit_selection_tool_calc_coords (edit_select, display,
gimp_edit_selection_tool_calc_coords (edit_select,
coords->x,
coords->y);
......@@ -553,7 +545,7 @@ gimp_edit_selection_tool_motion (GimpTool *tool,
/* now do the actual move. */
gimp_edit_selection_tool_calc_coords (edit_select, display,
gimp_edit_selection_tool_calc_coords (edit_select,
motion_x,
motion_y);
......
......@@ -18,15 +18,12 @@
#include "config.h"
#include <stdlib.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "core/gimpchannel.h"
#include "core/gimpchannel-select.h"
#include "core/gimpimage.h"
......
......@@ -24,13 +24,9 @@
#include "tools-types.h"
#include "paint/gimpheal.h"
#include "paint/gimpsourceoptions.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h"
#include "gimphealtool.h"
#include "gimppaintoptions-gui.h"
......
......@@ -89,6 +89,7 @@ gimp_histogram_options_set_property (GObject *object,
case PROP_SCALE:
options->scale = g_value_get_enum (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -108,6 +109,8 @@ gimp_histogram_options_get_property (GObject *object,
case PROP_SCALE:
g_value_set_enum (value, options->scale);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
......
......@@ -21,7 +21,6 @@
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......@@ -581,4 +580,3 @@ hue_saturation_overlap_adjustment_update (GtkAdjustment *adjustment,
gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (hs_tool));
}
}
......@@ -41,7 +41,6 @@
#include "core/gimptoolinfo.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h"
......
......@@ -70,7 +70,7 @@ gimp_ink_tool_init (GimpInkTool *ink_tool)
{
GimpTool *tool = GIMP_TOOL (ink_tool);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_INK);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_INK);
gimp_tool_control_set_action_value_2 (tool->control,
"tools/tools-ink-blob-size-set");
gimp_tool_control_set_action_value_3 (tool->control,
......
......@@ -21,15 +21,11 @@
#include <stdlib.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "config/gimpdisplayconfig.h"
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "display/gimpdisplay.h"
......@@ -37,7 +33,6 @@
#include "display/gimpdisplayshell-scale.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimpmagnifyoptions.h"
#include "gimpmagnifytool.h"
......@@ -166,11 +161,9 @@ gimp_magnify_tool_button_release (GimpTool *tool,
{
GimpMagnifyTool *magnify = GIMP_MAGNIFY_TOOL (tool);
GimpMagnifyOptions *options = GIMP_MAGNIFY_TOOL_GET_OPTIONS (tool);
GimpDisplayShell *shell;
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (tool->display->shell);
gdouble current;
shell = GIMP_DISPLAY_SHELL (tool->display->shell);
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
gimp_tool_control_halt (tool->control);
......
......@@ -26,7 +26,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......@@ -39,7 +38,6 @@
#include "widgets/gimphelp-ids.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h"
......@@ -184,11 +182,9 @@ gimp_measure_tool_button_press (GimpTool *tool,
{
GimpMeasureTool *measure = GIMP_MEASURE_TOOL (tool);
GimpMeasureOptions *options = GIMP_MEASURE_TOOL_GET_OPTIONS (tool);
GimpDisplayShell *shell;
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
gint i;
shell = GIMP_DISPLAY_SHELL (display->shell);
/* if we are changing displays, pop the statusbar of the old one */
if (gimp_tool_control_is_active (tool->control) && display != tool->display)
{
......
......@@ -39,6 +39,8 @@
#include "core/gimpitem.h"
#include "core/gimpundostack.h"
#include "widgets/gimphelp-ids.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-appearance.h"
......@@ -46,8 +48,6 @@
#include "display/gimpdisplayshell-selection.h"
#include "display/gimpdisplayshell-transform.h"
#include "widgets/gimphelp-ids.h"
#include "gimpeditselectiontool.h"
#include "gimpmoveoptions.h"
#include "gimpmovetool.h"
......@@ -55,6 +55,7 @@
#include "gimp-intl.h"
#define ARROW_VELOCITY 25
#define SWAP_ORIENT(orient) ((orient) == GIMP_ORIENTATION_HORIZONTAL ? \
......@@ -62,7 +63,6 @@
GIMP_ORIENTATION_HORIZONTAL)
/* local function prototypes */
static void gimp_move_tool_control (GimpTool *tool,
......@@ -186,17 +186,13 @@ gimp_move_tool_control (GimpTool *tool,
break;
case GIMP_TOOL_ACTION_RESUME:
if (move->guide &&
gimp_display_shell_get_show_guides (GIMP_DISPLAY_SHELL (shell)))
gimp_display_shell_draw_guide (GIMP_DISPLAY_SHELL (shell),
move->guide, TRUE);
if (move->guide && gimp_display_shell_get_show_guides (shell))
gimp_display_shell_draw_guide (shell, move->guide, TRUE);
break;
case GIMP_TOOL_ACTION_HALT:
if (move->guide &&
gimp_display_shell_get_show_guides (GIMP_DISPLAY_SHELL (shell)))
gimp_display_shell_draw_guide (GIMP_DISPLAY_SHELL (shell),
move->guide, FALSE);
if (move->guide && gimp_display_shell_get_show_guides (shell))
gimp_display_shell_draw_guide (shell, move->guide, FALSE);
break;
}
......
......@@ -20,13 +20,10 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "core/gimp.h"
#include "core/gimptoolinfo.h"
#include "paint/gimppaintoptions.h"
......@@ -42,11 +39,9 @@
#include "gimpclonetool.h"
#include "gimpconvolvetool.h"
#include "gimpdodgeburntool.h"
#include "gimpdodgeburntool.h"
#include "gimperasertool.h"
#include "gimphealtool.h"
#include "gimpinktool.h"
#include "gimppaintbrushtool.h"
#include "gimppaintoptions-gui.h"
#include "gimppenciltool.h"
#include "gimpperspectiveclonetool.h"
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "tools-types.h"
......
......@@ -20,7 +20,6 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......
......@@ -20,7 +20,6 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
......
......@@ -33,7 +33,6 @@
#include "core/gimpimage-undo.h"
#include "core/gimppickable.h"
#include "core/gimp-utils.h"
#include "core/gimpundo.h"
#include "core/gimpundostack.h"
#include "widgets/gimpdialogfactory.h"
......@@ -41,7 +40,6 @@
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpcanvas.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-transform.h"
......
......@@ -34,7 +34,6 @@
#include "core/gimppickable.h"
#include "core/gimpmarshal.h"
#include "display/gimpcanvas.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-transform.h"
......
......@@ -24,8 +24,6 @@
#include "libgimpwidgets/gimpwidgets.h"
#include "libgimpmath/gimpmath.h"
#include "tools-types.h"
#include "base/boundary.h"
......@@ -345,14 +343,12 @@ gimp_region_select_tool_calculate (GimpRegionSelectTool *region_sel,
{
GimpTool *tool = GIMP_TOOL (region_sel);
GimpSelectionOptions *options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
GimpDisplayShell *shell;
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
GimpDrawable *drawable;
GdkSegment *segs;
BoundSeg *bsegs;
PixelRegion maskPR;
shell = GIMP_DISPLAY_SHELL (display->shell);
drawable = gimp_image_active_drawable (display->image);
gimp_display_shell_set_override_cursor (shell, GDK_WATCH);
......
......@@ -20,14 +20,12 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "core/gimp-transform-utils.h"
#include "core/gimpimage.h"
#include "core/gimpdrawable-transform.h"
#include "widgets/gimphelp-ids.h"
......
......@@ -22,8 +22,6 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......
......@@ -20,7 +20,6 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
......
......@@ -21,7 +21,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......
......@@ -22,19 +22,14 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "core/gimp-transform-utils.h"
#include "core/gimpimage.h"
#include "core/gimpdrawable-transform.h"
#include "widgets/gimphelp-ids.h"
#include "display/gimpdisplay.h"
#include "gimpsheartool.h"
#include "gimptoolcontrol.h"
#include "gimptransformoptions.h"
......
......@@ -27,7 +27,6 @@
#include "paint/gimpsmudgeoptions.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimpsmudgetool.h"
#include "gimppaintoptions-gui.h"
......
......@@ -21,7 +21,6 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpcolor/gimpcolor.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
......
......@@ -28,7 +28,6 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
......@@ -42,7 +41,6 @@
#include "core/gimplayer-floating-sel.h"
#include "core/gimplist.h"
#include "core/gimptoolinfo.h"
#include "core/gimpundo.h"
#include "core/gimpundostack.h"
#include "text/gimptext.h"
......@@ -50,13 +48,13 @@
#include "text/gimptextlayer.h"
#include "text/gimptextundo.h"
#include "vectors/gimpvectors-warp.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimptexteditor.h"
#include "widgets/gimpviewabledialog.h"
#include "vectors/gimpvectors-warp.h"
#include "display/gimpdisplay.h"
#include "gimpeditselectiontool.h"
......
......@@ -20,7 +20,6 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
......
......@@ -23,7 +23,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
......@@ -33,7 +32,6 @@
#include "base/tile-manager.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable-transform.h"
#include "core/gimpimage.h"
......@@ -51,7 +49,6 @@
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
......
......@@ -24,7 +24,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
......@@ -38,7 +37,6 @@
#include "core/gimplist.h"
#include "core/gimpprogress.h"
#include "core/gimptoolinfo.h"
#include "core/gimpundo.h"
#include "core/gimpundostack.h"
#include "vectors/gimpanchor.h"
......