1997-11-25 06:05:25 +08:00
|
|
|
/* 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
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
app/appenv.h New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc
1999-09-01 Tor Lillqvist <tml@iki.fi>
* app/appenv.h
* libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI,
RINT(), ROUND() etc from app/appenv.h here, so plug-ins can
use them, too. Remove some commented-out old stuff in appenv.h.
* libgimp/gimp.h: Include gimpmath.h.
* libgimp/gimp.c (gimp_main): Win32: Don't install signal
handlers, we can't do anything useful in the handler ourselves
anyway (it would be nice to print out a backtrace, but that seems
pretty hard to do, even if not impossible). Let Windows inform the
user about the crash. If the plug-in was compiled with MSVC, and
the user also has it, she is offered a chance to start the
debugger automatically anyway.
* app/*several*.c: Include gimpmath.h for G_PI etc. Don't include
<math.h>, as gimpmath.h includes it.
* plug-ins/*/*many*.c: Include config.h. Don't include <math.h>.
Remove all the duplicated definitions of G_PI and rint(). Use
RINT() instead of rint().
* app/app_procs.[ch]: app_exit() takes a gboolean.
* app/batch.c
* app/commands.c
* app/interface.c: Call app_exit() with FALSE or TRUE.
* app/main.c (on_error): Call gimp_fatal_error. (main): Don't
install any signal handler on Win32 here, either.
* app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format
the message and call MessageBox with it. g_on_error_query doesn't
do anything useful on Win32, and printf'ing a message to stdout or
stderr doesn't do anything, either, in a windowing application.
1999-09-02 04:30:56 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
1999-09-02 09:41:18 +08:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2000-12-17 05:37:03 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2001-05-21 21:58:46 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
2001-01-24 07:56:18 +08:00
|
|
|
|
2001-05-10 06:34:59 +08:00
|
|
|
#include "tools-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-07-07 20:17:23 +08:00
|
|
|
#include "core/gimp.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimpcontext.h"
|
|
|
|
#include "core/gimpdrawable.h"
|
2001-11-10 00:54:56 +08:00
|
|
|
#include "core/gimpdrawable-blend.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimpgradient.h"
|
|
|
|
#include "core/gimpimage.h"
|
2001-05-10 06:34:59 +08:00
|
|
|
#include "core/gimptoolinfo.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
|
2001-09-26 07:23:09 +08:00
|
|
|
#include "display/gimpdisplay.h"
|
2001-10-13 20:52:30 +08:00
|
|
|
#include "display/gimpdisplay-foreach.h"
|
2001-11-01 05:20:09 +08:00
|
|
|
#include "display/gimpdisplayshell.h"
|
2001-09-26 07:23:09 +08:00
|
|
|
|
2001-11-10 00:54:56 +08:00
|
|
|
#include "widgets/gimpdnd.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
#include "gimpblendtool.h"
|
|
|
|
#include "paint_options.h"
|
|
|
|
#include "tool_manager.h"
|
|
|
|
|
2001-11-10 00:54:56 +08:00
|
|
|
#include "app_procs.h"
|
|
|
|
#include "gimpprogress.h"
|
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
1998-07-08 14:41:58 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
/* target size */
|
2001-11-12 22:45:58 +08:00
|
|
|
#define TARGET_SIZE 15
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-06-22 06:12:07 +08:00
|
|
|
#define STATUSBAR_SIZE 128
|
1998-07-27 05:49:42 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
typedef struct _BlendOptions BlendOptions;
|
2000-01-14 20:41:00 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
struct _BlendOptions
|
|
|
|
{
|
1999-04-22 22:34:00 +08:00
|
|
|
PaintOptions paint_options;
|
1999-04-13 01:55:06 +08:00
|
|
|
|
2000-01-14 20:41:00 +08:00
|
|
|
gdouble offset;
|
|
|
|
gdouble offset_d;
|
1999-04-09 06:25:54 +08:00
|
|
|
GtkObject *offset_w;
|
|
|
|
|
|
|
|
BlendMode blend_mode;
|
|
|
|
BlendMode blend_mode_d;
|
|
|
|
GtkWidget *blend_mode_w;
|
|
|
|
|
|
|
|
GradientType gradient_type;
|
|
|
|
GradientType gradient_type_d;
|
|
|
|
GtkWidget *gradient_type_w;
|
|
|
|
|
|
|
|
RepeatMode repeat;
|
|
|
|
RepeatMode repeat_d;
|
|
|
|
GtkWidget *repeat_w;
|
|
|
|
|
2000-01-14 20:41:00 +08:00
|
|
|
gint supersample;
|
|
|
|
gint supersample_d;
|
1999-04-09 06:25:54 +08:00
|
|
|
GtkWidget *supersample_w;
|
|
|
|
|
2000-01-14 20:41:00 +08:00
|
|
|
gint max_depth;
|
|
|
|
gint max_depth_d;
|
1999-04-09 06:25:54 +08:00
|
|
|
GtkObject *max_depth_w;
|
|
|
|
|
2000-01-14 20:41:00 +08:00
|
|
|
gdouble threshold;
|
|
|
|
gdouble threshold_d;
|
1999-04-09 06:25:54 +08:00
|
|
|
GtkObject *threshold_w;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
1999-04-13 01:55:06 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
/* local function prototypes */
|
1999-04-09 06:25:54 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static void gimp_blend_tool_class_init (GimpBlendToolClass *klass);
|
|
|
|
static void gimp_blend_tool_init (GimpBlendTool *blend_tool);
|
1999-04-09 06:25:54 +08:00
|
|
|
|
2001-07-18 04:50:01 +08:00
|
|
|
static void gimp_blend_tool_button_press (GimpTool *tool,
|
2001-11-09 03:14:51 +08:00
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
2001-10-29 19:47:11 +08:00
|
|
|
GimpDisplay *gdisp);
|
2001-07-18 04:50:01 +08:00
|
|
|
static void gimp_blend_tool_button_release (GimpTool *tool,
|
2001-11-09 03:14:51 +08:00
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
2001-10-29 19:47:11 +08:00
|
|
|
GimpDisplay *gdisp);
|
2001-07-18 04:50:01 +08:00
|
|
|
static void gimp_blend_tool_motion (GimpTool *tool,
|
2001-11-09 03:14:51 +08:00
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
2001-10-29 19:47:11 +08:00
|
|
|
GimpDisplay *gdisp);
|
2001-07-18 04:50:01 +08:00
|
|
|
static void gimp_blend_tool_cursor_update (GimpTool *tool,
|
2001-11-09 03:14:51 +08:00
|
|
|
GimpCoords *coords,
|
|
|
|
GdkModifierType state,
|
2001-10-29 19:47:11 +08:00
|
|
|
GimpDisplay *gdisp);
|
2001-07-18 04:50:01 +08:00
|
|
|
|
|
|
|
static void gimp_blend_tool_draw (GimpDrawTool *draw_tool);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
static BlendOptions * blend_options_new (void);
|
|
|
|
|
2001-07-18 04:50:01 +08:00
|
|
|
static void blend_options_reset (GimpToolOptions *tool_options);
|
|
|
|
|
|
|
|
static void gradient_type_callback (GtkWidget *widget,
|
|
|
|
gpointer data);
|
|
|
|
static void blend_options_drop_gradient (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data);
|
|
|
|
static void blend_options_drop_tool (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data);
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-10 00:54:56 +08:00
|
|
|
/* private variables */
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static GimpDrawToolClass *parent_class = NULL;
|
2000-02-14 06:26:41 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static BlendOptions *blend_options = NULL;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static GtkTargetEntry blend_target_table[] =
|
|
|
|
{
|
|
|
|
GIMP_TARGET_GRADIENT,
|
|
|
|
GIMP_TARGET_TOOL
|
|
|
|
};
|
1999-04-09 06:25:54 +08:00
|
|
|
|
|
|
|
|
2001-11-10 00:54:56 +08:00
|
|
|
/* public functions */
|
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
void
|
2001-07-07 20:17:23 +08:00
|
|
|
gimp_blend_tool_register (Gimp *gimp)
|
2001-03-12 04:01:14 +08:00
|
|
|
{
|
2001-07-07 20:17:23 +08:00
|
|
|
tool_manager_register_tool (gimp,
|
|
|
|
GIMP_TYPE_BLEND_TOOL,
|
2001-03-12 04:01:14 +08:00
|
|
|
TRUE,
|
|
|
|
"gimp:blend_tool",
|
|
|
|
_("Blend"),
|
|
|
|
_("Fill with a color gradient"),
|
|
|
|
N_("/Tools/Paint Tools/Blend"), "L",
|
|
|
|
NULL, "tools/blend.html",
|
2001-08-06 00:08:19 +08:00
|
|
|
GIMP_STOCK_TOOL_BLEND);
|
1999-04-09 06:25:54 +08:00
|
|
|
}
|
|
|
|
|
2001-08-14 22:53:55 +08:00
|
|
|
GType
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_blend_tool_get_type (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-08-14 22:53:55 +08:00
|
|
|
static GType tool_type = 0;
|
1999-04-13 01:55:06 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
if (! tool_type)
|
|
|
|
{
|
2001-08-14 22:53:55 +08:00
|
|
|
static const GTypeInfo tool_info =
|
2001-03-12 04:01:14 +08:00
|
|
|
{
|
2001-08-14 22:53:55 +08:00
|
|
|
sizeof (GimpBlendToolClass),
|
|
|
|
(GBaseInitFunc) NULL,
|
|
|
|
(GBaseFinalizeFunc) NULL,
|
|
|
|
(GClassInitFunc) gimp_blend_tool_class_init,
|
|
|
|
NULL, /* class_finalize */
|
|
|
|
NULL, /* class_data */
|
2001-03-12 04:01:14 +08:00
|
|
|
sizeof (GimpBlendTool),
|
2001-08-14 22:53:55 +08:00
|
|
|
0, /* n_preallocs */
|
|
|
|
(GInstanceInitFunc) gimp_blend_tool_init,
|
2001-03-12 04:01:14 +08:00
|
|
|
};
|
|
|
|
|
2001-08-14 22:53:55 +08:00
|
|
|
tool_type = g_type_register_static (GIMP_TYPE_DRAW_TOOL,
|
|
|
|
"GimpBlendTool",
|
|
|
|
&tool_info, 0);
|
2001-03-12 04:01:14 +08:00
|
|
|
}
|
2000-02-14 06:26:41 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
return tool_type;
|
|
|
|
}
|
2000-02-14 06:26:41 +08:00
|
|
|
|
2001-11-10 00:54:56 +08:00
|
|
|
|
|
|
|
/* private functions */
|
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static void
|
|
|
|
gimp_blend_tool_class_init (GimpBlendToolClass *klass)
|
|
|
|
{
|
2001-08-14 22:53:55 +08:00
|
|
|
GObjectClass *object_class;
|
2001-03-12 04:01:14 +08:00
|
|
|
GimpToolClass *tool_class;
|
|
|
|
GimpDrawToolClass *draw_tool_class;
|
1999-04-13 01:55:06 +08:00
|
|
|
|
2001-08-14 22:53:55 +08:00
|
|
|
object_class = G_OBJECT_CLASS (klass);
|
|
|
|
tool_class = GIMP_TOOL_CLASS (klass);
|
|
|
|
draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);
|
2000-02-14 06:26:41 +08:00
|
|
|
|
2001-08-14 22:53:55 +08:00
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
2000-02-14 06:26:41 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
tool_class->button_press = gimp_blend_tool_button_press;
|
|
|
|
tool_class->button_release = gimp_blend_tool_button_release;
|
|
|
|
tool_class->motion = gimp_blend_tool_motion;
|
|
|
|
tool_class->cursor_update = gimp_blend_tool_cursor_update;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
draw_tool_class->draw = gimp_blend_tool_draw;
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static void
|
|
|
|
gimp_blend_tool_init (GimpBlendTool *blend_tool)
|
|
|
|
{
|
|
|
|
GimpTool *tool;
|
1999-04-21 03:23:38 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
tool = GIMP_TOOL (blend_tool);
|
|
|
|
|
|
|
|
if (! blend_options)
|
|
|
|
{
|
|
|
|
blend_options = blend_options_new ();
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
tool_manager_register_tool_options (GIMP_TYPE_BLEND_TOOL,
|
2001-07-18 04:50:01 +08:00
|
|
|
(GimpToolOptions *) blend_options);
|
2001-03-12 04:01:14 +08:00
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
tool->tool_cursor = GIMP_BLEND_TOOL_CURSOR;
|
|
|
|
tool->scroll_lock = TRUE; /* Disallow scrolling */
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
static void
|
2001-11-09 03:14:51 +08:00
|
|
|
gimp_blend_tool_button_press (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-11-01 05:20:09 +08:00
|
|
|
GimpBlendTool *blend_tool;
|
|
|
|
GimpDisplayShell *shell;
|
2001-11-10 00:54:56 +08:00
|
|
|
gint off_x, off_y;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
blend_tool = GIMP_BLEND_TOOL (tool);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
|
|
|
2001-01-15 05:11:52 +08:00
|
|
|
switch (gimp_drawable_type (gimp_image_active_drawable (gdisp->gimage)))
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
case INDEXED_GIMAGE: case INDEXEDA_GIMAGE:
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
g_message (_("Blend: Invalid for indexed images."));
|
1997-11-25 06:05:25 +08:00
|
|
|
return;
|
|
|
|
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2001-11-10 00:54:56 +08:00
|
|
|
gimp_drawable_offsets (gimp_image_active_drawable (gdisp->gimage),
|
|
|
|
&off_x, &off_y);
|
|
|
|
|
|
|
|
blend_tool->endx = blend_tool->startx = coords->x - off_x;
|
|
|
|
blend_tool->endy = blend_tool->starty = coords->y - off_y;
|
|
|
|
|
|
|
|
tool->gdisp = gdisp;
|
|
|
|
tool->state = ACTIVE;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
gdk_pointer_grab (shell->canvas->window, FALSE,
|
2000-12-31 13:31:43 +08:00
|
|
|
GDK_POINTER_MOTION_HINT_MASK |
|
|
|
|
GDK_BUTTON1_MOTION_MASK |
|
|
|
|
GDK_BUTTON_RELEASE_MASK,
|
2001-11-09 03:14:51 +08:00
|
|
|
NULL, NULL, time);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1998-07-27 05:49:42 +08:00
|
|
|
/* initialize the statusbar display */
|
2000-12-31 13:31:43 +08:00
|
|
|
blend_tool->context_id =
|
2001-11-01 05:20:09 +08:00
|
|
|
gtk_statusbar_get_context_id (GTK_STATUSBAR (shell->statusbar), "blend");
|
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (shell->statusbar),
|
|
|
|
blend_tool->context_id,
|
|
|
|
_("Blend: 0, 0"));
|
1998-07-27 05:49:42 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
/* Start drawing the blend tool */
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_draw_tool_start (GIMP_DRAW_TOOL (tool),
|
2001-11-01 05:20:09 +08:00
|
|
|
shell->canvas->window);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-11-09 03:14:51 +08:00
|
|
|
gimp_blend_tool_button_release (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-11-01 05:20:09 +08:00
|
|
|
GimpBlendTool *blend_tool;
|
2001-11-20 21:53:21 +08:00
|
|
|
BlendOptions *options;
|
2001-11-01 05:20:09 +08:00
|
|
|
GimpDisplayShell *shell;
|
2001-11-20 21:53:21 +08:00
|
|
|
GimpImage *gimage;
|
Bit of a large checkin this - it's basically three things: 1 - GimpModules
Sun Jan 11 00:24:21 GMT 1999 Austin Donnelly <austin@greenend.org.uk>
Bit of a large checkin this - it's basically three things:
1 - GimpModules using gmodules to dynamically load and
initialise modules at gimp start of day.
2 - Color selectors now register themselves with a color
notebook.
3 - progress bars have been cleaned up a bit, so now have
progress indictations on all transform tool and gradient
fill operations. Not done bucket fill, but that seems to
be the next candidate.
New directories:
* modules/: new directory for dynamically loadable modules.
New files:
* modules/.cvsignore
* modules/Makefile.am
* modules/colorsel_gtk.c: GTK color selector wrapped up as a
color selector the gimp can use.
* app/gimpprogress.[ch]: progress bars within gimp core, either as
popups, or in the status bar. This is mainly code moved out
of plug-in.c
* app/color_notebook.[ch]: color selector notebook, implementing
very similar interface to color_select.h so it can be used as
a drop-in replacement for it.
* libgimp/color_selector.h: API color selectors need to implement
to become a page in the color_notebook.
* libgimp/gimpmodule.h: API gimp modules need to implement to be
initialised by gimp at start of day.
Modified files:
* Makefile.am: add modules/ to SUBDIRS
* libgimp/Makefile.am: install gimpmodule.h and color_selector.h
* app/gimprc.[ch]: recognise module-path variable.
* gimprc.in: set module-path variable to something sensible
(currently "${gimp_dir}/modules:${gimp_plugin_dir}/modules").
* app/Makefile.am: build color notebook and gimpprogress
* app/app_procs.c: register internal GIMP color selector with
color notebook.
* app/asupsample.c: call progress function less frequently for
better performance.
* app/asupsample.h: progress_func_t typedef moved to gimpprogress.h
* app/blend.c: make callbacks to a progress function
* app/color_area.c: use a color notebook rather than a color selector
* app/color_panel.c: ditto
* app/color_select.c: export color selector interface for notebook
* app/color_select.h: color_select_init() prototype
* app/flip_tool.c: flip the image every time, rather than every
second click.
* app/interface.c: move progress bar stuff out to
gimpprogress.c. Make the code actually work while we're at it.
* app/interface.h: move prototypes for progress functions out to
gimpprogress.h
* app/plug_in.c: load and initialise modules (if possible). Move
progress bar handling code out to gimpprogress.c
* app/plug_in.h: keep only a gimp_progress * for each plugin, not
a whole bunch of GtkWidgets.
* app/scale_tool.c
* app/rotate_tool.c
* app/shear_tool.c
* app/perspective_tool.c: progress bar during operation.
De-sensitise the dialog to discourage the user from running
two transforms in parallel.
* app/transform_core.c: recalculate grid coords when bounding box
changes. Only initialise the action area of the dialog once,
to avoid multiple "ok" / "reset" buttons appearing. Undraw
transform tool with correct matrix to get rid of handle
remains on screen. Call a progress function as we apply the
transform matrix. A few new i18n markups. Invalidate
floating selection marching ants after applying matrix.
* app/transform_core.h: transform_core_do() takes an optional
progress callback argument (and data).
* plug-ins/oilify/oilify.c: send progress bar updates after every
pixel region, not only if they processed a multiple of 5
pixels (which was quite unlikely, and therefore gave a jerky
progress indication).
1999-01-11 08:57:33 +08:00
|
|
|
#ifdef BLEND_UI_CALLS_VIA_PDB
|
2001-11-01 05:20:09 +08:00
|
|
|
Argument *return_vals;
|
|
|
|
gint nreturn_vals;
|
Bit of a large checkin this - it's basically three things: 1 - GimpModules
Sun Jan 11 00:24:21 GMT 1999 Austin Donnelly <austin@greenend.org.uk>
Bit of a large checkin this - it's basically three things:
1 - GimpModules using gmodules to dynamically load and
initialise modules at gimp start of day.
2 - Color selectors now register themselves with a color
notebook.
3 - progress bars have been cleaned up a bit, so now have
progress indictations on all transform tool and gradient
fill operations. Not done bucket fill, but that seems to
be the next candidate.
New directories:
* modules/: new directory for dynamically loadable modules.
New files:
* modules/.cvsignore
* modules/Makefile.am
* modules/colorsel_gtk.c: GTK color selector wrapped up as a
color selector the gimp can use.
* app/gimpprogress.[ch]: progress bars within gimp core, either as
popups, or in the status bar. This is mainly code moved out
of plug-in.c
* app/color_notebook.[ch]: color selector notebook, implementing
very similar interface to color_select.h so it can be used as
a drop-in replacement for it.
* libgimp/color_selector.h: API color selectors need to implement
to become a page in the color_notebook.
* libgimp/gimpmodule.h: API gimp modules need to implement to be
initialised by gimp at start of day.
Modified files:
* Makefile.am: add modules/ to SUBDIRS
* libgimp/Makefile.am: install gimpmodule.h and color_selector.h
* app/gimprc.[ch]: recognise module-path variable.
* gimprc.in: set module-path variable to something sensible
(currently "${gimp_dir}/modules:${gimp_plugin_dir}/modules").
* app/Makefile.am: build color notebook and gimpprogress
* app/app_procs.c: register internal GIMP color selector with
color notebook.
* app/asupsample.c: call progress function less frequently for
better performance.
* app/asupsample.h: progress_func_t typedef moved to gimpprogress.h
* app/blend.c: make callbacks to a progress function
* app/color_area.c: use a color notebook rather than a color selector
* app/color_panel.c: ditto
* app/color_select.c: export color selector interface for notebook
* app/color_select.h: color_select_init() prototype
* app/flip_tool.c: flip the image every time, rather than every
second click.
* app/interface.c: move progress bar stuff out to
gimpprogress.c. Make the code actually work while we're at it.
* app/interface.h: move prototypes for progress functions out to
gimpprogress.h
* app/plug_in.c: load and initialise modules (if possible). Move
progress bar handling code out to gimpprogress.c
* app/plug_in.h: keep only a gimp_progress * for each plugin, not
a whole bunch of GtkWidgets.
* app/scale_tool.c
* app/rotate_tool.c
* app/shear_tool.c
* app/perspective_tool.c: progress bar during operation.
De-sensitise the dialog to discourage the user from running
two transforms in parallel.
* app/transform_core.c: recalculate grid coords when bounding box
changes. Only initialise the action area of the dialog once,
to avoid multiple "ok" / "reset" buttons appearing. Undraw
transform tool with correct matrix to get rid of handle
remains on screen. Call a progress function as we apply the
transform matrix. A few new i18n markups. Invalidate
floating selection marching ants after applying matrix.
* app/transform_core.h: transform_core_do() takes an optional
progress callback argument (and data).
* plug-ins/oilify/oilify.c: send progress bar updates after every
pixel region, not only if they processed a multiple of 5
pixels (which was quite unlikely, and therefore gave a jerky
progress indication).
1999-01-11 08:57:33 +08:00
|
|
|
#else
|
2001-11-01 05:20:09 +08:00
|
|
|
GimpProgress *progress;
|
Bit of a large checkin this - it's basically three things: 1 - GimpModules
Sun Jan 11 00:24:21 GMT 1999 Austin Donnelly <austin@greenend.org.uk>
Bit of a large checkin this - it's basically three things:
1 - GimpModules using gmodules to dynamically load and
initialise modules at gimp start of day.
2 - Color selectors now register themselves with a color
notebook.
3 - progress bars have been cleaned up a bit, so now have
progress indictations on all transform tool and gradient
fill operations. Not done bucket fill, but that seems to
be the next candidate.
New directories:
* modules/: new directory for dynamically loadable modules.
New files:
* modules/.cvsignore
* modules/Makefile.am
* modules/colorsel_gtk.c: GTK color selector wrapped up as a
color selector the gimp can use.
* app/gimpprogress.[ch]: progress bars within gimp core, either as
popups, or in the status bar. This is mainly code moved out
of plug-in.c
* app/color_notebook.[ch]: color selector notebook, implementing
very similar interface to color_select.h so it can be used as
a drop-in replacement for it.
* libgimp/color_selector.h: API color selectors need to implement
to become a page in the color_notebook.
* libgimp/gimpmodule.h: API gimp modules need to implement to be
initialised by gimp at start of day.
Modified files:
* Makefile.am: add modules/ to SUBDIRS
* libgimp/Makefile.am: install gimpmodule.h and color_selector.h
* app/gimprc.[ch]: recognise module-path variable.
* gimprc.in: set module-path variable to something sensible
(currently "${gimp_dir}/modules:${gimp_plugin_dir}/modules").
* app/Makefile.am: build color notebook and gimpprogress
* app/app_procs.c: register internal GIMP color selector with
color notebook.
* app/asupsample.c: call progress function less frequently for
better performance.
* app/asupsample.h: progress_func_t typedef moved to gimpprogress.h
* app/blend.c: make callbacks to a progress function
* app/color_area.c: use a color notebook rather than a color selector
* app/color_panel.c: ditto
* app/color_select.c: export color selector interface for notebook
* app/color_select.h: color_select_init() prototype
* app/flip_tool.c: flip the image every time, rather than every
second click.
* app/interface.c: move progress bar stuff out to
gimpprogress.c. Make the code actually work while we're at it.
* app/interface.h: move prototypes for progress functions out to
gimpprogress.h
* app/plug_in.c: load and initialise modules (if possible). Move
progress bar handling code out to gimpprogress.c
* app/plug_in.h: keep only a gimp_progress * for each plugin, not
a whole bunch of GtkWidgets.
* app/scale_tool.c
* app/rotate_tool.c
* app/shear_tool.c
* app/perspective_tool.c: progress bar during operation.
De-sensitise the dialog to discourage the user from running
two transforms in parallel.
* app/transform_core.c: recalculate grid coords when bounding box
changes. Only initialise the action area of the dialog once,
to avoid multiple "ok" / "reset" buttons appearing. Undraw
transform tool with correct matrix to get rid of handle
remains on screen. Call a progress function as we apply the
transform matrix. A few new i18n markups. Invalidate
floating selection marching ants after applying matrix.
* app/transform_core.h: transform_core_do() takes an optional
progress callback argument (and data).
* plug-ins/oilify/oilify.c: send progress bar updates after every
pixel region, not only if they processed a multiple of 5
pixels (which was quite unlikely, and therefore gave a jerky
progress indication).
1999-01-11 08:57:33 +08:00
|
|
|
#endif
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
blend_tool = GIMP_BLEND_TOOL (tool);
|
|
|
|
|
2001-11-20 21:53:21 +08:00
|
|
|
options = (BlendOptions *) tool->tool_info->tool_options;
|
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
|
|
|
1998-07-27 05:49:42 +08:00
|
|
|
gimage = gdisp->gimage;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-09 03:14:51 +08:00
|
|
|
gdk_pointer_ungrab (time);
|
1997-11-25 06:05:25 +08:00
|
|
|
gdk_flush ();
|
1998-07-27 05:49:42 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
gtk_statusbar_pop (GTK_STATUSBAR (shell->statusbar), blend_tool->context_id);
|
1998-07-27 05:49:42 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
tool->state = INACTIVE;
|
|
|
|
|
|
|
|
/* if the 3rd button isn't pressed, fill the selected region */
|
2001-11-09 03:14:51 +08:00
|
|
|
if (! (state & GDK_BUTTON3_MASK) &&
|
1997-11-25 06:05:25 +08:00
|
|
|
((blend_tool->startx != blend_tool->endx) ||
|
|
|
|
(blend_tool->starty != blend_tool->endy)))
|
|
|
|
{
|
Bit of a large checkin this - it's basically three things: 1 - GimpModules
Sun Jan 11 00:24:21 GMT 1999 Austin Donnelly <austin@greenend.org.uk>
Bit of a large checkin this - it's basically three things:
1 - GimpModules using gmodules to dynamically load and
initialise modules at gimp start of day.
2 - Color selectors now register themselves with a color
notebook.
3 - progress bars have been cleaned up a bit, so now have
progress indictations on all transform tool and gradient
fill operations. Not done bucket fill, but that seems to
be the next candidate.
New directories:
* modules/: new directory for dynamically loadable modules.
New files:
* modules/.cvsignore
* modules/Makefile.am
* modules/colorsel_gtk.c: GTK color selector wrapped up as a
color selector the gimp can use.
* app/gimpprogress.[ch]: progress bars within gimp core, either as
popups, or in the status bar. This is mainly code moved out
of plug-in.c
* app/color_notebook.[ch]: color selector notebook, implementing
very similar interface to color_select.h so it can be used as
a drop-in replacement for it.
* libgimp/color_selector.h: API color selectors need to implement
to become a page in the color_notebook.
* libgimp/gimpmodule.h: API gimp modules need to implement to be
initialised by gimp at start of day.
Modified files:
* Makefile.am: add modules/ to SUBDIRS
* libgimp/Makefile.am: install gimpmodule.h and color_selector.h
* app/gimprc.[ch]: recognise module-path variable.
* gimprc.in: set module-path variable to something sensible
(currently "${gimp_dir}/modules:${gimp_plugin_dir}/modules").
* app/Makefile.am: build color notebook and gimpprogress
* app/app_procs.c: register internal GIMP color selector with
color notebook.
* app/asupsample.c: call progress function less frequently for
better performance.
* app/asupsample.h: progress_func_t typedef moved to gimpprogress.h
* app/blend.c: make callbacks to a progress function
* app/color_area.c: use a color notebook rather than a color selector
* app/color_panel.c: ditto
* app/color_select.c: export color selector interface for notebook
* app/color_select.h: color_select_init() prototype
* app/flip_tool.c: flip the image every time, rather than every
second click.
* app/interface.c: move progress bar stuff out to
gimpprogress.c. Make the code actually work while we're at it.
* app/interface.h: move prototypes for progress functions out to
gimpprogress.h
* app/plug_in.c: load and initialise modules (if possible). Move
progress bar handling code out to gimpprogress.c
* app/plug_in.h: keep only a gimp_progress * for each plugin, not
a whole bunch of GtkWidgets.
* app/scale_tool.c
* app/rotate_tool.c
* app/shear_tool.c
* app/perspective_tool.c: progress bar during operation.
De-sensitise the dialog to discourage the user from running
two transforms in parallel.
* app/transform_core.c: recalculate grid coords when bounding box
changes. Only initialise the action area of the dialog once,
to avoid multiple "ok" / "reset" buttons appearing. Undraw
transform tool with correct matrix to get rid of handle
remains on screen. Call a progress function as we apply the
transform matrix. A few new i18n markups. Invalidate
floating selection marching ants after applying matrix.
* app/transform_core.h: transform_core_do() takes an optional
progress callback argument (and data).
* plug-ins/oilify/oilify.c: send progress bar updates after every
pixel region, not only if they processed a multiple of 5
pixels (which was quite unlikely, and therefore gave a jerky
progress indication).
1999-01-11 08:57:33 +08:00
|
|
|
/* we can't do callbacks easily with the PDB, so this UI/backend
|
|
|
|
* separation (though good) is ignored for the moment */
|
|
|
|
#ifdef BLEND_UI_CALLS_VIA_PDB
|
1999-07-07 02:13:59 +08:00
|
|
|
return_vals =
|
1999-07-06 23:18:25 +08:00
|
|
|
procedural_db_run_proc ("gimp_blend",
|
|
|
|
&nreturn_vals,
|
2000-12-29 23:22:01 +08:00
|
|
|
PDB_DRAWABLE, drawable_ID (gimp_image_active_drawable (gimage)),
|
2001-11-20 21:53:21 +08:00
|
|
|
PDB_INT32, (gint32) options->blend_mode,
|
|
|
|
PDB_INT32, (gint32) PAINT_OPTIONS_GET_PAINT_MODE (options),
|
|
|
|
PDB_INT32, (gint32) options->gradient_type,
|
|
|
|
PDB_FLOAT, (gdouble) PAINT_OPTIONS_GET_OPACITY (options) * 100,
|
|
|
|
PDB_FLOAT, (gdouble) options->offset,
|
|
|
|
PDB_INT32, (gint32) options->repeat,
|
|
|
|
PDB_INT32, (gint32) options->supersample,
|
|
|
|
PDB_INT32, (gint32) options->max_depth,
|
|
|
|
PDB_FLOAT, (gdouble) options->threshold,
|
1999-07-06 23:18:25 +08:00
|
|
|
PDB_FLOAT, (gdouble) blend_tool->startx,
|
|
|
|
PDB_FLOAT, (gdouble) blend_tool->starty,
|
|
|
|
PDB_FLOAT, (gdouble) blend_tool->endx,
|
|
|
|
PDB_FLOAT, (gdouble) blend_tool->endy,
|
|
|
|
PDB_END);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-04-21 07:03:31 +08:00
|
|
|
if (return_vals && return_vals[0].value.pdb_int == PDB_SUCCESS)
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisplays_flush ();
|
|
|
|
else
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
g_message (_("Blend operation failed."));
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
procedural_db_destroy_args (return_vals, nreturn_vals);
|
Bit of a large checkin this - it's basically three things: 1 - GimpModules
Sun Jan 11 00:24:21 GMT 1999 Austin Donnelly <austin@greenend.org.uk>
Bit of a large checkin this - it's basically three things:
1 - GimpModules using gmodules to dynamically load and
initialise modules at gimp start of day.
2 - Color selectors now register themselves with a color
notebook.
3 - progress bars have been cleaned up a bit, so now have
progress indictations on all transform tool and gradient
fill operations. Not done bucket fill, but that seems to
be the next candidate.
New directories:
* modules/: new directory for dynamically loadable modules.
New files:
* modules/.cvsignore
* modules/Makefile.am
* modules/colorsel_gtk.c: GTK color selector wrapped up as a
color selector the gimp can use.
* app/gimpprogress.[ch]: progress bars within gimp core, either as
popups, or in the status bar. This is mainly code moved out
of plug-in.c
* app/color_notebook.[ch]: color selector notebook, implementing
very similar interface to color_select.h so it can be used as
a drop-in replacement for it.
* libgimp/color_selector.h: API color selectors need to implement
to become a page in the color_notebook.
* libgimp/gimpmodule.h: API gimp modules need to implement to be
initialised by gimp at start of day.
Modified files:
* Makefile.am: add modules/ to SUBDIRS
* libgimp/Makefile.am: install gimpmodule.h and color_selector.h
* app/gimprc.[ch]: recognise module-path variable.
* gimprc.in: set module-path variable to something sensible
(currently "${gimp_dir}/modules:${gimp_plugin_dir}/modules").
* app/Makefile.am: build color notebook and gimpprogress
* app/app_procs.c: register internal GIMP color selector with
color notebook.
* app/asupsample.c: call progress function less frequently for
better performance.
* app/asupsample.h: progress_func_t typedef moved to gimpprogress.h
* app/blend.c: make callbacks to a progress function
* app/color_area.c: use a color notebook rather than a color selector
* app/color_panel.c: ditto
* app/color_select.c: export color selector interface for notebook
* app/color_select.h: color_select_init() prototype
* app/flip_tool.c: flip the image every time, rather than every
second click.
* app/interface.c: move progress bar stuff out to
gimpprogress.c. Make the code actually work while we're at it.
* app/interface.h: move prototypes for progress functions out to
gimpprogress.h
* app/plug_in.c: load and initialise modules (if possible). Move
progress bar handling code out to gimpprogress.c
* app/plug_in.h: keep only a gimp_progress * for each plugin, not
a whole bunch of GtkWidgets.
* app/scale_tool.c
* app/rotate_tool.c
* app/shear_tool.c
* app/perspective_tool.c: progress bar during operation.
De-sensitise the dialog to discourage the user from running
two transforms in parallel.
* app/transform_core.c: recalculate grid coords when bounding box
changes. Only initialise the action area of the dialog once,
to avoid multiple "ok" / "reset" buttons appearing. Undraw
transform tool with correct matrix to get rid of handle
remains on screen. Call a progress function as we apply the
transform matrix. A few new i18n markups. Invalidate
floating selection marching ants after applying matrix.
* app/transform_core.h: transform_core_do() takes an optional
progress callback argument (and data).
* plug-ins/oilify/oilify.c: send progress bar updates after every
pixel region, not only if they processed a multiple of 5
pixels (which was quite unlikely, and therefore gave a jerky
progress indication).
1999-01-11 08:57:33 +08:00
|
|
|
|
|
|
|
#else /* ! BLEND_UI_CALLS_VIA_PDB */
|
|
|
|
|
|
|
|
progress = progress_start (gdisp, _("Blending..."), FALSE, NULL, NULL);
|
|
|
|
|
2001-11-10 00:54:56 +08:00
|
|
|
gimp_drawable_blend (gimp_image_active_drawable (gimage),
|
2001-11-20 21:53:21 +08:00
|
|
|
options->blend_mode,
|
2001-11-10 00:54:56 +08:00
|
|
|
gimp_context_get_paint_mode (gimp_get_current_context (gimage->gimp)),
|
2001-11-20 21:53:21 +08:00
|
|
|
options->gradient_type,
|
2001-11-16 07:15:52 +08:00
|
|
|
gimp_context_get_opacity (gimp_get_current_context (gimage->gimp)),
|
2001-11-20 21:53:21 +08:00
|
|
|
options->offset,
|
|
|
|
options->repeat,
|
|
|
|
options->supersample,
|
|
|
|
options->max_depth,
|
|
|
|
options->threshold,
|
2001-11-10 00:54:56 +08:00
|
|
|
blend_tool->startx,
|
|
|
|
blend_tool->starty,
|
|
|
|
blend_tool->endx,
|
|
|
|
blend_tool->endy,
|
|
|
|
progress ? progress_update_and_flush : NULL,
|
|
|
|
progress);
|
Bit of a large checkin this - it's basically three things: 1 - GimpModules
Sun Jan 11 00:24:21 GMT 1999 Austin Donnelly <austin@greenend.org.uk>
Bit of a large checkin this - it's basically three things:
1 - GimpModules using gmodules to dynamically load and
initialise modules at gimp start of day.
2 - Color selectors now register themselves with a color
notebook.
3 - progress bars have been cleaned up a bit, so now have
progress indictations on all transform tool and gradient
fill operations. Not done bucket fill, but that seems to
be the next candidate.
New directories:
* modules/: new directory for dynamically loadable modules.
New files:
* modules/.cvsignore
* modules/Makefile.am
* modules/colorsel_gtk.c: GTK color selector wrapped up as a
color selector the gimp can use.
* app/gimpprogress.[ch]: progress bars within gimp core, either as
popups, or in the status bar. This is mainly code moved out
of plug-in.c
* app/color_notebook.[ch]: color selector notebook, implementing
very similar interface to color_select.h so it can be used as
a drop-in replacement for it.
* libgimp/color_selector.h: API color selectors need to implement
to become a page in the color_notebook.
* libgimp/gimpmodule.h: API gimp modules need to implement to be
initialised by gimp at start of day.
Modified files:
* Makefile.am: add modules/ to SUBDIRS
* libgimp/Makefile.am: install gimpmodule.h and color_selector.h
* app/gimprc.[ch]: recognise module-path variable.
* gimprc.in: set module-path variable to something sensible
(currently "${gimp_dir}/modules:${gimp_plugin_dir}/modules").
* app/Makefile.am: build color notebook and gimpprogress
* app/app_procs.c: register internal GIMP color selector with
color notebook.
* app/asupsample.c: call progress function less frequently for
better performance.
* app/asupsample.h: progress_func_t typedef moved to gimpprogress.h
* app/blend.c: make callbacks to a progress function
* app/color_area.c: use a color notebook rather than a color selector
* app/color_panel.c: ditto
* app/color_select.c: export color selector interface for notebook
* app/color_select.h: color_select_init() prototype
* app/flip_tool.c: flip the image every time, rather than every
second click.
* app/interface.c: move progress bar stuff out to
gimpprogress.c. Make the code actually work while we're at it.
* app/interface.h: move prototypes for progress functions out to
gimpprogress.h
* app/plug_in.c: load and initialise modules (if possible). Move
progress bar handling code out to gimpprogress.c
* app/plug_in.h: keep only a gimp_progress * for each plugin, not
a whole bunch of GtkWidgets.
* app/scale_tool.c
* app/rotate_tool.c
* app/shear_tool.c
* app/perspective_tool.c: progress bar during operation.
De-sensitise the dialog to discourage the user from running
two transforms in parallel.
* app/transform_core.c: recalculate grid coords when bounding box
changes. Only initialise the action area of the dialog once,
to avoid multiple "ok" / "reset" buttons appearing. Undraw
transform tool with correct matrix to get rid of handle
remains on screen. Call a progress function as we apply the
transform matrix. A few new i18n markups. Invalidate
floating selection marching ants after applying matrix.
* app/transform_core.h: transform_core_do() takes an optional
progress callback argument (and data).
* plug-ins/oilify/oilify.c: send progress bar updates after every
pixel region, not only if they processed a multiple of 5
pixels (which was quite unlikely, and therefore gave a jerky
progress indication).
1999-01-11 08:57:33 +08:00
|
|
|
|
|
|
|
if (progress)
|
|
|
|
progress_end (progress);
|
|
|
|
|
|
|
|
gdisplays_flush ();
|
|
|
|
#endif /* ! BLEND_UI_CALLS_VIA_PDB */
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-11-09 03:14:51 +08:00
|
|
|
gimp_blend_tool_motion (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-11-01 05:20:09 +08:00
|
|
|
GimpBlendTool *blend_tool;
|
|
|
|
GimpDisplayShell *shell;
|
|
|
|
gchar vector[STATUSBAR_SIZE];
|
2001-11-09 03:14:51 +08:00
|
|
|
gint off_x, off_y;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
blend_tool = GIMP_BLEND_TOOL (tool);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-09 03:14:51 +08:00
|
|
|
gimp_drawable_offsets (gimp_image_active_drawable (gdisp->gimage),
|
|
|
|
&off_x, &off_y);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-09 03:14:51 +08:00
|
|
|
/* Get the current coordinates */
|
|
|
|
blend_tool->endx = coords->x - off_x;
|
|
|
|
blend_tool->endy = coords->y - off_y;
|
1999-09-03 02:56:39 +08:00
|
|
|
|
1999-11-25 09:59:14 +08:00
|
|
|
/* Restrict to multiples of 15 degrees if ctrl is pressed */
|
2001-11-09 03:14:51 +08:00
|
|
|
if (state & GDK_CONTROL_MASK)
|
1999-09-21 17:11:42 +08:00
|
|
|
{
|
2001-03-12 04:01:14 +08:00
|
|
|
gint tangens2[6] = { 34, 106, 196, 334, 618, 1944 };
|
|
|
|
gint cosinus[7] = { 256, 247, 222, 181, 128, 66, 0 };
|
|
|
|
gint dx, dy, i, radius, frac;
|
1999-09-21 17:11:42 +08:00
|
|
|
|
|
|
|
dx = blend_tool->endx - blend_tool->startx;
|
|
|
|
dy = blend_tool->endy - blend_tool->starty;
|
1999-09-03 02:56:39 +08:00
|
|
|
|
1999-09-21 17:11:42 +08:00
|
|
|
if (dy)
|
|
|
|
{
|
|
|
|
radius = sqrt (SQR (dx) + SQR (dy));
|
|
|
|
frac = abs ((dx << 8) / dy);
|
|
|
|
for (i = 0; i < 6; i++)
|
|
|
|
{
|
1999-11-19 01:56:01 +08:00
|
|
|
if (frac < tangens2[i])
|
1999-09-21 17:11:42 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
dx = dx > 0 ? (cosinus[6-i] * radius) >> 8 : - ((cosinus[6-i] * radius) >> 8);
|
|
|
|
dy = dy > 0 ? (cosinus[i] * radius) >> 8 : - ((cosinus[i] * radius) >> 8);
|
|
|
|
}
|
|
|
|
blend_tool->endx = blend_tool->startx + dx;
|
|
|
|
blend_tool->endy = blend_tool->starty + dy;
|
|
|
|
}
|
1999-07-27 02:13:10 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
gtk_statusbar_pop (GTK_STATUSBAR (shell->statusbar), blend_tool->context_id);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
1999-03-04 01:48:29 +08:00
|
|
|
if (gdisp->dot_for_dot)
|
|
|
|
{
|
2001-11-01 05:20:09 +08:00
|
|
|
g_snprintf (vector, sizeof (vector), shell->cursor_format_str,
|
1999-03-04 01:48:29 +08:00
|
|
|
_("Blend: "),
|
1999-08-14 20:34:08 +08:00
|
|
|
blend_tool->endx - blend_tool->startx,
|
1999-03-04 01:48:29 +08:00
|
|
|
", ",
|
1999-08-14 20:34:08 +08:00
|
|
|
blend_tool->endy - blend_tool->starty);
|
1999-03-04 01:48:29 +08:00
|
|
|
}
|
|
|
|
else /* show real world units */
|
|
|
|
{
|
1999-05-23 01:56:35 +08:00
|
|
|
gdouble unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
|
1999-03-04 01:48:29 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
g_snprintf (vector, sizeof (vector), shell->cursor_format_str,
|
1999-03-04 01:48:29 +08:00
|
|
|
_("Blend: "),
|
1999-08-14 20:34:08 +08:00
|
|
|
blend_tool->endx - blend_tool->startx * unit_factor /
|
1999-03-04 01:48:29 +08:00
|
|
|
gdisp->gimage->xresolution,
|
|
|
|
", ",
|
1999-08-14 20:34:08 +08:00
|
|
|
blend_tool->endy - blend_tool->starty * unit_factor /
|
1999-03-04 01:48:29 +08:00
|
|
|
gdisp->gimage->yresolution);
|
|
|
|
}
|
2001-03-12 04:01:14 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (shell->statusbar), blend_tool->context_id,
|
1999-03-04 01:48:29 +08:00
|
|
|
vector);
|
1998-07-27 05:49:42 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-11-09 03:14:51 +08:00
|
|
|
gimp_blend_tool_cursor_update (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-11-01 05:20:09 +08:00
|
|
|
GimpDisplayShell *shell;
|
|
|
|
|
|
|
|
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
|
|
|
2001-01-15 05:11:52 +08:00
|
|
|
switch (gimp_drawable_type (gimp_image_active_drawable (gdisp->gimage)))
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
case INDEXED_GIMAGE:
|
|
|
|
case INDEXEDA_GIMAGE:
|
2001-11-01 05:20:09 +08:00
|
|
|
gimp_display_shell_install_tool_cursor (shell,
|
|
|
|
GIMP_BAD_CURSOR,
|
|
|
|
GIMP_BLEND_TOOL_CURSOR,
|
|
|
|
GIMP_CURSOR_MODIFIER_NONE);
|
1997-11-25 06:05:25 +08:00
|
|
|
break;
|
|
|
|
default:
|
2001-11-01 05:20:09 +08:00
|
|
|
gimp_display_shell_install_tool_cursor (shell,
|
|
|
|
GIMP_MOUSE_CURSOR,
|
|
|
|
GIMP_BLEND_TOOL_CURSOR,
|
|
|
|
GIMP_CURSOR_MODIFIER_NONE);
|
1997-11-25 06:05:25 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_blend_tool_draw (GimpDrawTool *draw_tool)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-03-12 04:01:14 +08:00
|
|
|
GimpBlendTool *blend_tool;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
blend_tool = GIMP_BLEND_TOOL (draw_tool);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* Draw start target */
|
2001-11-16 05:17:36 +08:00
|
|
|
gimp_draw_tool_draw_handle (draw_tool,
|
|
|
|
GIMP_HANDLE_CROSS,
|
|
|
|
floor (blend_tool->startx) + 0.5,
|
|
|
|
floor (blend_tool->starty) + 0.5,
|
|
|
|
TARGET_SIZE,
|
|
|
|
TARGET_SIZE,
|
|
|
|
GTK_ANCHOR_CENTER,
|
|
|
|
TRUE);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* Draw end target */
|
2001-11-16 05:17:36 +08:00
|
|
|
gimp_draw_tool_draw_handle (draw_tool,
|
|
|
|
GIMP_HANDLE_CROSS,
|
|
|
|
floor (blend_tool->endx) + 0.5,
|
|
|
|
floor (blend_tool->endy) + 0.5,
|
|
|
|
TARGET_SIZE,
|
|
|
|
TARGET_SIZE,
|
|
|
|
GTK_ANCHOR_CENTER,
|
|
|
|
TRUE);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* Draw the line between the start and end coords */
|
2001-11-12 22:45:58 +08:00
|
|
|
gimp_draw_tool_draw_line (draw_tool,
|
|
|
|
floor (blend_tool->startx) + 0.5,
|
|
|
|
floor (blend_tool->starty) + 0.5,
|
|
|
|
floor (blend_tool->endx) + 0.5,
|
|
|
|
floor (blend_tool->endy) + 0.5,
|
|
|
|
TRUE);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static BlendOptions *
|
|
|
|
blend_options_new (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-03-12 04:01:14 +08:00
|
|
|
BlendOptions *options;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
GtkWidget *vbox;
|
|
|
|
GtkWidget *table;
|
|
|
|
GtkWidget *scale;
|
|
|
|
GtkWidget *frame;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
/* the new blend tool options structure */
|
|
|
|
options = g_new0 (BlendOptions, 1);
|
1999-06-22 06:12:07 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
paint_options_init ((PaintOptions *) options,
|
|
|
|
GIMP_TYPE_BLEND_TOOL,
|
|
|
|
blend_options_reset);
|
1999-06-22 06:12:07 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
options->offset = options->offset_d = 0.0;
|
|
|
|
options->blend_mode = options->blend_mode_d = FG_BG_RGB_MODE;
|
|
|
|
options->gradient_type = options->gradient_type_d = LINEAR;
|
|
|
|
options->repeat = options->repeat_d = REPEAT_NONE;
|
|
|
|
options->supersample = options->supersample_d = FALSE;
|
|
|
|
options->max_depth = options->max_depth_d = 3;
|
|
|
|
options->threshold = options->threshold_d = 0.2;
|
1999-06-22 06:12:07 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
/* the main vbox */
|
2001-07-18 04:50:01 +08:00
|
|
|
vbox = ((GimpToolOptions *) options)->main_vbox;
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
/* dnd stuff */
|
|
|
|
gtk_drag_dest_set (vbox,
|
|
|
|
GTK_DEST_DEFAULT_HIGHLIGHT |
|
|
|
|
GTK_DEST_DEFAULT_MOTION |
|
|
|
|
GTK_DEST_DEFAULT_DROP,
|
2001-10-29 19:47:11 +08:00
|
|
|
blend_target_table,
|
|
|
|
G_N_ELEMENTS (blend_target_table),
|
2001-03-12 04:01:14 +08:00
|
|
|
GDK_ACTION_COPY);
|
|
|
|
gimp_dnd_viewable_dest_set (vbox,
|
|
|
|
GIMP_TYPE_GRADIENT,
|
2001-04-01 04:41:39 +08:00
|
|
|
blend_options_drop_gradient,
|
|
|
|
options);
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_dnd_viewable_dest_set (vbox,
|
|
|
|
GIMP_TYPE_TOOL_INFO,
|
2001-04-01 04:41:39 +08:00
|
|
|
blend_options_drop_tool,
|
|
|
|
options);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
/* the offset scale */
|
|
|
|
table = gtk_table_new (4, 2, FALSE);
|
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
|
|
|
|
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
options->offset_w =
|
|
|
|
gtk_adjustment_new (options->offset_d, 0.0, 100.0, 1.0, 1.0, 0.0);
|
|
|
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
|
|
|
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
|
|
|
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
|
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
|
|
|
_("Offset:"), 1.0, 1.0,
|
|
|
|
scale, 1, FALSE);
|
2001-08-01 10:57:58 +08:00
|
|
|
g_signal_connect (G_OBJECT (options->offset_w), "value_changed",
|
|
|
|
G_CALLBACK (gimp_double_adjustment_update),
|
|
|
|
&options->offset);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
/* the blend mode menu */
|
|
|
|
options->blend_mode_w = gimp_option_menu_new2
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
(FALSE,
|
|
|
|
G_CALLBACK (gimp_menu_item_update),
|
|
|
|
&options->blend_mode,
|
|
|
|
GINT_TO_POINTER (options->blend_mode_d),
|
2001-03-12 04:01:14 +08:00
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
_("FG to BG (RGB)"), GINT_TO_POINTER (FG_BG_RGB_MODE), NULL,
|
|
|
|
_("FG to BG (HSV)"), GINT_TO_POINTER (FG_BG_HSV_MODE), NULL,
|
|
|
|
_("FG to Transparent"), GINT_TO_POINTER (FG_TRANS_MODE), NULL,
|
|
|
|
_("Custom Gradient"), GINT_TO_POINTER (CUSTOM_MODE), NULL,
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
NULL);
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
|
|
|
_("Blend:"), 1.0, 0.5,
|
|
|
|
options->blend_mode_w, 1, TRUE);
|
|
|
|
|
|
|
|
/* the gradient type menu */
|
|
|
|
options->gradient_type_w = gimp_option_menu_new2
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
(FALSE,
|
|
|
|
G_CALLBACK (gradient_type_callback),
|
|
|
|
&options->gradient_type,
|
|
|
|
GINT_TO_POINTER (options->gradient_type_d),
|
|
|
|
|
|
|
|
_("Linear"), GINT_TO_POINTER (LINEAR), NULL,
|
|
|
|
_("Bi-Linear"), GINT_TO_POINTER (BILINEAR), NULL,
|
|
|
|
_("Radial"), GINT_TO_POINTER (RADIAL), NULL,
|
|
|
|
_("Square"), GINT_TO_POINTER (SQUARE), NULL,
|
|
|
|
_("Conical (symmetric)"), GINT_TO_POINTER (CONICAL_SYMMETRIC), NULL,
|
|
|
|
_("Conical (asymmetric)"), GINT_TO_POINTER (CONICAL_ASYMMETRIC), NULL,
|
|
|
|
_("Shapeburst (angular)"), GINT_TO_POINTER (SHAPEBURST_ANGULAR), NULL,
|
|
|
|
_("Shapeburst (spherical)"), GINT_TO_POINTER (SHAPEBURST_SPHERICAL), NULL,
|
|
|
|
_("Shapeburst (dimpled)"), GINT_TO_POINTER (SHAPEBURST_DIMPLED), NULL,
|
|
|
|
_("Spiral (clockwise)"), GINT_TO_POINTER (SPIRAL_CLOCKWISE), NULL,
|
|
|
|
_("Spiral (anticlockwise)"), GINT_TO_POINTER (SPIRAL_ANTICLOCKWISE), NULL,
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
NULL);
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
|
|
|
|
_("Gradient:"), 1.0, 0.5,
|
|
|
|
options->gradient_type_w, 1, TRUE);
|
|
|
|
|
|
|
|
/* the repeat option */
|
|
|
|
options->repeat_w = gimp_option_menu_new2
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
(FALSE,
|
|
|
|
G_CALLBACK (gimp_menu_item_update),
|
|
|
|
&options->repeat,
|
|
|
|
GINT_TO_POINTER (options->repeat_d),
|
2001-03-12 04:01:14 +08:00
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
_("None"), GINT_TO_POINTER (REPEAT_NONE), NULL,
|
|
|
|
_("Sawtooth Wave"), GINT_TO_POINTER (REPEAT_SAWTOOTH), NULL,
|
|
|
|
_("Triangular Wave"), GINT_TO_POINTER (REPEAT_TRIANGULAR), NULL,
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
NULL);
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
|
|
|
|
_("Repeat:"), 1.0, 0.5,
|
|
|
|
options->repeat_w, 1, TRUE);
|
|
|
|
|
|
|
|
/* show the table */
|
|
|
|
gtk_widget_show (table);
|
|
|
|
|
|
|
|
/* frame for supersampling options */
|
|
|
|
frame = gtk_frame_new (NULL);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
|
|
|
/* vbox for the supersampling stuff */
|
|
|
|
vbox = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
|
|
|
|
/* supersampling toggle */
|
|
|
|
options->supersample_w =
|
|
|
|
gtk_check_button_new_with_label (_("Adaptive Supersampling"));
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->supersample_w),
|
|
|
|
options->supersample_d);
|
2001-11-09 03:14:51 +08:00
|
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame), options->supersample_w);
|
2001-03-12 04:01:14 +08:00
|
|
|
gtk_widget_show (options->supersample_w);
|
|
|
|
|
2001-08-01 10:57:58 +08:00
|
|
|
g_signal_connect (G_OBJECT (options->supersample_w), "toggled",
|
|
|
|
G_CALLBACK (gimp_toggle_button_update),
|
|
|
|
&options->supersample);
|
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
/* table for supersampling options */
|
|
|
|
table = gtk_table_new (2, 2, FALSE);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
|
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
/* automatically set the sensitive state of the table */
|
|
|
|
gtk_widget_set_sensitive (table, options->supersample_d);
|
2001-07-25 08:27:41 +08:00
|
|
|
g_object_set_data (G_OBJECT (options->supersample_w), "set_sensitive",
|
2001-11-09 03:14:51 +08:00
|
|
|
table);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
/* max depth scale */
|
|
|
|
options->max_depth_w =
|
|
|
|
gtk_adjustment_new (options->max_depth_d, 1.0, 10.0, 1.0, 1.0, 1.0);
|
|
|
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->max_depth_w));
|
|
|
|
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
|
|
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
|
|
|
_("Max Depth:"), 1.0, 1.0,
|
|
|
|
scale, 1, FALSE);
|
2001-08-01 10:57:58 +08:00
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT(options->max_depth_w), "value_changed",
|
|
|
|
G_CALLBACK (gimp_int_adjustment_update),
|
|
|
|
&options->max_depth);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
/* threshold scale */
|
|
|
|
options->threshold_w =
|
|
|
|
gtk_adjustment_new (options->threshold_d, 0.0, 4.0, 0.01, 0.01, 0.0);
|
|
|
|
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->threshold_w));
|
|
|
|
gtk_scale_set_digits (GTK_SCALE (scale), 2);
|
|
|
|
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
|
|
|
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
|
|
|
_("Threshold:"), 1.0, 1.0,
|
|
|
|
scale, 1, FALSE);
|
2001-08-01 10:57:58 +08:00
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT(options->threshold_w), "value_changed",
|
|
|
|
G_CALLBACK (gimp_double_adjustment_update),
|
|
|
|
&options->threshold);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
/* show the table */
|
|
|
|
gtk_widget_show (table);
|
|
|
|
|
|
|
|
return options;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-03-12 04:01:14 +08:00
|
|
|
static void
|
2001-07-18 04:50:01 +08:00
|
|
|
blend_options_reset (GimpToolOptions *tool_options)
|
2001-03-12 04:01:14 +08:00
|
|
|
{
|
2001-04-01 04:41:39 +08:00
|
|
|
BlendOptions *options;
|
|
|
|
|
|
|
|
options = (BlendOptions *) tool_options;
|
2001-03-12 04:01:14 +08:00
|
|
|
|
2001-04-01 04:41:39 +08:00
|
|
|
paint_options_reset (tool_options);
|
2001-03-12 04:01:14 +08:00
|
|
|
|
|
|
|
options->blend_mode = options->blend_mode_d;
|
|
|
|
options->gradient_type = options->gradient_type_d;
|
|
|
|
options->repeat = options->repeat_d;
|
|
|
|
|
2001-04-01 04:41:39 +08:00
|
|
|
gtk_option_menu_set_history (GTK_OPTION_MENU (options->blend_mode_w),
|
|
|
|
options->blend_mode_d);
|
2001-03-12 04:01:14 +08:00
|
|
|
gtk_option_menu_set_history (GTK_OPTION_MENU (options->gradient_type_w),
|
2001-04-01 04:41:39 +08:00
|
|
|
options->gradient_type_d);
|
|
|
|
gtk_option_menu_set_history (GTK_OPTION_MENU (options->repeat_w),
|
|
|
|
options->repeat_d);
|
|
|
|
|
|
|
|
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->offset_w),
|
|
|
|
options->offset_d);
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->supersample_w),
|
|
|
|
options->supersample_d);
|
|
|
|
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->max_depth_w),
|
|
|
|
options->max_depth_d);
|
|
|
|
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->threshold_w),
|
|
|
|
options->threshold_d);
|
2001-03-12 04:01:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gradient_type_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
gimp_menu_item_update (widget, data);
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive (blend_options->repeat_w,
|
|
|
|
(blend_options->gradient_type < 6));
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-03-10 09:57:10 +08:00
|
|
|
static void
|
2001-02-11 03:35:29 +08:00
|
|
|
blend_options_drop_gradient (GtkWidget *widget,
|
2001-03-12 04:01:14 +08:00
|
|
|
GimpViewable *viewable,
|
2001-02-11 03:35:29 +08:00
|
|
|
gpointer data)
|
2000-03-10 09:57:10 +08:00
|
|
|
{
|
2001-04-01 04:41:39 +08:00
|
|
|
BlendOptions *options;
|
|
|
|
|
|
|
|
options = (BlendOptions *) data;
|
|
|
|
|
2001-07-07 20:17:23 +08:00
|
|
|
gimp_context_set_gradient (gimp_get_user_context (the_gimp),
|
|
|
|
GIMP_GRADIENT (viewable));
|
2001-03-12 04:01:14 +08:00
|
|
|
|
2001-04-01 04:41:39 +08:00
|
|
|
gtk_option_menu_set_history (GTK_OPTION_MENU (options->blend_mode_w),
|
2000-03-10 09:57:10 +08:00
|
|
|
CUSTOM_MODE);
|
2001-04-01 04:41:39 +08:00
|
|
|
options->blend_mode = CUSTOM_MODE;
|
2000-03-10 09:57:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2001-03-12 04:01:14 +08:00
|
|
|
blend_options_drop_tool (GtkWidget *widget,
|
|
|
|
GimpViewable *viewable,
|
|
|
|
gpointer data)
|
2000-03-10 09:57:10 +08:00
|
|
|
{
|
2001-07-07 20:17:23 +08:00
|
|
|
gimp_context_set_tool (gimp_get_user_context (the_gimp),
|
|
|
|
GIMP_TOOL_INFO (viewable));
|
2000-03-10 09:57:10 +08:00
|
|
|
}
|