mirror of https://github.com/GNOME/gimp.git
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:
parent
f6c626fba3
commit
a5d10b2ff0
|
@ -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>
|
||||
|
||||
* app/tools/gimpcolortool.c (gimp_color_tool_draw): chain up.
|
||||
|
|
|
@ -81,7 +81,7 @@ GimpObject * action_select_object (GimpActionSelectType select_type,
|
|||
|
||||
#define return_if_no_drawable(image,drawable,data) \
|
||||
return_if_no_image (image,data); \
|
||||
drawable = gimp_image_active_drawable (image); \
|
||||
drawable = gimp_image_get_active_drawable (image); \
|
||||
if (! drawable) \
|
||||
return
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ buffers_paste (GimpBufferView *view,
|
|||
|
||||
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);
|
||||
|
||||
gimp_image_flush (image);
|
||||
|
|
|
@ -164,7 +164,7 @@ drawable_actions_update (GimpActionGroup *group,
|
|||
|
||||
if (image)
|
||||
{
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (drawable)
|
||||
{
|
||||
|
|
|
@ -261,7 +261,7 @@ edit_actions_update (GimpActionGroup *group,
|
|||
GimpUndo *undo;
|
||||
GimpUndo *redo;
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
undo_enabled = gimp_image_undo_is_enabled (image);
|
||||
|
||||
|
|
|
@ -439,7 +439,7 @@ edit_paste (GimpDisplay *display,
|
|||
&x, &y, &width, &height);
|
||||
|
||||
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))
|
||||
{
|
||||
gimp_image_flush (display->image);
|
||||
|
@ -461,10 +461,8 @@ cut_named_buffer_callback (GtkWidget *widget,
|
|||
const gchar *name,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = GIMP_IMAGE (data);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
GimpImage *image = GIMP_IMAGE (data);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
|
@ -488,10 +486,8 @@ copy_named_buffer_callback (GtkWidget *widget,
|
|||
const gchar *name,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = GIMP_IMAGE (data);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
GimpImage *image = GIMP_IMAGE (data);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
|
|
|
@ -226,7 +226,7 @@ file_actions_update (GimpActionGroup *group,
|
|||
GimpDrawable *drawable = NULL;
|
||||
|
||||
if (image)
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
|
|
@ -193,7 +193,7 @@ file_save_cmd_callback (GtkAction *action,
|
|||
|
||||
save_mode = (GimpSaveMode) value;
|
||||
|
||||
if (! gimp_image_active_drawable (image))
|
||||
if (! gimp_image_get_active_drawable (image))
|
||||
return;
|
||||
|
||||
switch (save_mode)
|
||||
|
|
|
@ -225,7 +225,7 @@ plug_in_actions_update (GimpActionGroup *group,
|
|||
|
||||
if (image)
|
||||
{
|
||||
GimpDrawable *drawable = gimp_image_active_drawable (image);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (drawable)
|
||||
type = gimp_drawable_type (drawable);
|
||||
|
|
|
@ -434,7 +434,7 @@ plug_in_collect_display_args (GtkAction *action,
|
|||
if (args->n_values > 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)
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ select_actions_update (GimpActionGroup *group,
|
|||
|
||||
if (image)
|
||||
{
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
fs = (gimp_image_floating_sel (image) != NULL);
|
||||
sel = ! gimp_channel_is_empty (gimp_image_get_mask (image));
|
||||
|
|
|
@ -121,7 +121,7 @@ select_float_cmd_callback (GtkAction *action,
|
|||
return_if_no_image (image, data);
|
||||
|
||||
gimp_selection_float (gimp_image_get_mask (image),
|
||||
gimp_image_active_drawable (image),
|
||||
gimp_image_get_active_drawable (image),
|
||||
action_data_get_context (data),
|
||||
TRUE, 0, 0);
|
||||
gimp_image_flush (image);
|
||||
|
@ -299,7 +299,7 @@ select_stroke_cmd_callback (GtkAction *action,
|
|||
return_if_no_image (image, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ select_stroke_last_vals_cmd_callback (GtkAction *action,
|
|||
return_if_no_context (context, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
|
|
|
@ -355,7 +355,7 @@ vectors_stroke_cmd_callback (GtkAction *action,
|
|||
return_if_no_vectors (image, vectors, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
|
@ -387,7 +387,7 @@ vectors_stroke_last_vals_cmd_callback (GtkAction *action,
|
|||
return_if_no_context (context, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
|
|
|
@ -313,7 +313,7 @@ gimp_image_crop_auto_shrink (GimpImage *image,
|
|||
|
||||
if (active_drawable_only)
|
||||
{
|
||||
active_drawable = gimp_image_active_drawable (image);
|
||||
active_drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! active_drawable)
|
||||
goto FINISH;
|
||||
|
|
|
@ -51,7 +51,7 @@ gimp_image_pick_color (GimpImage *image,
|
|||
if (! sample_merged)
|
||||
{
|
||||
if (! drawable)
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -2509,7 +2509,7 @@ gimp_image_get_vectors (const GimpImage *image)
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
@ -3711,7 +3711,7 @@ gimp_image_coords_in_active_pickable (GimpImage *image,
|
|||
}
|
||||
else
|
||||
{
|
||||
GimpDrawable *drawable = gimp_image_active_drawable (image);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (drawable)
|
||||
{
|
||||
|
|
|
@ -410,7 +410,7 @@ GimpContainer * gimp_image_get_layers (const GimpImage *image);
|
|||
GimpContainer * gimp_image_get_channels (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);
|
||||
GimpChannel * gimp_image_get_active_channel (const GimpImage *image);
|
||||
GimpVectors * gimp_image_get_active_vectors (const GimpImage *image);
|
||||
|
|
|
@ -68,7 +68,7 @@ floating_sel_attach (GimpLayer *layer,
|
|||
* to the drawable
|
||||
*/
|
||||
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 */
|
||||
|
|
|
@ -353,7 +353,7 @@ gimp_selection_boundary (GimpChannel *channel,
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
else if ((drawable = gimp_image_active_drawable (image)) &&
|
||||
else if ((drawable = gimp_image_get_active_drawable (image)) &&
|
||||
GIMP_IS_CHANNEL (drawable))
|
||||
{
|
||||
/* Otherwise, return the boundary...if a channel is active */
|
||||
|
|
|
@ -248,14 +248,13 @@ offset_response (GtkWidget *widget,
|
|||
{
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gint offset_x;
|
||||
gint offset_y;
|
||||
GimpImage *image = dialog->image;
|
||||
|
||||
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 =
|
||||
RINT (gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (dialog->off_se),
|
||||
|
@ -280,11 +279,11 @@ static void
|
|||
offset_halfheight_callback (GtkWidget *widget,
|
||||
OffsetDialog *dialog)
|
||||
{
|
||||
GimpImage *image = dialog->image;
|
||||
GimpImage *image = dialog->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),
|
||||
0, item->width / 2);
|
||||
|
|
|
@ -271,11 +271,9 @@ stroke_dialog_response (GtkWidget *widget,
|
|||
|
||||
case GTK_RESPONSE_OK:
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
GimpStrokeDesc *saved_desc;
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (widget),
|
||||
|
|
|
@ -850,7 +850,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
|||
display);
|
||||
}
|
||||
else if ((active_tool->drawable !=
|
||||
gimp_image_active_drawable (image)) &&
|
||||
gimp_image_get_active_drawable (image)) &&
|
||||
! gimp_tool_control_get_preserve (active_tool->control))
|
||||
{
|
||||
/* create a new one, deleting the current
|
||||
|
|
|
@ -304,7 +304,7 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell,
|
|||
if (image->gimp->busy)
|
||||
return;
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
return;
|
||||
|
@ -389,7 +389,7 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
|
|||
|
||||
/* 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,
|
||||
x, y, width, height);
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
|
|||
|
||||
case 'n': /* active drawable name */
|
||||
{
|
||||
GimpDrawable *drawable = gimp_image_active_drawable (image);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (drawable)
|
||||
i += print (title, title_len, i, "%s",
|
||||
|
@ -333,7 +333,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
|
|||
|
||||
case 'P': /* active drawable PDB id */
|
||||
{
|
||||
GimpDrawable *drawable = gimp_image_active_drawable (image);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (drawable)
|
||||
i += print (title, title_len, i, "%d",
|
||||
|
|
|
@ -107,7 +107,7 @@ gimp_display_shell_transform_xy (GimpDisplayShell *shell,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ gimp_display_shell_untransform_xy (GimpDisplayShell *shell,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ gimp_display_shell_transform_xy_f (GimpDisplayShell *shell,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,7 @@ gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ gimp_display_shell_transform_points (GimpDisplayShell *shell,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -346,7 +346,7 @@ gimp_display_shell_transform_coords (GimpDisplayShell *shell,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ gimp_display_shell_transform_segments (GimpDisplayShell *shell,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ file_save (GimpImage *image,
|
|||
g_return_val_if_fail (error == NULL || *error == NULL,
|
||||
GIMP_PDB_CALLING_ERROR);
|
||||
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (! drawable)
|
||||
return GIMP_PDB_EXECUTION_ERROR;
|
||||
|
|
|
@ -611,7 +611,7 @@ image_get_active_drawable_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (success)
|
||||
{
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success);
|
||||
|
|
|
@ -316,7 +316,7 @@ path_stroke_current_invoker (GimpProcedure *procedure,
|
|||
if (success)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -150,7 +150,7 @@ gimp_blend_tool_initialize (GimpTool *tool,
|
|||
GimpDisplay *display,
|
||||
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))
|
||||
{
|
||||
|
@ -215,6 +215,7 @@ gimp_blend_tool_button_release (GimpTool *tool,
|
|||
((blend_tool->start_x != blend_tool->end_x) ||
|
||||
(blend_tool->start_y != blend_tool->end_y)))
|
||||
{
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
GimpProgress *progress;
|
||||
gint off_x;
|
||||
gint off_y;
|
||||
|
@ -222,10 +223,9 @@ gimp_blend_tool_button_release (GimpTool *tool,
|
|||
progress = gimp_progress_start (GIMP_PROGRESS (display),
|
||||
_("Blending"), FALSE);
|
||||
|
||||
gimp_item_offsets (GIMP_ITEM (gimp_image_active_drawable (image)),
|
||||
&off_x, &off_y);
|
||||
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
|
||||
|
||||
gimp_drawable_blend (gimp_image_active_drawable (image),
|
||||
gimp_drawable_blend (drawable,
|
||||
context,
|
||||
GIMP_CUSTOM_MODE,
|
||||
gimp_context_get_paint_mode (context),
|
||||
|
@ -335,7 +335,7 @@ gimp_blend_tool_cursor_update (GimpTool *tool,
|
|||
GdkModifierType state,
|
||||
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_INDEXEDA_IMAGE:
|
||||
|
|
|
@ -158,7 +158,7 @@ gimp_brightness_contrast_tool_initialize (GimpTool *tool,
|
|||
GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -205,7 +205,7 @@ gimp_brush_tool_oper_update (GimpTool *tool,
|
|||
proximity, display);
|
||||
|
||||
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);
|
||||
GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);
|
||||
|
|
|
@ -125,7 +125,7 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool,
|
|||
gimp_image_coords_in_active_pickable (display->image, coords,
|
||||
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);
|
||||
gint x, y;
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ gimp_by_color_select_tool_get_mask (GimpRegionSelectTool *region_select,
|
|||
GimpRGB color;
|
||||
gint x, y;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
x = region_select->x;
|
||||
y = region_select->y;
|
||||
|
|
|
@ -142,7 +142,7 @@ gimp_color_balance_tool_initialize (GimpTool *tool,
|
|||
GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -137,9 +137,7 @@ gimp_colorize_tool_initialize (GimpTool *tool,
|
|||
GError **error)
|
||||
{
|
||||
GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -241,10 +241,8 @@ gimp_curves_tool_initialize (GimpTool *tool,
|
|||
GimpDisplay *display,
|
||||
GError **error)
|
||||
{
|
||||
GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
@ -303,9 +301,6 @@ gimp_curves_tool_button_release (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
|
|
|
@ -175,7 +175,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
|
|||
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
|
||||
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
|
||||
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)
|
||||
{
|
||||
|
@ -424,7 +424,7 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
|
|||
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
|
||||
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
|
||||
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,
|
||||
coords->x,
|
||||
|
@ -538,7 +538,7 @@ gimp_edit_selection_tool_motion (GimpTool *tool,
|
|||
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
|
||||
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
|
||||
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);
|
||||
|
||||
|
@ -640,7 +640,8 @@ gimp_edit_selection_tool_motion (GimpTool *tool,
|
|||
|
||||
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 */
|
||||
|
||||
|
@ -679,7 +680,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool)
|
|||
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
|
||||
active_item = GIMP_ITEM (gimp_image_get_active_vectors (display->image));
|
||||
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)
|
||||
{
|
||||
|
@ -1066,7 +1067,7 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
|
|||
break;
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -608,11 +608,12 @@ gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
|
|||
{
|
||||
GimpForegroundSelectTool *fg_select;
|
||||
GimpForegroundSelectOptions *options;
|
||||
GimpImage *image = display->image;
|
||||
GimpDrawable *drawable = gimp_image_active_drawable (image);
|
||||
GimpImage *image = display->image;
|
||||
GimpDrawable *drawable;
|
||||
GimpScanConvert *scan_convert;
|
||||
GimpChannel *mask;
|
||||
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
fg_select = GIMP_FOREGROUND_SELECT_TOOL (free_sel);
|
||||
options = GIMP_FOREGROUND_SELECT_TOOL_GET_OPTIONS (free_sel);
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ gimp_fuzzy_select_tool_get_mask (GimpRegionSelectTool *region_select,
|
|||
GimpDrawable *drawable;
|
||||
gint x, y;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
x = region_select->x;
|
||||
y = region_select->y;
|
||||
|
|
|
@ -162,7 +162,7 @@ gimp_hue_saturation_tool_initialize (GimpTool *tool,
|
|||
GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -304,7 +304,7 @@ gimp_image_map_tool_initialize (GimpTool *tool,
|
|||
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 (drawable),
|
||||
|
|
|
@ -224,10 +224,8 @@ gimp_levels_tool_initialize (GimpTool *tool,
|
|||
GimpDisplay *display,
|
||||
GError **error)
|
||||
{
|
||||
GimpLevelsTool *l_tool = GIMP_LEVELS_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
GimpLevelsTool *l_tool = GIMP_LEVELS_TOOL (tool);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -323,7 +323,9 @@ gimp_move_tool_button_press (GimpTool *tool,
|
|||
|
||||
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))
|
||||
gimp_edit_selection_tool_start (tool, display, coords,
|
||||
|
@ -704,7 +706,7 @@ gimp_move_tool_cursor_update (GimpTool *tool,
|
|||
}
|
||||
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;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -206,9 +206,7 @@ gimp_paint_tool_control (GimpTool *tool,
|
|||
GimpDisplay *display)
|
||||
{
|
||||
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
switch (action)
|
||||
{
|
||||
|
@ -285,7 +283,7 @@ gimp_paint_tool_button_press (GimpTool *tool,
|
|||
return;
|
||||
}
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
curr_coords = *coords;
|
||||
|
||||
|
@ -396,7 +394,7 @@ gimp_paint_tool_button_release (GimpTool *tool,
|
|||
return;
|
||||
}
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
|
||||
|
||||
|
@ -441,7 +439,7 @@ gimp_paint_tool_motion (GimpTool *tool,
|
|||
return;
|
||||
}
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
core->cur_coords = *coords;
|
||||
|
||||
|
@ -560,7 +558,7 @@ gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
tool->display = display;
|
||||
}
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (drawable && proximity)
|
||||
{
|
||||
|
|
|
@ -218,7 +218,7 @@ gimp_perspective_clone_tool_initialize (GimpTool *tool,
|
|||
|
||||
/* Set the pointer to the active 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 */
|
||||
gimp_perspective_clone_tool_bounds (perspective_clone_tool, display);
|
||||
|
|
|
@ -129,7 +129,7 @@ gimp_posterize_tool_initialize (GimpTool *tool,
|
|||
GimpPosterizeTool *posterize_tool = GIMP_POSTERIZE_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -214,8 +214,9 @@ gimp_region_select_tool_button_release (GimpTool *tool,
|
|||
}
|
||||
else
|
||||
{
|
||||
GimpDrawable *drawable =
|
||||
gimp_image_active_drawable (display->image);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
|
||||
}
|
||||
|
@ -349,7 +350,7 @@ gimp_region_select_tool_calculate (GimpRegionSelectTool *region_sel,
|
|||
BoundSeg *bsegs;
|
||||
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);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
|
|||
options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
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,
|
||||
coords->x, coords->y);
|
||||
floating_sel = gimp_image_floating_sel (display->image);
|
||||
|
|
|
@ -269,7 +269,7 @@ gimp_text_tool_button_press (GimpTool *tool,
|
|||
text_tool->x1 = coords->x;
|
||||
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);
|
||||
|
||||
|
|
|
@ -136,10 +136,8 @@ gimp_threshold_tool_initialize (GimpTool *tool,
|
|||
GimpDisplay *display,
|
||||
GError **error)
|
||||
{
|
||||
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (tool);
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (display->image);
|
||||
GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (tool);
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
if (! drawable)
|
||||
return FALSE;
|
||||
|
|
|
@ -285,7 +285,7 @@ gimp_tool_real_button_press (GimpTool *tool,
|
|||
GimpDisplay *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);
|
||||
}
|
||||
|
|
|
@ -334,7 +334,7 @@ gimp_transform_tool_initialize (GimpTool *tool,
|
|||
|
||||
/* Set the pointer to the active 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 */
|
||||
if (! tr_tool->dialog)
|
||||
|
@ -1156,18 +1156,18 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
|
|||
switch (options->type)
|
||||
{
|
||||
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.");
|
||||
break;
|
||||
|
||||
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 */
|
||||
message = "There is no selection to transform.";
|
||||
break;
|
||||
|
||||
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.");
|
||||
break;
|
||||
}
|
||||
|
@ -1209,7 +1209,7 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
|
|||
* selection pointer, so that the original source can be repeatedly
|
||||
* modified.
|
||||
*/
|
||||
tool->drawable = gimp_image_active_drawable (display->image);
|
||||
tool->drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
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
|
||||
* 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_UNDO_TRANSFORM, NULL,
|
||||
|
@ -1484,10 +1484,12 @@ gimp_transform_tool_bounds (GimpTransformTool *tr_tool,
|
|||
{
|
||||
case GIMP_TRANSFORM_TYPE_LAYER:
|
||||
{
|
||||
GimpDrawable *drawable = gimp_image_active_drawable (display->image);
|
||||
GimpDrawable *drawable;
|
||||
gint offset_x;
|
||||
gint offset_y;
|
||||
|
||||
drawable = gimp_image_get_active_drawable (display->image);
|
||||
|
||||
gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y);
|
||||
|
||||
gimp_drawable_mask_bounds (drawable,
|
||||
|
@ -1702,8 +1704,10 @@ gimp_transform_tool_prepare (GimpTransformTool *tr_tool,
|
|||
|
||||
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 (gimp_image_active_drawable (display->image)),
|
||||
GIMP_VIEWABLE (drawable),
|
||||
GIMP_CONTEXT (options));
|
||||
|
||||
gtk_widget_set_sensitive (tr_tool->dialog, TRUE);
|
||||
|
|
|
@ -1893,7 +1893,7 @@ gimp_vector_tool_stroke_vectors (GimpVectorTool *vector_tool,
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -235,7 +235,7 @@ tool_manager_initialize_active (Gimp *gimp,
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -273,7 +273,7 @@ gimp_selection_view_button_press (GtkWidget *widget,
|
|||
|
||||
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)
|
||||
return TRUE;
|
||||
|
@ -343,7 +343,7 @@ gimp_selection_editor_drop_color (GtkWidget *widget,
|
|||
|
||||
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)
|
||||
return;
|
||||
|
|
|
@ -1425,7 +1425,7 @@ HELP
|
|||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
drawable = gimp_image_active_drawable (image);
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
|
|
@ -264,7 +264,7 @@ sub path_stroke_current {
|
|||
code => <<'CODE'
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue