tools/pdbgen/pdb/display.pdb applied a modified version of a patch from

2002-12-03  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/layer.pdb: applied a modified version of a
	patch from Wolfgang Hofer <hof@gimp.org> that adds two new PDB
	functions needed for GAP: gimp_displays_reconnect() and
	gimp_layer_new_from_drawable() (bug #77508).

	* app/pdb/display_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/layer_cmds.c
	* libgimp/gimpdisplay_pdb.[ch]
	* libgimp/gimplayer_pdb.[ch]: regenerated.
This commit is contained in:
Sven Neumann 2002-12-03 12:10:21 +00:00 committed by Sven Neumann
parent 1c60f4e045
commit 2193d83a26
14 changed files with 342 additions and 38 deletions

View file

@ -119,3 +119,38 @@ gimp_displays_flush (void)
return success;
}
/**
* gimp_displays_reconnect:
* @old_image_ID: The old image (should have at least one display).
* @new_image_ID: The new image (must not have a display).
*
* Reconnect displays from one image to another image.
*
* This procedure connects all displays of the old_image to the
* new_image. If the new_image already has a display the reconnect is
* not performed and the procedure returns without success. You should
* rarely need to use this function.
*
* Returns: TRUE on success.
*/
gboolean
gimp_displays_reconnect (gint32 old_image_ID,
gint32 new_image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_displays_reconnect",
&nreturn_vals,
GIMP_PDB_IMAGE, old_image_ID,
GIMP_PDB_IMAGE, new_image_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}