Commit 070fafb5 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Argh...

2003-07-14  Michael Natterer  <mitch@gimp.org>

	Argh...

	* app/paint/Makefile.am
	* app/paint/gimppencil.[ch]: added it again as GimpPaintbrush
	subclass and override nothing but the user visible undo name and
	the paint_options type.

	* app/paint/paint.c
	* app/tools/tool_manager.c
	* app/tools/gimppenciltool.c
	* tools/pdbgen/pdb/paint_tools.pdb: reverted my last changes.

	* app/pdb/paint_tools_cmds.c: regenerated.
parent 4a30a71c
2003-07-14 Michael Natterer <mitch@gimp.org>
Argh...
* app/paint/Makefile.am
* app/paint/gimppencil.[ch]: added it again as GimpPaintbrush
subclass and override nothing but the user visible undo name and
the paint_options type.
* app/paint/paint.c
* app/tools/tool_manager.c
* app/tools/gimppenciltool.c
* tools/pdbgen/pdb/paint_tools.pdb: reverted my last changes.
* app/pdb/paint_tools_cmds.c: regenerated.
2003-07-14 Michael Natterer <mitch@gimp.org>
* app/paint/Makefile.am
......@@ -10,7 +26,7 @@
* app/tools/tool_manager.c: changed accordingly.
* app/tools/gimppenciltool.c
* tools/pdbgen/pdb/paint_tools.pdb: use the pintbrush core for
* tools/pdbgen/pdb/paint_tools.pdb: use the paintbrush core for
pencil drawing.
* app/pdb/paint_tools_cmds.c: regenerated.
......@@ -49,6 +49,8 @@ libapppaint_a_sources = \
gimppaintcore-undo.h \
gimppaintoptions.c \
gimppaintoptions.h \
gimppencil.c \
gimppencil.h \
gimppenciloptions.c \
gimppenciloptions.h \
gimppaintbrush.c \
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib-object.h>
#include "paint-types.h"
#include "gimppencil.h"
#include "gimppenciloptions.h"
#include "gimp-intl.h"
static void gimp_pencil_class_init (GimpPencilClass *klass);
static void gimp_pencil_init (GimpPencil *pencil);
static GimpPaintbrushClass *parent_class = NULL;
void
gimp_pencil_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp,
GIMP_TYPE_PENCIL,
GIMP_TYPE_PENCIL_OPTIONS,
_("Pencil"));
}
GType
gimp_pencil_get_type (void)
{
static GType type = 0;
if (! type)
{
static const GTypeInfo info =
{
sizeof (GimpPencilClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_pencil_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpPencil),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_pencil_init,
};
type = g_type_register_static (GIMP_TYPE_PAINTBRUSH,
"GimpPencil",
&info, 0);
}
return type;
}
static void
gimp_pencil_class_init (GimpPencilClass *klass)
{
parent_class = g_type_class_peek_parent (klass);
}
static void
gimp_pencil_init (GimpPencil *pencil)
{
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_PENCIL_H__
#define __GIMP_PENCIL_H__
#include "gimppaintbrush.h"
#define GIMP_TYPE_PENCIL (gimp_pencil_get_type ())
#define GIMP_PENCIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PENCIL, GimpPencil))
#define GIMP_PENCIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PENCIL, GimpPencilClass))
#define GIMP_IS_PENCIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PENCIL))
#define GIMP_IS_PENCIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PENCIL))
#define GIMP_PENCIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PENCIL, GimpPencilClass))
typedef struct _GimpPaintbrush GimpPencil;
typedef struct _GimpPaintbrushClass GimpPencilClass;
void gimp_pencil_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_pencil_get_type (void) G_GNUC_CONST;
#endif /* __GIMP_PENCIL_H__ */
......@@ -33,6 +33,7 @@
#include "gimpdodgeburn.h"
#include "gimperaser.h"
#include "gimppaintbrush.h"
#include "gimppencil.h"
#include "gimpsmudge.h"
......@@ -57,7 +58,8 @@ paint_init (Gimp *gimp)
gimp_clone_register,
gimp_airbrush_register,
gimp_eraser_register,
gimp_paintbrush_register
gimp_paintbrush_register,
gimp_pencil_register,
};
gint i;
......@@ -102,8 +104,12 @@ paint_register (Gimp *gimp,
g_return_if_fail (g_type_is_a (paint_type, GIMP_TYPE_PAINT_CORE));
g_return_if_fail (g_type_is_a (paint_options_type, GIMP_TYPE_PAINT_OPTIONS));
g_return_if_fail (blurb != NULL);
if (paint_type == GIMP_TYPE_PAINTBRUSH)
if (paint_type == GIMP_TYPE_PENCIL)
{
pdb_string = "gimp_pencil";
}
else if (paint_type == GIMP_TYPE_PAINTBRUSH)
{
pdb_string = "gimp_paintbrush_default";
}
......
......@@ -42,6 +42,7 @@
#include "paint/gimperaseroptions.h"
#include "paint/gimppaintbrush.h"
#include "paint/gimppaintcore-stroke.h"
#include "paint/gimppencil.h"
#include "paint/gimppenciloptions.h"
#include "paint/gimpsmudge.h"
#include "paint/gimpsmudgeoptions.h"
......@@ -1194,7 +1195,7 @@ pencil_invoker (Gimp *gimp,
options = gimp_paint_options_new (gimp, GIMP_TYPE_PENCIL_OPTIONS);
success = paint_tools_stroke (gimp,
GIMP_TYPE_PAINTBRUSH,
GIMP_TYPE_PENCIL,
options,
drawable,
num_strokes, strokes);
......
......@@ -24,7 +24,7 @@
#include "tools-types.h"
#include "paint/gimppaintbrush.h"
#include "paint/gimppencil.h"
#include "paint/gimppenciloptions.h"
#include "gimppenciltool.h"
......@@ -111,5 +111,5 @@ gimp_pencil_tool_init (GimpPencilTool *pencil)
gimp_tool_control_set_tool_cursor (tool->control, GIMP_PENCIL_TOOL_CURSOR);
paint_tool->pick_colors = TRUE;
paint_tool->core = g_object_new (GIMP_TYPE_PAINTBRUSH, NULL);
paint_tool->core = g_object_new (GIMP_TYPE_PENCIL, NULL);
}
......@@ -525,7 +525,7 @@ tool_manager_register_tool (GType tool_type,
if (tool_type == GIMP_TYPE_PENCIL_TOOL)
{
paint_core_name = "GimpPaintbrush";
paint_core_name = "GimpPencil";
}
else if (tool_type == GIMP_TYPE_PAINTBRUSH_TOOL)
{
......
......@@ -546,14 +546,14 @@ HELP
);
%invoke = (
headers => [ qw("paint/gimppenciloptions.h") ],
headers => [ qw("paint/gimppencil.h" "paint/gimppenciloptions.h") ],
vars => [ "GimpPaintOptions *options" ],
code => <<'CODE'
{
options = gimp_paint_options_new (gimp, GIMP_TYPE_PENCIL_OPTIONS);
success = paint_tools_stroke (gimp,
GIMP_TYPE_PAINTBRUSH,
GIMP_TYPE_PENCIL,
options,
drawable,
num_strokes, strokes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment