app/display/gimpdisplayshell-dnd.[ch] enabled dropping of vectors to the
2003-05-18 Michael Natterer <mitch@gimp.org> * app/display/gimpdisplayshell-dnd.[ch] * app/display/gimpdisplayshell.c: enabled dropping of vectors to the display to copy them between images.
This commit is contained in:
parent
256701f68d
commit
45973682e4
@ -1,3 +1,9 @@
|
||||
2003-05-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell-dnd.[ch]
|
||||
* app/display/gimpdisplayshell.c: enabled dropping of vectors to
|
||||
the display to copy them between images.
|
||||
|
||||
2003-05-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpmarshal.list: added BOOLEAN: OBJECT, POINTER.
|
||||
|
@ -35,6 +35,8 @@
|
||||
#include "core/gimppattern.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "vectors/gimpvectors.h"
|
||||
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-dnd.h"
|
||||
@ -78,6 +80,36 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
|
||||
gimp_context_set_display (gimp_get_user_context (gdisp->gimage->gimp), gdisp);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_vectors (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
GimpVectors *vectors;
|
||||
GimpDisplay *gdisp;
|
||||
GimpVectors *new_vectors;
|
||||
|
||||
gdisp = GIMP_DISPLAY_SHELL (data)->gdisp;
|
||||
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
vectors = GIMP_VECTORS (viewable);
|
||||
|
||||
gimp_image_undo_group_start (gdisp->gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
|
||||
_("Drop New Path"));
|
||||
|
||||
new_vectors = gimp_vectors_convert (vectors, gdisp->gimage);
|
||||
|
||||
gimp_image_add_vectors (gdisp->gimage, new_vectors, -1);
|
||||
|
||||
gimp_image_undo_group_end (gdisp->gimage);
|
||||
|
||||
gimp_image_flush (gdisp->gimage);
|
||||
|
||||
gimp_context_set_display (gimp_get_user_context (gdisp->gimage->gimp), gdisp);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_shell_bucket_fill (GimpImage *gimage,
|
||||
GimpBucketFillMode fill_mode,
|
||||
|
@ -23,6 +23,9 @@
|
||||
void gimp_display_shell_drop_drawable (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_vectors (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_pattern (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
|
@ -46,6 +46,8 @@
|
||||
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "vectors/gimpvectors.h"
|
||||
|
||||
#include "widgets/gimpcolorpanel.h"
|
||||
#include "widgets/gimpdnd.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
@ -307,6 +309,9 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_CHANNEL,
|
||||
gimp_display_shell_drop_drawable,
|
||||
shell);
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_VECTORS,
|
||||
gimp_display_shell_drop_vectors,
|
||||
shell);
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_PATTERN,
|
||||
gimp_display_shell_drop_pattern,
|
||||
shell);
|
||||
|
@ -46,6 +46,8 @@
|
||||
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "vectors/gimpvectors.h"
|
||||
|
||||
#include "widgets/gimpcolorpanel.h"
|
||||
#include "widgets/gimpdnd.h"
|
||||
#include "widgets/gimpitemfactory.h"
|
||||
@ -307,6 +309,9 @@ gimp_display_shell_init (GimpDisplayShell *shell)
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_CHANNEL,
|
||||
gimp_display_shell_drop_drawable,
|
||||
shell);
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_VECTORS,
|
||||
gimp_display_shell_drop_vectors,
|
||||
shell);
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_PATTERN,
|
||||
gimp_display_shell_drop_pattern,
|
||||
shell);
|
||||
|
Loading…
Reference in New Issue
Block a user