Commit 80a8d5a7 authored by Nate Summers's avatar Nate Summers

Introduced GimpPaintTool and GimpDrawTool

parent 2fd2a4e6
2001-02-26 Nathan Summers <rock@gimp.org>
app/tools/gimpdrawtool.c
* app/tools/gimpdrawtool.h
* app/tools/gimppainttool.c
* app/tools/gimppainttool.h
* app/tools/gimppainttool_kernels.h: Created GimpDrawTool and
GimpPaintTool, real classes that replace the old DrawCore and
PaintCore
* app/Makefile.am
* app/apptypes.h
* app/context_manager.c
* app/gdisplay.c
* app/gimage_mask.c
* app/gimpbrush.c
* app/gimpbrush.h
* app/gimpbrushgenerated.c
* app/gimpbrushpipe.c
* app/gimpcontext.c
* app/info_window.c
* app/path_transform.h
* app/undo.c
* app/pdb/tools_cmds.c
* app/tools/Makefile.am
* app/tools/bezier_selectP.h
* app/tools/gimptoolinfo.c
* app/tools/measure.c
* app/tools/measure.h
* app/tools/move.c
* app/tools/paint_options.c
* app/tools/tool.c
* app/tools/tool.h
* app/tools/tools.c
* app/tools/transform_core.h
* tools/pdbgen/Makefile.am: changed accordingly
* libgimp/Makefile.am: fixed glitch in build
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcolorpickertool.h
* app/tools/gimppaintbrushtool.c
* app/tools/gimppaintbrushtool.h:new names
* app/draw_core.c
* app/draw_core.h
* app/tools/color_picker.c
* app/tools/color_picker.h
* app/tools/paint_core.c
* app/tools/paint_core.h
* app/tools/paint_core_kernels.h
* app/tools/paintbrush.c
* app/tools/paintbrush.h: removed
2001-02-25 Michael Natterer <mitch@gimp.org> 2001-02-25 Michael Natterer <mitch@gimp.org>
* app/channel_ops.c * app/channel_ops.c
......
...@@ -72,8 +72,6 @@ gimp_SOURCES = \ ...@@ -72,8 +72,6 @@ gimp_SOURCES = \
disp_callbacks.h \ disp_callbacks.h \
docindex.c \ docindex.c \
docindex.h \ docindex.h \
draw_core.c \
draw_core.h \
drawable.c \ drawable.c \
drawable.h \ drawable.h \
errorconsole.c \ errorconsole.c \
......
...@@ -111,7 +111,7 @@ typedef struct _BoundSeg BoundSeg; ...@@ -111,7 +111,7 @@ typedef struct _BoundSeg BoundSeg;
typedef struct _ColorNotebook ColorNotebook; typedef struct _ColorNotebook ColorNotebook;
typedef struct _DrawCore DrawCore; typedef struct _GimpDrawTool GimpDrawTool;
typedef struct _GDisplay GDisplay; typedef struct _GDisplay GDisplay;
...@@ -133,7 +133,7 @@ typedef gpointer ImageMap; ...@@ -133,7 +133,7 @@ typedef gpointer ImageMap;
typedef struct _InfoDialog InfoDialog; typedef struct _InfoDialog InfoDialog;
typedef struct _PaintCore PaintCore; typedef struct _GimpPaintTool GimpPaintTool;
typedef struct _Path Path; typedef struct _Path Path;
typedef struct _PathPoint PathPoint; typedef struct _PathPoint PathPoint;
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include "gimppattern.h" #include "gimppattern.h"
#include "gimprc.h" #include "gimprc.h"
/* /*
* the list of all images * the list of all images
*/ */
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#include "temp_buf.h" #include "temp_buf.h"
/* this needs to go away */ /* this needs to go away */
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#include "brush_scale.h" #include "brush_scale.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -65,8 +65,8 @@ static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable, ...@@ -65,8 +65,8 @@ static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
gint height); gint height);
static gchar * gimp_brush_get_extension (GimpData *data); static gchar * gimp_brush_get_extension (GimpData *data);
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core); static GimpBrush * gimp_brush_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core); static gboolean gimp_brush_want_null_motion (GimpPaintTool *paint_tool);
static GimpViewableClass *parent_class = NULL; static GimpViewableClass *parent_class = NULL;
...@@ -108,7 +108,7 @@ gimp_brush_class_init (GimpBrushClass *klass) ...@@ -108,7 +108,7 @@ gimp_brush_class_init (GimpBrushClass *klass)
data_class = (GimpDataClass *) klass; data_class = (GimpDataClass *) klass;
parent_class = gtk_type_class (GIMP_TYPE_DATA); parent_class = gtk_type_class (GIMP_TYPE_DATA);
object_class->destroy = gimp_brush_destroy; object_class->destroy = gimp_brush_destroy;
viewable_class->get_new_preview = gimp_brush_get_new_preview; viewable_class->get_new_preview = gimp_brush_get_new_preview;
...@@ -180,7 +180,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable, ...@@ -180,7 +180,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
gdouble ratio_x = (gdouble) brush_width / width; gdouble ratio_x = (gdouble) brush_width / width;
gdouble ratio_y = (gdouble) brush_height / height; gdouble ratio_y = (gdouble) brush_height / height;
brush_width = (gdouble) brush_width / MAX (ratio_x, ratio_y) + 0.5; brush_width = (gdouble) brush_width / MAX (ratio_x, ratio_y) + 0.5;
brush_height = (gdouble) brush_height / MAX (ratio_x, ratio_y) + 0.5; brush_height = (gdouble) brush_height / MAX (ratio_x, ratio_y) + 0.5;
mask_buf = brush_scale_mask (mask_buf, brush_width, brush_height); mask_buf = brush_scale_mask (mask_buf, brush_width, brush_height);
...@@ -218,7 +218,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable, ...@@ -218,7 +218,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
bg = (255 - *mask); bg = (255 - *mask);
*b++ = bg + (*mask * *pixmap++) / 255; *b++ = bg + (*mask * *pixmap++) / 255;
*b++ = bg + (*mask * *pixmap++) / 255; *b++ = bg + (*mask * *pixmap++) / 255;
*b++ = bg + (*mask * *pixmap++) / 255; *b++ = bg + (*mask * *pixmap++) / 255;
mask++; mask++;
...@@ -305,7 +305,7 @@ gimp_brush_load (const gchar *filename) ...@@ -305,7 +305,7 @@ gimp_brush_load (const gchar *filename)
g_return_val_if_fail (filename != NULL, NULL); g_return_val_if_fail (filename != NULL, NULL);
fd = open (filename, O_RDONLY | _O_BINARY); fd = open (filename, O_RDONLY | _O_BINARY);
if (fd == -1) if (fd == -1)
return NULL; return NULL;
brush = gimp_brush_load_brush (fd, filename); brush = gimp_brush_load_brush (fd, filename);
...@@ -330,13 +330,13 @@ gimp_brush_load (const gchar *filename) ...@@ -330,13 +330,13 @@ gimp_brush_load (const gchar *filename)
} }
static GimpBrush * static GimpBrush *
gimp_brush_select_brush (PaintCore *paint_core) gimp_brush_select_brush (GimpPaintTool *paint_core)
{ {
return paint_core->brush; return paint_core->brush;
} }
static gboolean static gboolean
gimp_brush_want_null_motion (PaintCore *paint_core) gimp_brush_want_null_motion (GimpPaintTool *paint_core)
{ {
return TRUE; return TRUE;
} }
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#include "temp_buf.h" #include "temp_buf.h"
/* this needs to go away */ /* this needs to go away */
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#include "brush_scale.h" #include "brush_scale.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -65,8 +65,8 @@ static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable, ...@@ -65,8 +65,8 @@ static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
gint height); gint height);
static gchar * gimp_brush_get_extension (GimpData *data); static gchar * gimp_brush_get_extension (GimpData *data);
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core); static GimpBrush * gimp_brush_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core); static gboolean gimp_brush_want_null_motion (GimpPaintTool *paint_tool);
static GimpViewableClass *parent_class = NULL; static GimpViewableClass *parent_class = NULL;
...@@ -108,7 +108,7 @@ gimp_brush_class_init (GimpBrushClass *klass) ...@@ -108,7 +108,7 @@ gimp_brush_class_init (GimpBrushClass *klass)
data_class = (GimpDataClass *) klass; data_class = (GimpDataClass *) klass;
parent_class = gtk_type_class (GIMP_TYPE_DATA); parent_class = gtk_type_class (GIMP_TYPE_DATA);
object_class->destroy = gimp_brush_destroy; object_class->destroy = gimp_brush_destroy;
viewable_class->get_new_preview = gimp_brush_get_new_preview; viewable_class->get_new_preview = gimp_brush_get_new_preview;
...@@ -180,7 +180,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable, ...@@ -180,7 +180,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
gdouble ratio_x = (gdouble) brush_width / width; gdouble ratio_x = (gdouble) brush_width / width;
gdouble ratio_y = (gdouble) brush_height / height; gdouble ratio_y = (gdouble) brush_height / height;
brush_width = (gdouble) brush_width / MAX (ratio_x, ratio_y) + 0.5; brush_width = (gdouble) brush_width / MAX (ratio_x, ratio_y) + 0.5;
brush_height = (gdouble) brush_height / MAX (ratio_x, ratio_y) + 0.5; brush_height = (gdouble) brush_height / MAX (ratio_x, ratio_y) + 0.5;
mask_buf = brush_scale_mask (mask_buf, brush_width, brush_height); mask_buf = brush_scale_mask (mask_buf, brush_width, brush_height);
...@@ -218,7 +218,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable, ...@@ -218,7 +218,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
bg = (255 - *mask); bg = (255 - *mask);
*b++ = bg + (*mask * *pixmap++) / 255; *b++ = bg + (*mask * *pixmap++) / 255;
*b++ = bg + (*mask * *pixmap++) / 255; *b++ = bg + (*mask * *pixmap++) / 255;
*b++ = bg + (*mask * *pixmap++) / 255; *b++ = bg + (*mask * *pixmap++) / 255;
mask++; mask++;
...@@ -305,7 +305,7 @@ gimp_brush_load (const gchar *filename) ...@@ -305,7 +305,7 @@ gimp_brush_load (const gchar *filename)
g_return_val_if_fail (filename != NULL, NULL); g_return_val_if_fail (filename != NULL, NULL);
fd = open (filename, O_RDONLY | _O_BINARY); fd = open (filename, O_RDONLY | _O_BINARY);
if (fd == -1) if (fd == -1)
return NULL; return NULL;
brush = gimp_brush_load_brush (fd, filename); brush = gimp_brush_load_brush (fd, filename);
...@@ -330,13 +330,13 @@ gimp_brush_load (const gchar *filename) ...@@ -330,13 +330,13 @@ gimp_brush_load (const gchar *filename)
} }
static GimpBrush * static GimpBrush *
gimp_brush_select_brush (PaintCore *paint_core) gimp_brush_select_brush (GimpPaintTool *paint_core)
{ {
return paint_core->brush; return paint_core->brush;
} }
static gboolean static gboolean
gimp_brush_want_null_motion (PaintCore *paint_core) gimp_brush_want_null_motion (GimpPaintTool *paint_core)
{ {
return TRUE; return TRUE;
} }
......
...@@ -53,8 +53,8 @@ struct _GimpBrushClass ...@@ -53,8 +53,8 @@ struct _GimpBrushClass
GimpDataClass parent_class; GimpDataClass parent_class;
/* FIXME: these are no virtual function pointers but bad hacks: */ /* FIXME: these are no virtual function pointers but bad hacks: */
GimpBrush * (* select_brush) (PaintCore *paint_core); GimpBrush * (* select_brush) (GimpPaintTool *paint_tool);
gboolean (* want_null_motion) (PaintCore *paint_core); gboolean (* want_null_motion) (GimpPaintTool *paint_tool);
}; };
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "temp_buf.h" #include "temp_buf.h"
/* this needs to go away */ /* this needs to go away */
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#define OVERSAMPLING 5 #define OVERSAMPLING 5
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "temp_buf.h" #include "temp_buf.h"
/* this needs to go away */ /* this needs to go away */
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#define OVERSAMPLING 5 #define OVERSAMPLING 5
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "temp_buf.h" #include "temp_buf.h"
/* this needs to go away */ /* this needs to go away */
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#define OVERSAMPLING 5 #define OVERSAMPLING 5
......
...@@ -53,15 +53,15 @@ ...@@ -53,15 +53,15 @@
#include "gimprc.h" #include "gimprc.h"
/* this needs to go away */ /* this needs to go away */
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#include "libgimp/gimpparasiteio.h" #include "libgimp/gimpparasiteio.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core); static GimpBrush * gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core); static gboolean gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool);
static void gimp_brush_pipe_destroy (GtkObject *object); static void gimp_brush_pipe_destroy (GtkObject *object);
...@@ -69,16 +69,16 @@ static GimpBrushClass *parent_class = NULL; ...@@ -69,16 +69,16 @@ static GimpBrushClass *parent_class = NULL;
static GimpBrush * static GimpBrush *
gimp_brush_pipe_select_brush (PaintCore *paint_core) gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool)
{ {
GimpBrushPipe *pipe; GimpBrushPipe *pipe;
gint i, brushix, ix; gint i, brushix, ix;
gdouble angle; gdouble angle;
g_return_val_if_fail (paint_core != NULL, NULL); g_return_val_if_fail (paint_tool != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), NULL); g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), NULL);
pipe = GIMP_BRUSH_PIPE (paint_core->brush); pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1) if (pipe->nbrushes == 1)
return GIMP_BRUSH (pipe->current); return GIMP_BRUSH (pipe->current);
...@@ -92,8 +92,8 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core) ...@@ -92,8 +92,8 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = (pipe->index[i] + 1) % pipe->rank[i]; ix = (pipe->index[i] + 1) % pipe->rank[i];
break; break;
case PIPE_SELECT_ANGULAR: case PIPE_SELECT_ANGULAR:
angle = atan2 (paint_core->cury - paint_core->lasty, angle = atan2 (paint_tool->cury - paint_tool->lasty,
paint_core->curx - paint_core->lastx); paint_tool->curx - paint_tool->lastx);
/* Offset angle to be compatible with PSP tubes */ /* Offset angle to be compatible with PSP tubes */
angle += G_PI_2; angle += G_PI_2;
/* Map it to the [0..2*G_PI) interval */ /* Map it to the [0..2*G_PI) interval */
...@@ -108,13 +108,13 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core) ...@@ -108,13 +108,13 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = rand () % pipe->rank[i]; ix = rand () % pipe->rank[i];
break; break;
case PIPE_SELECT_PRESSURE: case PIPE_SELECT_PRESSURE:
ix = RINT (paint_core->curpressure * (pipe->rank[i] - 1)); ix = RINT (paint_tool->curpressure * (pipe->rank[i] - 1));
break; break;
case PIPE_SELECT_TILT_X: case PIPE_SELECT_TILT_X:
ix = RINT (paint_core->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2; ix = RINT (paint_tool->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break; break;
case PIPE_SELECT_TILT_Y: case PIPE_SELECT_TILT_Y:
ix = RINT (paint_core->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2; ix = RINT (paint_tool->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break; break;
case PIPE_SELECT_CONSTANT: case PIPE_SELECT_CONSTANT:
default: default:
...@@ -134,15 +134,15 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core) ...@@ -134,15 +134,15 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
} }
static gboolean static gboolean
gimp_brush_pipe_want_null_motion (PaintCore *paint_core) gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool)
{ {
GimpBrushPipe *pipe; GimpBrushPipe *pipe;
gint i; gint i;
g_return_val_if_fail (paint_core != NULL, TRUE); g_return_val_if_fail (paint_tool != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), TRUE); g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), TRUE);
pipe = GIMP_BRUSH_PIPE (paint_core->brush); pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1) if (pipe->nbrushes == 1)
return TRUE; return TRUE;
......
...@@ -53,15 +53,15 @@ ...@@ -53,15 +53,15 @@
#include "gimprc.h" #include "gimprc.h"
/* this needs to go away */ /* this needs to go away */
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#include "libgimp/gimpparasiteio.h" #include "libgimp/gimpparasiteio.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core); static GimpBrush * gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core); static gboolean gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool);
static void gimp_brush_pipe_destroy (GtkObject *object); static void gimp_brush_pipe_destroy (GtkObject *object);
...@@ -69,16 +69,16 @@ static GimpBrushClass *parent_class = NULL; ...@@ -69,16 +69,16 @@ static GimpBrushClass *parent_class = NULL;
static GimpBrush * static GimpBrush *
gimp_brush_pipe_select_brush (PaintCore *paint_core) gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool)
{ {
GimpBrushPipe *pipe; GimpBrushPipe *pipe;
gint i, brushix, ix; gint i, brushix, ix;
gdouble angle; gdouble angle;
g_return_val_if_fail (paint_core != NULL, NULL); g_return_val_if_fail (paint_tool != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), NULL); g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), NULL);
pipe = GIMP_BRUSH_PIPE (paint_core->brush); pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1) if (pipe->nbrushes == 1)
return GIMP_BRUSH (pipe->current); return GIMP_BRUSH (pipe->current);
...@@ -92,8 +92,8 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core) ...@@ -92,8 +92,8 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = (pipe->index[i] + 1) % pipe->rank[i]; ix = (pipe->index[i] + 1) % pipe->rank[i];
break; break;
case PIPE_SELECT_ANGULAR: case PIPE_SELECT_ANGULAR:
angle = atan2 (paint_core->cury - paint_core->lasty, angle = atan2 (paint_tool->cury - paint_tool->lasty,
paint_core->curx - paint_core->lastx); paint_tool->curx - paint_tool->lastx);
/* Offset angle to be compatible with PSP tubes */ /* Offset angle to be compatible with PSP tubes */
angle += G_PI_2; angle += G_PI_2;
/* Map it to the [0..2*G_PI) interval */ /* Map it to the [0..2*G_PI) interval */
...@@ -108,13 +108,13 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core) ...@@ -108,13 +108,13 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = rand () % pipe->rank[i]; ix = rand () % pipe->rank[i];
break; break;
case PIPE_SELECT_PRESSURE: case PIPE_SELECT_PRESSURE:
ix = RINT (paint_core->curpressure * (pipe->rank[i] - 1)); ix = RINT (paint_tool->curpressure * (pipe->rank[i] - 1));
break; break;
case PIPE_SELECT_TILT_X: case PIPE_SELECT_TILT_X:
ix = RINT (paint_core->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2; ix = RINT (paint_tool->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break; break;
case PIPE_SELECT_TILT_Y: case PIPE_SELECT_TILT_Y:
ix = RINT (paint_core->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2; ix = RINT (paint_tool->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break; break;
case PIPE_SELECT_CONSTANT: case PIPE_SELECT_CONSTANT:
default: default:
...@@ -134,15 +134,15 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core) ...@@ -134,15 +134,15 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
} }
static gboolean static gboolean
gimp_brush_pipe_want_null_motion (PaintCore *paint_core) gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool)
{ {
GimpBrushPipe *pipe; GimpBrushPipe *pipe;
gint i; gint i;
g_return_val_if_fail (paint_core != NULL, TRUE); g_return_val_if_fail (paint_tool != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), TRUE); g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), TRUE);
pipe = GIMP_BRUSH_PIPE (paint_core->brush); pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1) if (pipe->nbrushes == 1)
return TRUE; return TRUE;
......
...@@ -1394,6 +1394,8 @@ gimp_context_real_set_tool (GimpContext *context, ...@@ -1394,6 +1394,8 @@ gimp_context_real_set_tool (GimpContext *context,
GTK_SIGNAL_FUNC (gimp_context_tool_dirty), GTK_SIGNAL_FUNC (gimp_context_tool_dirty),
context); context);
/* FIXME if (tool_info != standard_tool_info) */
if (tool_info != standard_tool_info) if (tool_info != standard_tool_info)
context->tool_name = g_strdup (GIMP_OBJECT (tool_info)->name); context->tool_name = g_strdup (GIMP_OBJECT (tool_info)->name);
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "apptypes.h" #include "apptypes.h"
#include "tools/paint_core.h" #include "tools/gimppainttool.h"
#include "tools/paint_options.h" #include "tools/paint_options.h"
#include "tools/tool.h" #include "tools/tool.h"
#include "tools/tool_manager.h" #include "tools/tool_manager.h"
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "apptypes.h" #include "apptypes.h"
#include "draw_core.h"
#include "drawable.h" #include "drawable.h"
#include "floating_sel.h" #include "floating_sel.h"
#include "gdisplay.h" #include "gdisplay.h"
...@@ -47,7 +46,8 @@ ...@@ -47,7 +46,8 @@
#include "undo.h" #include "undo.h"
#include "tools/by_color_select.h" #include "tools/by_color_select.h"
#include "tools/paint_core.h" #include "tools/gimpdrawtool.h"
#include "tools/gimppainttool.h"
#include "tools/tool.h" #include "tools/tool.h"
#include "tools/transform_core.h" #include "tools/transform_core.h"
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "colormaps.h" #include "colormaps.h"
#include "cursorutil.h" #include "cursorutil.h"
#include "disp_callbacks.h" #include "disp_callbacks.h"
#include "draw_core.h"
#include "gdisplay.h" #include "gdisplay.h"
#include "gdisplay_ops.h" #include "gdisplay_ops.h"
#include "gimage.h" #include "gimage.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "temp_buf.h" #include "temp_buf.h"
/* FIXME: include rect_select.h here */ /* FIXME: include rect_select.h here */
#include "color_picker.h" #include "gimpcolorpickertool.h"
static void gimp_tool_info_class_init (GimpToolInfoClass *klass); static void gimp_tool_info_class_init (GimpToolInfoClass *klass);
...@@ -236,7 +236,7 @@ gimp_tool_info_get_standard (void) ...@@ -236,7 +236,7 @@ gimp_tool_info_get_standard (void)
if (! standard_tool_info) if (! standard_tool_info)
{ {
standard_tool_info = standard_tool_info =
gimp_tool_info_new (GIMP_TYPE_COLOR_PICKER,