gimp/tools
Michael Natterer 0af39061b6 Fixed bug #78732 (don't paste off screen):
2004-01-15  Michael Natterer  <mitch@gimp.org>

	Fixed bug #78732 (don't paste off screen):

	* app/display/gimpdisplayshell-transform.[ch]: added new function
	gimp_display_shell_untransform_viewport() which returns the
	visible rectangle of the image in image coordinates.

	* app/core/gimp-edit.[ch] (gimp_edit_paste): added viewport
	parameters and changed positioning of the pasted layer as follows:

	- if there is a selection, center on the selection (just as before).
	- if there is no viewport, center on the active drawable.
	- if the viewport intersects with the active drawable, center
	  on the intersection.
	- if the viewport does *not* intersect with the active drawable,
	  center on the active drawable (off-screen, but better than pasting
	  something that will be invisible due to floating selection clipping).
	- if there is no active drawable, center on the viewport.
	- if there is no active drawable and no viewport, center on the image.

	* app/widgets/gimpbufferview.c (gimp_buffer_view_paste_clicked)
	(gimp_buffer_view_paste_into_clicked)
	* app/display/gimpdisplayshell-dnd.c (gimp_display_shell_drop_buffer)
	* app/gui/edit-commands.c (edit_paste_cmd_callback)
	(edit_paste_into_cmd_callback): ask the shell for the viewport
	and pass it to gimp_edit_paste().

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_drawable): center the created layer on
	the viewport.

	* app/tools/gimpmovetool.c (gimp_move_tool_button_release): use
	gimp_display_shell_untransform_viewport() (its code was taken from
	here).

	* tools/pdbgen/pdb/edit.pdb: pass "no viewport" to gimp_edit_paste().

	* app/pdb/edit_cmds.c: regenerated.
2004-01-15 14:36:43 +00:00
..
authorsgen Fixed/Added some UTF-8 encoded names. Please speak up if I did mess up 2003-10-25 23:39:51 +00:00
pdbgen Fixed bug #78732 (don't paste off screen): 2004-01-15 14:36:43 +00:00
.cvsignore configure.in Makefile.am app/Makefile.am docs/Makefile.am 2002-02-03 08:03:21 +00:00
gimp-mkenums Enabled skipping enum values for either the PDB or GType registration 2004-01-06 14:02:08 +00:00
gimp-remote.c search for the window role "gimp-toolbox", since the app sets that instead 2003-11-17 08:46:51 +00:00
gimppath2svg.py New file: Script to convert an exported gimp-path to a simple SVG-File. 2000-10-03 21:50:09 +00:00
kernelgen.c cleanup. Removed trailing whitespace in generated output. 2003-07-14 14:14:30 +00:00
Makefile.am Always provide interlibrary dependencies, not just on Win32. 2003-05-23 17:28:07 +00:00
rmshm Initial revision 1997-11-24 22:05:25 +00:00