renamed gimp_image_active_drawable() to gimp_image_get_active_drawable().

2007-07-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: renamed gimp_image_active_drawable() to
	gimp_image_get_active_drawable().

	* app/[lots of files]
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

svn path=/trunk/; revision=22958
This commit is contained in:
Sven Neumann 2007-07-19 14:59:51 +00:00 committed by Sven Neumann
parent f6c626fba3
commit a5d10b2ff0
57 changed files with 124 additions and 126 deletions

View file

@ -1,3 +1,12 @@
2007-07-19 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.[ch]: renamed gimp_image_active_drawable() to
gimp_image_get_active_drawable().
* app/[lots of files]
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/image.pdb: changed accordingly.
2007-07-19 Sven Neumann <sven@gimp.org> 2007-07-19 Sven Neumann <sven@gimp.org>
* app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up. * app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up.

View file

@ -81,7 +81,7 @@ GimpObject * action_select_object (GimpActionSelectType select_type,
#define return_if_no_drawable(image,drawable,data) \ #define return_if_no_drawable(image,drawable,data) \
return_if_no_image (image,data); \ return_if_no_image (image,data); \
drawable = gimp_image_active_drawable (image); \ drawable = gimp_image_get_active_drawable (image); \
if (! drawable) \ if (! drawable) \
return return

View file

@ -148,7 +148,7 @@ buffers_paste (GimpBufferView *view,
if (image) if (image)
{ {
gimp_edit_paste (image, gimp_image_active_drawable (image), gimp_edit_paste (image, gimp_image_get_active_drawable (image),
buffer, paste_into, x, y, width, height); buffer, paste_into, x, y, width, height);
gimp_image_flush (image); gimp_image_flush (image);

View file

@ -164,7 +164,7 @@ drawable_actions_update (GimpActionGroup *group,
if (image) if (image)
{ {
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (drawable) if (drawable)
{ {

View file

@ -261,7 +261,7 @@ edit_actions_update (GimpActionGroup *group,
GimpUndo *undo; GimpUndo *undo;
GimpUndo *redo; GimpUndo *redo;
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
undo_enabled = gimp_image_undo_is_enabled (image); undo_enabled = gimp_image_undo_is_enabled (image);

View file

@ -439,7 +439,7 @@ edit_paste (GimpDisplay *display,
&x, &y, &width, &height); &x, &y, &width, &height);
if (gimp_edit_paste (display->image, if (gimp_edit_paste (display->image,
gimp_image_active_drawable (display->image), gimp_image_get_active_drawable (display->image),
buffer, paste_into, x, y, width, height)) buffer, paste_into, x, y, width, height))
{ {
gimp_image_flush (display->image); gimp_image_flush (display->image);
@ -461,10 +461,8 @@ cut_named_buffer_callback (GtkWidget *widget,
const gchar *name, const gchar *name,
gpointer data) gpointer data)
{ {
GimpImage *image = GIMP_IMAGE (data); GimpImage *image = GIMP_IMAGE (data);
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (image);
drawable = gimp_image_active_drawable (image);
if (! drawable) if (! drawable)
{ {
@ -488,10 +486,8 @@ copy_named_buffer_callback (GtkWidget *widget,
const gchar *name, const gchar *name,
gpointer data) gpointer data)
{ {
GimpImage *image = GIMP_IMAGE (data); GimpImage *image = GIMP_IMAGE (data);
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (image);
drawable = gimp_image_active_drawable (image);
if (! drawable) if (! drawable)
{ {

View file

@ -226,7 +226,7 @@ file_actions_update (GimpActionGroup *group,
GimpDrawable *drawable = NULL; GimpDrawable *drawable = NULL;
if (image) if (image)
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
#define SET_SENSITIVE(action,condition) \ #define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0) gimp_action_group_set_action_sensitive (group, action, (condition) != 0)

View file

@ -193,7 +193,7 @@ file_save_cmd_callback (GtkAction *action,
save_mode = (GimpSaveMode) value; save_mode = (GimpSaveMode) value;
if (! gimp_image_active_drawable (image)) if (! gimp_image_get_active_drawable (image))
return; return;
switch (save_mode) switch (save_mode)

View file

@ -225,7 +225,7 @@ plug_in_actions_update (GimpActionGroup *group,
if (image) if (image)
{ {
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable) if (drawable)
type = gimp_drawable_type (drawable); type = gimp_drawable_type (drawable);

View file

@ -434,7 +434,7 @@ plug_in_collect_display_args (GtkAction *action,
if (args->n_values > n_args && if (args->n_values > n_args &&
GIMP_IS_PARAM_SPEC_DRAWABLE_ID (pspecs[n_args])) GIMP_IS_PARAM_SPEC_DRAWABLE_ID (pspecs[n_args]))
{ {
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable) if (drawable)
{ {

View file

@ -139,7 +139,7 @@ select_actions_update (GimpActionGroup *group,
if (image) if (image)
{ {
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
fs = (gimp_image_floating_sel (image) != NULL); fs = (gimp_image_floating_sel (image) != NULL);
sel = ! gimp_channel_is_empty (gimp_image_get_mask (image)); sel = ! gimp_channel_is_empty (gimp_image_get_mask (image));

View file

@ -121,7 +121,7 @@ select_float_cmd_callback (GtkAction *action,
return_if_no_image (image, data); return_if_no_image (image, data);
gimp_selection_float (gimp_image_get_mask (image), gimp_selection_float (gimp_image_get_mask (image),
gimp_image_active_drawable (image), gimp_image_get_active_drawable (image),
action_data_get_context (data), action_data_get_context (data),
TRUE, 0, 0); TRUE, 0, 0);
gimp_image_flush (image); gimp_image_flush (image);
@ -299,7 +299,7 @@ select_stroke_cmd_callback (GtkAction *action,
return_if_no_image (image, data); return_if_no_image (image, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (! drawable) if (! drawable)
{ {
@ -330,7 +330,7 @@ select_stroke_last_vals_cmd_callback (GtkAction *action,
return_if_no_context (context, data); return_if_no_context (context, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (! drawable) if (! drawable)
{ {

View file

@ -355,7 +355,7 @@ vectors_stroke_cmd_callback (GtkAction *action,
return_if_no_vectors (image, vectors, data); return_if_no_vectors (image, vectors, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (! drawable) if (! drawable)
{ {
@ -387,7 +387,7 @@ vectors_stroke_last_vals_cmd_callback (GtkAction *action,
return_if_no_context (context, data); return_if_no_context (context, data);
return_if_no_widget (widget, data); return_if_no_widget (widget, data);
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (! drawable) if (! drawable)
{ {

View file

@ -313,7 +313,7 @@ gimp_image_crop_auto_shrink (GimpImage *image,
if (active_drawable_only) if (active_drawable_only)
{ {
active_drawable = gimp_image_active_drawable (image); active_drawable = gimp_image_get_active_drawable (image);
if (! active_drawable) if (! active_drawable)
goto FINISH; goto FINISH;

View file

@ -51,7 +51,7 @@ gimp_image_pick_color (GimpImage *image,
if (! sample_merged) if (! sample_merged)
{ {
if (! drawable) if (! drawable)
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -2509,7 +2509,7 @@ gimp_image_get_vectors (const GimpImage *image)
} }
GimpDrawable * GimpDrawable *
gimp_image_active_drawable (const GimpImage *image) gimp_image_get_active_drawable (const GimpImage *image)
{ {
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
@ -3711,7 +3711,7 @@ gimp_image_coords_in_active_pickable (GimpImage *image,
} }
else else
{ {
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable) if (drawable)
{ {

View file

@ -410,7 +410,7 @@ GimpContainer * gimp_image_get_layers (const GimpImage *image);
GimpContainer * gimp_image_get_channels (const GimpImage *image); GimpContainer * gimp_image_get_channels (const GimpImage *image);
GimpContainer * gimp_image_get_vectors (const GimpImage *image); GimpContainer * gimp_image_get_vectors (const GimpImage *image);
GimpDrawable * gimp_image_active_drawable (const GimpImage *image); GimpDrawable * gimp_image_get_active_drawable (const GimpImage *image);
GimpLayer * gimp_image_get_active_layer (const GimpImage *image); GimpLayer * gimp_image_get_active_layer (const GimpImage *image);
GimpChannel * gimp_image_get_active_channel (const GimpImage *image); GimpChannel * gimp_image_get_active_channel (const GimpImage *image);
GimpVectors * gimp_image_get_active_vectors (const GimpImage *image); GimpVectors * gimp_image_get_active_vectors (const GimpImage *image);

View file

@ -68,7 +68,7 @@ floating_sel_attach (GimpLayer *layer,
* to the drawable * to the drawable
*/ */
if (drawable == (GimpDrawable *) floating_sel) if (drawable == (GimpDrawable *) floating_sel)
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
} }
/* set the drawable and allocate a backing store */ /* set the drawable and allocate a backing store */

View file

@ -353,7 +353,7 @@ gimp_selection_boundary (GimpChannel *channel,
return TRUE; return TRUE;
} }
else if ((drawable = gimp_image_active_drawable (image)) && else if ((drawable = gimp_image_get_active_drawable (image)) &&
GIMP_IS_CHANNEL (drawable)) GIMP_IS_CHANNEL (drawable))
{ {
/* Otherwise, return the boundary...if a channel is active */ /* Otherwise, return the boundary...if a channel is active */

View file

@ -248,14 +248,13 @@ offset_response (GtkWidget *widget,
{ {
if (response_id == GTK_RESPONSE_OK) if (response_id == GTK_RESPONSE_OK)
{ {
GimpImage *image; GimpImage *image = dialog->image;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
if ((image = dialog->image) != NULL) if (image)
{ {
drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
gint offset_x;
gint offset_y;
offset_x = offset_x =
RINT (gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (dialog->off_se), RINT (gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (dialog->off_se),
@ -280,11 +279,11 @@ static void
offset_halfheight_callback (GtkWidget *widget, offset_halfheight_callback (GtkWidget *widget,
OffsetDialog *dialog) OffsetDialog *dialog)
{ {
GimpImage *image = dialog->image; GimpImage *image = dialog->image;
if (image) if (image)
{ {
GimpItem *item = GIMP_ITEM (gimp_image_active_drawable (image)); GimpItem *item = GIMP_ITEM (gimp_image_get_active_drawable (image));
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (dialog->off_se), gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (dialog->off_se),
0, item->width / 2); 0, item->width / 2);

View file

@ -271,11 +271,9 @@ stroke_dialog_response (GtkWidget *widget,
case GTK_RESPONSE_OK: case GTK_RESPONSE_OK:
{ {
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (image);
GimpStrokeDesc *saved_desc; GimpStrokeDesc *saved_desc;
drawable = gimp_image_active_drawable (image);
if (! drawable) if (! drawable)
{ {
gimp_message (context->gimp, G_OBJECT (widget), gimp_message (context->gimp, G_OBJECT (widget),

View file

@ -850,7 +850,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
display); display);
} }
else if ((active_tool->drawable != else if ((active_tool->drawable !=
gimp_image_active_drawable (image)) && gimp_image_get_active_drawable (image)) &&
! gimp_tool_control_get_preserve (active_tool->control)) ! gimp_tool_control_get_preserve (active_tool->control))
{ {
/* create a new one, deleting the current /* create a new one, deleting the current

View file

@ -304,7 +304,7 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell,
if (image->gimp->busy) if (image->gimp->busy)
return; return;
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (! drawable) if (! drawable)
return; return;
@ -389,7 +389,7 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
/* FIXME: popup a menu for selecting "Paste Into" */ /* FIXME: popup a menu for selecting "Paste Into" */
gimp_edit_paste (image, gimp_image_active_drawable (image), gimp_edit_paste (image, gimp_image_get_active_drawable (image),
buffer, FALSE, buffer, FALSE,
x, y, width, height); x, y, width, height);

View file

@ -321,7 +321,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
case 'n': /* active drawable name */ case 'n': /* active drawable name */
{ {
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable) if (drawable)
i += print (title, title_len, i, "%s", i += print (title, title_len, i, "%s",
@ -333,7 +333,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
case 'P': /* active drawable PDB id */ case 'P': /* active drawable PDB id */
{ {
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable) if (drawable)
i += print (title, title_len, i, "%d", i += print (title, title_len, i, "%d",

View file

@ -107,7 +107,7 @@ gimp_display_shell_transform_xy (GimpDisplayShell *shell,
{ {
GimpItem *item; GimpItem *item;
item = GIMP_ITEM (gimp_image_active_drawable (shell->display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image));
gimp_item_offsets (item, &offset_x, &offset_y); gimp_item_offsets (item, &offset_x, &offset_y);
} }
@ -162,7 +162,7 @@ gimp_display_shell_untransform_xy (GimpDisplayShell *shell,
{ {
GimpItem *item; GimpItem *item;
item = GIMP_ITEM (gimp_image_active_drawable (shell->display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image));
gimp_item_offsets (item, &offset_x, &offset_y); gimp_item_offsets (item, &offset_x, &offset_y);
} }
@ -210,7 +210,7 @@ gimp_display_shell_transform_xy_f (GimpDisplayShell *shell,
{ {
GimpItem *item; GimpItem *item;
item = GIMP_ITEM (gimp_image_active_drawable (shell->display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image));
gimp_item_offsets (item, &offset_x, &offset_y); gimp_item_offsets (item, &offset_x, &offset_y);
} }
@ -257,7 +257,7 @@ gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell,
{ {
GimpItem *item; GimpItem *item;
item = GIMP_ITEM (gimp_image_active_drawable (shell->display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image));
gimp_item_offsets (item, &offset_x, &offset_y); gimp_item_offsets (item, &offset_x, &offset_y);
} }
@ -294,7 +294,7 @@ gimp_display_shell_transform_points (GimpDisplayShell *shell,
{ {
GimpItem *item; GimpItem *item;
item = GIMP_ITEM (gimp_image_active_drawable (shell->display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image));
gimp_item_offsets (item, &offset_x, &offset_y); gimp_item_offsets (item, &offset_x, &offset_y);
} }
@ -346,7 +346,7 @@ gimp_display_shell_transform_coords (GimpDisplayShell *shell,
{ {
GimpItem *item; GimpItem *item;
item = GIMP_ITEM (gimp_image_active_drawable (shell->display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image));
gimp_item_offsets (item, &offset_x, &offset_y); gimp_item_offsets (item, &offset_x, &offset_y);
} }
@ -398,7 +398,7 @@ gimp_display_shell_transform_segments (GimpDisplayShell *shell,
{ {
GimpItem *item; GimpItem *item;
item = GIMP_ITEM (gimp_image_active_drawable (shell->display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (shell->display->image));
gimp_item_offsets (item, &offset_x, &offset_y); gimp_item_offsets (item, &offset_x, &offset_y);
} }

View file

@ -94,7 +94,7 @@ file_save (GimpImage *image,
g_return_val_if_fail (error == NULL || *error == NULL, g_return_val_if_fail (error == NULL || *error == NULL,
GIMP_PDB_CALLING_ERROR); GIMP_PDB_CALLING_ERROR);
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
if (! drawable) if (! drawable)
return GIMP_PDB_EXECUTION_ERROR; return GIMP_PDB_EXECUTION_ERROR;

View file

@ -611,7 +611,7 @@ image_get_active_drawable_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
} }
return_vals = gimp_procedure_get_return_values (procedure, success); return_vals = gimp_procedure_get_return_values (procedure, success);

View file

@ -316,7 +316,7 @@ path_stroke_current_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
GimpVectors *vectors = gimp_image_get_active_vectors (image); GimpVectors *vectors = gimp_image_get_active_vectors (image);
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (vectors && drawable) if (vectors && drawable)
{ {

View file

@ -150,7 +150,7 @@ gimp_blend_tool_initialize (GimpTool *tool,
GimpDisplay *display, GimpDisplay *display,
GError **error) GError **error)
{ {
GimpDrawable *drawable = gimp_image_active_drawable (display->image); GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error)) if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))
{ {
@ -215,6 +215,7 @@ gimp_blend_tool_button_release (GimpTool *tool,
((blend_tool->start_x != blend_tool->end_x) || ((blend_tool->start_x != blend_tool->end_x) ||
(blend_tool->start_y != blend_tool->end_y))) (blend_tool->start_y != blend_tool->end_y)))
{ {
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
GimpProgress *progress; GimpProgress *progress;
gint off_x; gint off_x;
gint off_y; gint off_y;
@ -222,10 +223,9 @@ gimp_blend_tool_button_release (GimpTool *tool,
progress = gimp_progress_start (GIMP_PROGRESS (display), progress = gimp_progress_start (GIMP_PROGRESS (display),
_("Blending"), FALSE); _("Blending"), FALSE);
gimp_item_offsets (GIMP_ITEM (gimp_image_active_drawable (image)), gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
&off_x, &off_y);
gimp_drawable_blend (gimp_image_active_drawable (image), gimp_drawable_blend (drawable,
context, context,
GIMP_CUSTOM_MODE, GIMP_CUSTOM_MODE,
gimp_context_get_paint_mode (context), gimp_context_get_paint_mode (context),
@ -335,7 +335,7 @@ gimp_blend_tool_cursor_update (GimpTool *tool,
GdkModifierType state, GdkModifierType state,
GimpDisplay *display) GimpDisplay *display)
{ {
switch (gimp_drawable_type (gimp_image_active_drawable (display->image))) switch (gimp_drawable_type (gimp_image_get_active_drawable (display->image)))
{ {
case GIMP_INDEXED_IMAGE: case GIMP_INDEXED_IMAGE:
case GIMP_INDEXEDA_IMAGE: case GIMP_INDEXEDA_IMAGE:

View file

@ -158,7 +158,7 @@ gimp_brightness_contrast_tool_initialize (GimpTool *tool,
GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (tool); GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -205,7 +205,7 @@ gimp_brush_tool_oper_update (GimpTool *tool,
proximity, display); proximity, display);
if (! gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)) && if (! gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)) &&
gimp_image_active_drawable (display->image) && proximity) gimp_image_get_active_drawable (display->image) && proximity)
{ {
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool); GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core); GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);

View file

@ -125,7 +125,7 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool,
gimp_image_coords_in_active_pickable (display->image, coords, gimp_image_coords_in_active_pickable (display->image, coords,
options->sample_merged, TRUE)) options->sample_merged, TRUE))
{ {
GimpDrawable *drawable = gimp_image_active_drawable (display->image); GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
GimpContext *context = GIMP_CONTEXT (options); GimpContext *context = GIMP_CONTEXT (options);
gint x, y; gint x, y;

View file

@ -100,7 +100,7 @@ gimp_by_color_select_tool_get_mask (GimpRegionSelectTool *region_select,
GimpRGB color; GimpRGB color;
gint x, y; gint x, y;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
x = region_select->x; x = region_select->x;
y = region_select->y; y = region_select->y;

View file

@ -142,7 +142,7 @@ gimp_color_balance_tool_initialize (GimpTool *tool,
GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (tool); GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -137,9 +137,7 @@ gimp_colorize_tool_initialize (GimpTool *tool,
GError **error) GError **error)
{ {
GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (tool); GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
drawable = gimp_image_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -241,10 +241,8 @@ gimp_curves_tool_initialize (GimpTool *tool,
GimpDisplay *display, GimpDisplay *display,
GError **error) GError **error)
{ {
GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool); GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
drawable = gimp_image_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;
@ -303,9 +301,6 @@ gimp_curves_tool_button_release (GimpTool *tool,
GimpDisplay *display) GimpDisplay *display)
{ {
GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool); GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
GimpDrawable *drawable;
drawable = gimp_image_active_drawable (display->image);
if (state & GDK_SHIFT_MASK) if (state & GDK_SHIFT_MASK)
{ {

View file

@ -175,7 +175,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS) if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
else else
active_item = GIMP_ITEM (gimp_image_active_drawable (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_drawable (display->image));
switch (edit_select->edit_mode) switch (edit_select->edit_mode)
{ {
@ -424,7 +424,7 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS) if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
else else
active_item = GIMP_ITEM (gimp_image_active_drawable (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_drawable (display->image));
gimp_edit_selection_tool_calc_coords (edit_select, gimp_edit_selection_tool_calc_coords (edit_select,
coords->x, coords->x,
@ -538,7 +538,7 @@ gimp_edit_selection_tool_motion (GimpTool *tool,
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS) if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
else else
active_item = GIMP_ITEM (gimp_image_active_drawable (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_drawable (display->image));
gimp_item_offsets (active_item, &off_x, &off_y); gimp_item_offsets (active_item, &off_x, &off_y);
@ -640,7 +640,8 @@ gimp_edit_selection_tool_motion (GimpTool *tool,
edit_select->edit_mode = GIMP_TRANSLATE_MODE_FLOATING_SEL; edit_select->edit_mode = GIMP_TRANSLATE_MODE_FLOATING_SEL;
active_item = GIMP_ITEM (gimp_image_active_drawable (display->image)); active_item =
GIMP_ITEM (gimp_image_get_active_drawable (display->image));
/* fall through */ /* fall through */
@ -679,7 +680,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool)
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS) if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
else else
active_item = GIMP_ITEM (gimp_image_active_drawable (display->image)); active_item = GIMP_ITEM (gimp_image_get_active_drawable (display->image));
switch (edit_select->edit_mode) switch (edit_select->edit_mode)
{ {
@ -1066,7 +1067,7 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
break; break;
case GIMP_TRANSFORM_TYPE_LAYER: case GIMP_TRANSFORM_TYPE_LAYER:
item = GIMP_ITEM (gimp_image_active_drawable (display->image)); item = GIMP_ITEM (gimp_image_get_active_drawable (display->image));
if (item) if (item)
{ {

View file

@ -608,11 +608,12 @@ gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
{ {
GimpForegroundSelectTool *fg_select; GimpForegroundSelectTool *fg_select;
GimpForegroundSelectOptions *options; GimpForegroundSelectOptions *options;
GimpImage *image = display->image; GimpImage *image = display->image;
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable;
GimpScanConvert *scan_convert; GimpScanConvert *scan_convert;
GimpChannel *mask; GimpChannel *mask;
drawable = gimp_image_get_active_drawable (image);
fg_select = GIMP_FOREGROUND_SELECT_TOOL (free_sel); fg_select = GIMP_FOREGROUND_SELECT_TOOL (free_sel);
options = GIMP_FOREGROUND_SELECT_TOOL_GET_OPTIONS (free_sel); options = GIMP_FOREGROUND_SELECT_TOOL_GET_OPTIONS (free_sel);

View file

@ -97,7 +97,7 @@ gimp_fuzzy_select_tool_get_mask (GimpRegionSelectTool *region_select,
GimpDrawable *drawable; GimpDrawable *drawable;
gint x, y; gint x, y;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
x = region_select->x; x = region_select->x;
y = region_select->y; y = region_select->y;

View file

@ -162,7 +162,7 @@ gimp_hue_saturation_tool_initialize (GimpTool *tool,
GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (tool); GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -304,7 +304,7 @@ gimp_image_map_tool_initialize (GimpTool *tool,
gtk_widget_show (vbox); gtk_widget_show (vbox);
} }
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (image_map_tool->shell), gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (image_map_tool->shell),
GIMP_VIEWABLE (drawable), GIMP_VIEWABLE (drawable),

View file

@ -224,10 +224,8 @@ gimp_levels_tool_initialize (GimpTool *tool,
GimpDisplay *display, GimpDisplay *display,
GError **error) GError **error)
{ {
GimpLevelsTool *l_tool = GIMP_LEVELS_TOOL (tool); GimpLevelsTool *l_tool = GIMP_LEVELS_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
drawable = gimp_image_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -323,7 +323,9 @@ gimp_move_tool_button_press (GimpTool *tool,
case GIMP_TRANSFORM_TYPE_LAYER: case GIMP_TRANSFORM_TYPE_LAYER:
{ {
GimpDrawable *drawable = gimp_image_active_drawable (display->image); GimpDrawable *drawable;
drawable = gimp_image_get_active_drawable (display->image);
if (GIMP_IS_LAYER_MASK (drawable)) if (GIMP_IS_LAYER_MASK (drawable))
gimp_edit_selection_tool_start (tool, display, coords, gimp_edit_selection_tool_start (tool, display, coords,
@ -704,7 +706,7 @@ gimp_move_tool_cursor_update (GimpTool *tool,
} }
else if (options->move_current) else if (options->move_current)
{ {
if (! gimp_image_active_drawable (display->image)) if (! gimp_image_get_active_drawable (display->image))
modifier = GIMP_CURSOR_MODIFIER_BAD; modifier = GIMP_CURSOR_MODIFIER_BAD;
} }
else else

View file

@ -206,9 +206,7 @@ gimp_paint_tool_control (GimpTool *tool,
GimpDisplay *display) GimpDisplay *display)
{ {
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool); GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
drawable = gimp_image_active_drawable (display->image);
switch (action) switch (action)
{ {
@ -285,7 +283,7 @@ gimp_paint_tool_button_press (GimpTool *tool,
return; return;
} }
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
curr_coords = *coords; curr_coords = *coords;
@ -396,7 +394,7 @@ gimp_paint_tool_button_release (GimpTool *tool,
return; return;
} }
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool)); gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
@ -441,7 +439,7 @@ gimp_paint_tool_motion (GimpTool *tool,
return; return;
} }
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
core->cur_coords = *coords; core->cur_coords = *coords;
@ -560,7 +558,7 @@ gimp_paint_tool_oper_update (GimpTool *tool,
tool->display = display; tool->display = display;
} }
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
if (drawable && proximity) if (drawable && proximity)
{ {

View file

@ -218,7 +218,7 @@ gimp_perspective_clone_tool_initialize (GimpTool *tool,
/* Set the pointer to the active display */ /* Set the pointer to the active display */
tool->display = display; tool->display = display;
tool->drawable = gimp_image_active_drawable (display->image); tool->drawable = gimp_image_get_active_drawable (display->image);
/* Find the transform bounds initializing */ /* Find the transform bounds initializing */
gimp_perspective_clone_tool_bounds (perspective_clone_tool, display); gimp_perspective_clone_tool_bounds (perspective_clone_tool, display);

View file

@ -129,7 +129,7 @@ gimp_posterize_tool_initialize (GimpTool *tool,
GimpPosterizeTool *posterize_tool = GIMP_POSTERIZE_TOOL (tool); GimpPosterizeTool *posterize_tool = GIMP_POSTERIZE_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -214,8 +214,9 @@ gimp_region_select_tool_button_release (GimpTool *tool,
} }
else else
{ {
GimpDrawable *drawable = GimpDrawable *drawable;
gimp_image_active_drawable (display->image);
drawable = gimp_image_get_active_drawable (display->image);
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
} }
@ -349,7 +350,7 @@ gimp_region_select_tool_calculate (GimpRegionSelectTool *region_sel,
BoundSeg *bsegs; BoundSeg *bsegs;
PixelRegion maskPR; PixelRegion maskPR;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
gimp_display_shell_set_override_cursor (shell, GDK_WATCH); gimp_display_shell_set_override_cursor (shell, GDK_WATCH);

View file

@ -170,7 +170,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool); options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
selection = gimp_image_get_mask (display->image); selection = gimp_image_get_mask (display->image);
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
layer = gimp_image_pick_correlate_layer (display->image, layer = gimp_image_pick_correlate_layer (display->image,
coords->x, coords->y); coords->x, coords->y);
floating_sel = gimp_image_floating_sel (display->image); floating_sel = gimp_image_floating_sel (display->image);

View file

@ -269,7 +269,7 @@ gimp_text_tool_button_press (GimpTool *tool,
text_tool->x1 = coords->x; text_tool->x1 = coords->x;
text_tool->y1 = coords->y; text_tool->y1 = coords->y;
drawable = gimp_image_active_drawable (display->image); drawable = gimp_image_get_active_drawable (display->image);
gimp_text_tool_set_drawable (text_tool, drawable, FALSE); gimp_text_tool_set_drawable (text_tool, drawable, FALSE);

View file

@ -136,10 +136,8 @@ gimp_threshold_tool_initialize (GimpTool *tool,
GimpDisplay *display, GimpDisplay *display,
GError **error) GError **error)
{ {
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (tool); GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (tool);
GimpDrawable *drawable; GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
drawable = gimp_image_active_drawable (display->image);
if (! drawable) if (! drawable)
return FALSE; return FALSE;

View file

@ -285,7 +285,7 @@ gimp_tool_real_button_press (GimpTool *tool,
GimpDisplay *display) GimpDisplay *display)
{ {
tool->display = display; tool->display = display;
tool->drawable = gimp_image_active_drawable (display->image); tool->drawable = gimp_image_get_active_drawable (display->image);
gimp_tool_control_activate (tool->control); gimp_tool_control_activate (tool->control);
} }

View file

@ -334,7 +334,7 @@ gimp_transform_tool_initialize (GimpTool *tool,
/* Set the pointer to the active display */ /* Set the pointer to the active display */
tool->display = display; tool->display = display;
tool->drawable = gimp_image_active_drawable (display->image); tool->drawable = gimp_image_get_active_drawable (display->image);
/* Initialize the transform tool dialog */ /* Initialize the transform tool dialog */
if (! tr_tool->dialog) if (! tr_tool->dialog)
@ -1156,18 +1156,18 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
switch (options->type) switch (options->type)
{ {
case GIMP_TRANSFORM_TYPE_LAYER: case GIMP_TRANSFORM_TYPE_LAYER:
active_item = (GimpItem *) gimp_image_active_drawable (display->image); active_item = GIMP_ITEM (gimp_image_get_active_drawable (display->image));
message = _("There is no layer to transform."); message = _("There is no layer to transform.");
break; break;
case GIMP_TRANSFORM_TYPE_SELECTION: case GIMP_TRANSFORM_TYPE_SELECTION:
active_item = (GimpItem *) gimp_image_get_mask (display->image); active_item = GIMP_ITEM (gimp_image_get_mask (display->image));
/* cannot happen, so don't translate this message */ /* cannot happen, so don't translate this message */
message = "There is no selection to transform."; message = "There is no selection to transform.";
break; break;
case GIMP_TRANSFORM_TYPE_PATH: case GIMP_TRANSFORM_TYPE_PATH:
active_item = (GimpItem *) gimp_image_get_active_vectors (display->image); active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
message = _("There is no path to transform."); message = _("There is no path to transform.");
break; break;
} }
@ -1209,7 +1209,7 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
* selection pointer, so that the original source can be repeatedly * selection pointer, so that the original source can be repeatedly
* modified. * modified.
*/ */
tool->drawable = gimp_image_active_drawable (display->image); tool->drawable = gimp_image_get_active_drawable (display->image);
switch (options->type) switch (options->type)
{ {
@ -1277,7 +1277,7 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
/* Make a note of the new current drawable (since we may have /* Make a note of the new current drawable (since we may have
* a floating selection, etc now. * a floating selection, etc now.
*/ */
tool->drawable = gimp_image_active_drawable (display->image); tool->drawable = gimp_image_get_active_drawable (display->image);
gimp_image_undo_push (display->image, GIMP_TYPE_TRANSFORM_TOOL_UNDO, gimp_image_undo_push (display->image, GIMP_TYPE_TRANSFORM_TOOL_UNDO,
GIMP_UNDO_TRANSFORM, NULL, GIMP_UNDO_TRANSFORM, NULL,
@ -1484,10 +1484,12 @@ gimp_transform_tool_bounds (GimpTransformTool *tr_tool,
{ {
case GIMP_TRANSFORM_TYPE_LAYER: case GIMP_TRANSFORM_TYPE_LAYER:
{ {
GimpDrawable *drawable = gimp_image_active_drawable (display->image); GimpDrawable *drawable;
gint offset_x; gint offset_x;
gint offset_y; gint offset_y;
drawable = gimp_image_get_active_drawable (display->image);
gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y); gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y);
gimp_drawable_mask_bounds (drawable, gimp_drawable_mask_bounds (drawable,
@ -1702,8 +1704,10 @@ gimp_transform_tool_prepare (GimpTransformTool *tr_tool,
if (tr_tool->dialog) if (tr_tool->dialog)
{ {
GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (tr_tool->dialog), gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (tr_tool->dialog),
GIMP_VIEWABLE (gimp_image_active_drawable (display->image)), GIMP_VIEWABLE (drawable),
GIMP_CONTEXT (options)); GIMP_CONTEXT (options));
gtk_widget_set_sensitive (tr_tool->dialog, TRUE); gtk_widget_set_sensitive (tr_tool->dialog, TRUE);

View file

@ -1893,7 +1893,7 @@ gimp_vector_tool_stroke_vectors (GimpVectorTool *vector_tool,
image = gimp_item_get_image (GIMP_ITEM (vector_tool->vectors)); image = gimp_item_get_image (GIMP_ITEM (vector_tool->vectors));
active_drawable = gimp_image_active_drawable (image); active_drawable = gimp_image_get_active_drawable (image);
if (! active_drawable) if (! active_drawable)
{ {

View file

@ -235,7 +235,7 @@ tool_manager_initialize_active (Gimp *gimp,
if (gimp_tool_initialize (tool, display)) if (gimp_tool_initialize (tool, display))
{ {
tool->drawable = gimp_image_active_drawable (display->image); tool->drawable = gimp_image_get_active_drawable (display->image);
return TRUE; return TRUE;
} }

View file

@ -273,7 +273,7 @@ gimp_selection_view_button_press (GtkWidget *widget,
options = GIMP_SELECTION_OPTIONS (tool_info->tool_options); options = GIMP_SELECTION_OPTIONS (tool_info->tool_options);
drawable = gimp_image_active_drawable (image_editor->image); drawable = gimp_image_get_active_drawable (image_editor->image);
if (! drawable) if (! drawable)
return TRUE; return TRUE;
@ -343,7 +343,7 @@ gimp_selection_editor_drop_color (GtkWidget *widget,
options = GIMP_SELECTION_OPTIONS (tool_info->tool_options); options = GIMP_SELECTION_OPTIONS (tool_info->tool_options);
drawable = gimp_image_active_drawable (editor->image); drawable = gimp_image_get_active_drawable (editor->image);
if (! drawable) if (! drawable)
return; return;

View file

@ -1425,7 +1425,7 @@ HELP
%invoke = ( %invoke = (
code => <<'CODE' code => <<'CODE'
{ {
drawable = gimp_image_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
} }
CODE CODE
); );

View file

@ -264,7 +264,7 @@ sub path_stroke_current {
code => <<'CODE' code => <<'CODE'
{ {
GimpVectors *vectors = gimp_image_get_active_vectors (image); GimpVectors *vectors = gimp_image_get_active_vectors (image);
GimpDrawable *drawable = gimp_image_active_drawable (image); GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (vectors && drawable) if (vectors && drawable)
{ {