mirror of https://github.com/GNOME/gimp.git
minor cleanups.
2001-03-11 Michael Natterer <mitch@gimp.org> * app/gimplayerlistview.c: minor cleanups. * app/tools/Makefile.am * app/tools/gimpblendtool.[ch]: back again. * app/tools/gimptool.[ch] * app/tools/paint_options.c * app/tools/tools.c: changed accordingly.
This commit is contained in:
parent
b51d761fcc
commit
543bf74598
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2001-03-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gimplayerlistview.c: minor cleanups.
|
||||
|
||||
* app/tools/Makefile.am
|
||||
* app/tools/gimpblendtool.[ch]: back again.
|
||||
|
||||
* app/tools/gimptool.[ch]
|
||||
* app/tools/paint_options.c
|
||||
* app/tools/tools.c: changed accordingly.
|
||||
|
||||
2001-03-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/Makefile.am
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -73,8 +73,9 @@ static void gimp_layer_list_view_opacity_scale_changed
|
|||
(GtkAdjustment *adjustment,
|
||||
GimpLayerListView *view);
|
||||
|
||||
static void gimp_layer_list_view_layer_signal_handler (GimpLayer *layer,
|
||||
GimpLayerListView *view);
|
||||
static void gimp_layer_list_view_layer_signal_handler
|
||||
(GimpLayer *layer,
|
||||
GimpLayerListView *view);
|
||||
static void gimp_layer_list_view_update_options (GimpLayerListView *view,
|
||||
GimpLayer *layer);
|
||||
|
||||
|
@ -474,6 +475,15 @@ gimp_layer_list_view_layer_signal_handler (GimpLayer *layer,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#define BLOCK(object,function) \
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (object), \
|
||||
(function), view)
|
||||
|
||||
#define UNBLOCK(object,function) \
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (object), \
|
||||
(function), view)
|
||||
|
||||
static void
|
||||
gimp_layer_list_view_update_options (GimpLayerListView *view,
|
||||
GimpLayer *layer)
|
||||
|
@ -484,28 +494,27 @@ gimp_layer_list_view_update_options (GimpLayerListView *view,
|
|||
if (layer->preserve_trans !=
|
||||
GTK_TOGGLE_BUTTON (view->preserve_trans_toggle)->active)
|
||||
{
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (view->preserve_trans_toggle),
|
||||
gimp_layer_list_view_preserve_button_toggled,
|
||||
view);
|
||||
BLOCK (view->preserve_trans_toggle,
|
||||
gimp_layer_list_view_preserve_button_toggled);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (view->preserve_trans_toggle),
|
||||
layer->preserve_trans);
|
||||
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (view->preserve_trans_toggle),
|
||||
gimp_layer_list_view_preserve_button_toggled,
|
||||
view);
|
||||
UNBLOCK (view->preserve_trans_toggle,
|
||||
gimp_layer_list_view_preserve_button_toggled);
|
||||
}
|
||||
|
||||
if ((gdouble) layer->opacity / 2.55 != view->opacity_adjustment->value)
|
||||
{
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (view->opacity_adjustment),
|
||||
gimp_layer_list_view_opacity_scale_changed,
|
||||
view);
|
||||
BLOCK (view->opacity_adjustment,
|
||||
gimp_layer_list_view_opacity_scale_changed);
|
||||
|
||||
gtk_adjustment_set_value (view->opacity_adjustment, layer->opacity / 2.55);
|
||||
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (view->opacity_adjustment),
|
||||
gimp_layer_list_view_opacity_scale_changed,
|
||||
view);
|
||||
UNBLOCK (view->opacity_adjustment,
|
||||
gimp_layer_list_view_opacity_scale_changed);
|
||||
}
|
||||
}
|
||||
|
||||
#undef BLOCK
|
||||
#undef UNBLOCK
|
||||
|
|
|
@ -5,8 +5,8 @@ noinst_LTLIBRARIES = libapptools.la
|
|||
libapptools_la_SOURCES = \
|
||||
## gimpairbrushtool.c \
|
||||
## gimpairbrushtool.h \
|
||||
## gimpblendtool.c \
|
||||
## gimpblendtool.h \
|
||||
gimpblendtool.c \
|
||||
gimpblendtool.h \
|
||||
gimpbucketfilltool.c \
|
||||
gimpbucketfilltool.h \
|
||||
## gimpbycolorselecttool.c \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,8 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __BLEND_H__
|
||||
#define __BLEND_H__
|
||||
#ifndef __GIMP_BLEND_TOOL_H__
|
||||
#define __GIMP_BLEND_TOOL_H__
|
||||
|
||||
|
||||
#include "gimpdrawtool.h"
|
||||
|
||||
|
||||
typedef enum
|
||||
|
@ -53,26 +56,56 @@ typedef enum
|
|||
REPEAT_LAST /*< skip >*/
|
||||
} RepeatMode;
|
||||
|
||||
void blend (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
BlendMode blend_mode,
|
||||
gint paint_mode,
|
||||
GradientType gradient_type,
|
||||
gdouble opacity,
|
||||
gdouble offset,
|
||||
RepeatMode repeat,
|
||||
gint supersample,
|
||||
gint max_depth,
|
||||
gdouble threshold,
|
||||
gdouble startx,
|
||||
gdouble starty,
|
||||
gdouble endx,
|
||||
gdouble endy,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
|
||||
Tool * tools_new_blend (void);
|
||||
void tools_free_blend (Tool *tool);
|
||||
#define GIMP_TYPE_BLEND_TOOL (gimp_blend_tool_get_type ())
|
||||
#define GIMP_BLEND_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_BLEND_TOOL, GimpBlendTool))
|
||||
#define GIMP_IS_BLEND_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BLEND_TOOL))
|
||||
#define GIMP_BLEND_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_BLEND_TOOL, GimpBlendToolClass))
|
||||
#define GIMP_IS_BLEND_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_BLEND_TOOL))
|
||||
|
||||
|
||||
#endif /* __BLEND_H__ */
|
||||
typedef struct _GimpBlendTool GimpBlendTool;
|
||||
typedef struct _GimpBlendToolClass GimpBlendToolClass;
|
||||
|
||||
struct _GimpBlendTool
|
||||
{
|
||||
GimpDrawTool parent_instance;
|
||||
|
||||
gint startx; /* starting x coord */
|
||||
gint starty; /* starting y coord */
|
||||
|
||||
gint endx; /* ending x coord */
|
||||
gint endy; /* ending y coord */
|
||||
guint context_id; /* for the statusbar */
|
||||
};
|
||||
|
||||
struct _GimpBlendToolClass
|
||||
{
|
||||
GimpDrawToolClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GtkType gimp_blend_tool_get_type (void);
|
||||
|
||||
void gimp_blend_tool_register (void);
|
||||
|
||||
void blend (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
BlendMode blend_mode,
|
||||
gint paint_mode,
|
||||
GradientType gradient_type,
|
||||
gdouble opacity,
|
||||
gdouble offset,
|
||||
RepeatMode repeat,
|
||||
gint supersample,
|
||||
gint max_depth,
|
||||
gdouble threshold,
|
||||
gdouble startx,
|
||||
gdouble starty,
|
||||
gdouble endx,
|
||||
gdouble endy,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
|
||||
|
||||
#endif /* __GIMP_BLEND_TOOL_H__ */
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "paint_options.h"
|
||||
#include "tool_manager.h"
|
||||
|
||||
#include "gimpblendtool.h"
|
||||
#include "gimpbucketfilltool.h"
|
||||
#include "gimpinktool.h"
|
||||
#include "gimppaintbrushtool.h"
|
||||
|
|
|
@ -555,7 +555,6 @@ STUB(smudge_non_gui_default)
|
|||
STUB(transform_core_do)
|
||||
STUB(airbrush_non_gui)
|
||||
STUB(airbrush_non_gui_default)
|
||||
STUB(blend)
|
||||
STUB(by_color_select)
|
||||
STUB(clone_non_gui)
|
||||
STUB(clone_non_gui_default)
|
||||
|
@ -821,34 +820,6 @@ ToolInfo tool_info[] =
|
|||
}
|
||||
},
|
||||
|
||||
{
|
||||
NULL,
|
||||
N_("Blend"),
|
||||
N_("/Tools/Paint Tools/Blend"),
|
||||
"L",
|
||||
(char **) gradient_bits,
|
||||
NULL,
|
||||
NULL,
|
||||
N_("Fill with a color gradient"),
|
||||
"tools/blend.html",
|
||||
BLEND,
|
||||
tools_new_blend,
|
||||
tools_free_blend,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
{
|
||||
blend_small_bits, blend_small_mask_bits,
|
||||
blend_small_width, blend_small_height,
|
||||
0, 0, NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
NULL, NULL,
|
||||
0, 0,
|
||||
0, 0, NULL, NULL, NULL
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
NULL,
|
||||
N_("Pencil"),
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#define GIMP_TYPE_ISCISSORS_TOOL GTK_TYPE_NONE
|
||||
#define GIMP_TYPE_BY_COLOR_SELECT_TOOL GTK_TYPE_NONE
|
||||
#define GIMP_TYPE_BLEND_TOOL GTK_TYPE_NONE
|
||||
#define GIMP_TYPE_PENCIL_TOOL GTK_TYPE_NONE
|
||||
#define GIMP_TYPE_ERASER_TOOL GTK_TYPE_NONE
|
||||
#define GIMP_TYPE_AIRBRUSH_TOOL GTK_TYPE_NONE
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "paint_options.h"
|
||||
#include "tool_manager.h"
|
||||
|
||||
#include "gimpblendtool.h"
|
||||
#include "gimpbucketfilltool.h"
|
||||
#include "gimpinktool.h"
|
||||
#include "gimppaintbrushtool.h"
|
||||
|
|
|
@ -57,46 +57,44 @@
|
|||
void
|
||||
register_tools (void)
|
||||
{
|
||||
/* register tools in reverse order */
|
||||
|
||||
/* paint tools */
|
||||
|
||||
/* gimp_smudge_tool_register (); */
|
||||
/* gimp_dodgeburn_tool_register (); */
|
||||
gimp_ink_tool_register ();
|
||||
/* gimp_convolve_tool_register (): */
|
||||
/* gimp_clone_tool_register (); */
|
||||
/* gimp_airbrush_tool_register (); */
|
||||
/* gimp_eraser_tool_register (); */
|
||||
/* gimp_pencil_tool_register (); */
|
||||
gimp_paintbrush_tool_register ();
|
||||
gimp_blend_tool_register ();
|
||||
gimp_bucket_fill_tool_register ();
|
||||
gimp_text_tool_register ();
|
||||
|
||||
/* transform tools */
|
||||
|
||||
/* gimp_flip_tool_registrer (); */
|
||||
/* gimp_perspective_tool_register (); */
|
||||
/* gimp_shear_tool_register (); */
|
||||
/* gimp_scale_tool_register (); */
|
||||
/* gimp_rotate_tool_register (); */
|
||||
gimp_crop_tool_register ();
|
||||
gimp_move_tool_register ();
|
||||
|
||||
/* non-modifying tools */
|
||||
|
||||
gimp_measure_tool_register ();
|
||||
gimp_magnify_tool_register ();
|
||||
gimp_crop_tool_register ();
|
||||
gimp_color_picker_tool_register ();
|
||||
gimp_text_tool_register ();
|
||||
gimp_move_tool_register ();
|
||||
|
||||
/* selection tool */
|
||||
|
||||
/* gimp_iscissors_tool_register (); */
|
||||
gimp_fuzzy_select_tool_register ();
|
||||
gimp_free_select_tool_register ();
|
||||
gimp_ellipse_select_tool_register ();
|
||||
gimp_rect_select_tool_register ();
|
||||
|
||||
/*
|
||||
snatched from the pdb. For inspiration only. ;)
|
||||
|
||||
procedural_db_register (&airbrush_proc);
|
||||
procedural_db_register (&airbrush_default_proc);
|
||||
procedural_db_register (&blend_proc);
|
||||
procedural_db_register (&bucket_fill_proc);
|
||||
procedural_db_register (&by_color_select_proc);
|
||||
procedural_db_register (&clone_proc);
|
||||
procedural_db_register (&clone_default_proc);
|
||||
procedural_db_register (&color_picker_proc);
|
||||
procedural_db_register (&convolve_proc);
|
||||
procedural_db_register (&convolve_default_proc);
|
||||
procedural_db_register (&crop_proc);
|
||||
procedural_db_register (&dodgeburn_proc);
|
||||
procedural_db_register (&dodgeburn_default_proc);
|
||||
procedural_db_register (&eraser_proc);
|
||||
procedural_db_register (&eraser_default_proc);
|
||||
procedural_db_register (&flip_proc);
|
||||
procedural_db_register (&fuzzy_select_proc);
|
||||
procedural_db_register (&pencil_proc);
|
||||
procedural_db_register (&perspective_proc);
|
||||
procedural_db_register (&rotate_proc);
|
||||
procedural_db_register (&scale_proc);
|
||||
procedural_db_register (&shear_proc);
|
||||
procedural_db_register (&smudge_proc);
|
||||
procedural_db_register (&smudge_default_proc);
|
||||
procedural_db_register (&transform_2d_proc); */
|
||||
}
|
||||
|
|
|
@ -73,8 +73,9 @@ static void gimp_layer_list_view_opacity_scale_changed
|
|||
(GtkAdjustment *adjustment,
|
||||
GimpLayerListView *view);
|
||||
|
||||
static void gimp_layer_list_view_layer_signal_handler (GimpLayer *layer,
|
||||
GimpLayerListView *view);
|
||||
static void gimp_layer_list_view_layer_signal_handler
|
||||
(GimpLayer *layer,
|
||||
GimpLayerListView *view);
|
||||
static void gimp_layer_list_view_update_options (GimpLayerListView *view,
|
||||
GimpLayer *layer);
|
||||
|
||||
|
@ -474,6 +475,15 @@ gimp_layer_list_view_layer_signal_handler (GimpLayer *layer,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#define BLOCK(object,function) \
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (object), \
|
||||
(function), view)
|
||||
|
||||
#define UNBLOCK(object,function) \
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (object), \
|
||||
(function), view)
|
||||
|
||||
static void
|
||||
gimp_layer_list_view_update_options (GimpLayerListView *view,
|
||||
GimpLayer *layer)
|
||||
|
@ -484,28 +494,27 @@ gimp_layer_list_view_update_options (GimpLayerListView *view,
|
|||
if (layer->preserve_trans !=
|
||||
GTK_TOGGLE_BUTTON (view->preserve_trans_toggle)->active)
|
||||
{
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (view->preserve_trans_toggle),
|
||||
gimp_layer_list_view_preserve_button_toggled,
|
||||
view);
|
||||
BLOCK (view->preserve_trans_toggle,
|
||||
gimp_layer_list_view_preserve_button_toggled);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (view->preserve_trans_toggle),
|
||||
layer->preserve_trans);
|
||||
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (view->preserve_trans_toggle),
|
||||
gimp_layer_list_view_preserve_button_toggled,
|
||||
view);
|
||||
UNBLOCK (view->preserve_trans_toggle,
|
||||
gimp_layer_list_view_preserve_button_toggled);
|
||||
}
|
||||
|
||||
if ((gdouble) layer->opacity / 2.55 != view->opacity_adjustment->value)
|
||||
{
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (view->opacity_adjustment),
|
||||
gimp_layer_list_view_opacity_scale_changed,
|
||||
view);
|
||||
BLOCK (view->opacity_adjustment,
|
||||
gimp_layer_list_view_opacity_scale_changed);
|
||||
|
||||
gtk_adjustment_set_value (view->opacity_adjustment, layer->opacity / 2.55);
|
||||
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (view->opacity_adjustment),
|
||||
gimp_layer_list_view_opacity_scale_changed,
|
||||
view);
|
||||
UNBLOCK (view->opacity_adjustment,
|
||||
gimp_layer_list_view_opacity_scale_changed);
|
||||
}
|
||||
}
|
||||
|
||||
#undef BLOCK
|
||||
#undef UNBLOCK
|
||||
|
|
|
@ -73,8 +73,9 @@ static void gimp_layer_list_view_opacity_scale_changed
|
|||
(GtkAdjustment *adjustment,
|
||||
GimpLayerListView *view);
|
||||
|
||||
static void gimp_layer_list_view_layer_signal_handler (GimpLayer *layer,
|
||||
GimpLayerListView *view);
|
||||
static void gimp_layer_list_view_layer_signal_handler
|
||||
(GimpLayer *layer,
|
||||
GimpLayerListView *view);
|
||||
static void gimp_layer_list_view_update_options (GimpLayerListView *view,
|
||||
GimpLayer *layer);
|
||||
|
||||
|
@ -474,6 +475,15 @@ gimp_layer_list_view_layer_signal_handler (GimpLayer *layer,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#define BLOCK(object,function) \
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (object), \
|
||||
(function), view)
|
||||
|
||||
#define UNBLOCK(object,function) \
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (object), \
|
||||
(function), view)
|
||||
|
||||
static void
|
||||
gimp_layer_list_view_update_options (GimpLayerListView *view,
|
||||
GimpLayer *layer)
|
||||
|
@ -484,28 +494,27 @@ gimp_layer_list_view_update_options (GimpLayerListView *view,
|
|||
if (layer->preserve_trans !=
|
||||
GTK_TOGGLE_BUTTON (view->preserve_trans_toggle)->active)
|
||||
{
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (view->preserve_trans_toggle),
|
||||
gimp_layer_list_view_preserve_button_toggled,
|
||||
view);
|
||||
BLOCK (view->preserve_trans_toggle,
|
||||
gimp_layer_list_view_preserve_button_toggled);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (view->preserve_trans_toggle),
|
||||
layer->preserve_trans);
|
||||
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (view->preserve_trans_toggle),
|
||||
gimp_layer_list_view_preserve_button_toggled,
|
||||
view);
|
||||
UNBLOCK (view->preserve_trans_toggle,
|
||||
gimp_layer_list_view_preserve_button_toggled);
|
||||
}
|
||||
|
||||
if ((gdouble) layer->opacity / 2.55 != view->opacity_adjustment->value)
|
||||
{
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (view->opacity_adjustment),
|
||||
gimp_layer_list_view_opacity_scale_changed,
|
||||
view);
|
||||
BLOCK (view->opacity_adjustment,
|
||||
gimp_layer_list_view_opacity_scale_changed);
|
||||
|
||||
gtk_adjustment_set_value (view->opacity_adjustment, layer->opacity / 2.55);
|
||||
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (view->opacity_adjustment),
|
||||
gimp_layer_list_view_opacity_scale_changed,
|
||||
view);
|
||||
UNBLOCK (view->opacity_adjustment,
|
||||
gimp_layer_list_view_opacity_scale_changed);
|
||||
}
|
||||
}
|
||||
|
||||
#undef BLOCK
|
||||
#undef UNBLOCK
|
||||
|
|
Loading…
Reference in New Issue