2005-06-04 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview-dnd.c
(gimp_container_tree_view_drop_status): bail out early if the view
has no container (instead of crashing).
2005-04-09 Michael Natterer <mitch@gimp.org>
Implement dragging and dropping in any GdkPixbuf supported
format. Fixes bug #172794 and bug #172795.
* app/core/gimplayer.[ch] (gimp_layer_new_from_region): new
function which contains all stuff that was in
gimp_layer_new_from_tiles().
(gimp_layer_new_from_tiles): use above function.
(gimp_layer_new_from_pixbuf): new function.
* app/widgets/Makefile.am
* app/widgets/gimppixbuf.[ch]: new files containing GdkPixbuf
utility functions for clipboard and DnD.
* app/widgets/gimpselectiondata.[ch]: removed
gimp_selection_data_set,get_pixbuf(), GTK+ provides the same API.
Also removed GdkAtom parameters all over the place because it's
always the same as selection_data->target.
* app/widgets/gimpclipboard.c: use the new pixbuf utility
functions and gtk_selection_data_set,get_pixbuf().
* app/widgets/widgets-enums.h
* app/widgets/gimpdnd.[ch]: removed never-implemented
GIMP_DND_TYPE_PNG and added a generic GIMP_DND_TYPE_PIXBUF
instead. Added API to drag and drop GdkPixbufs which transparently
converts from/to and GdkPixbuf-supported image format. Removed
passing around of GdkAtoms, since they were always the same
as selection_data->target.
* app/widgets/gimpdnd-xds.[ch]: follow GdkAtom parameter removal.
* app/widgets/gimpcontainertreeview.[ch]: added virtual function
GimpContainerTreeView::drop_pixbuf().
* app/widgets/gimpcontainertreeview-dnd.c: dispatch drop_pixbuf().
* app/widgets/gimplayertreeview.c: implement drop_pixbuf().
* app/widgets/gimpdrawabletreeview.c: allow to drag all drawables
as pixbufs.
* app/display/gimpdisplayshell-dnd.c: allow dropping of pixbufs.
2005-01-17 Michael Natterer <mitch@gimp.org>
Allow to drop stuff onto empty layers, channels and paths dialogs
to create new items:
* app/widgets/gimpcontainertreeview.h (struct GimpContainerTreeView):
added "gboolean dnd_drop_to_empty".
* app/widgets/gimpcontainertreeview-dnd.c: if "dnd_drop_to_empty"
is TRUE, dispatch drops to empty views and to the empty area below
all items.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_init): set
"dnd_drop_to_empty" to TRUE.
* app/widgets/gimpitemtreeview.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: made all drop functions work
with "dest_viewable" being NULL and changed drop_possible()
implementations accordingly. Cleaned up the whole DND code a bit.
* app/widgets/gimplayertreeview.c: removed color and pattern
drop code...
* app/widgets/gimpdrawabletreeview.c: and added it here so colors
and patterns can be dropped to the channels dialog too.
2005-01-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.[ch]: added virtual function
GimpContainerTreeView::drop_component(). Added EEKy "dnd_gimp"
needed for gimp_selection_data_get_component().
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_set_context):
set the "dnd_gimp" pointer if it is NULL.
* app/widgets/gimpcontainertreeview-dnd.c: handle component drops
and dispatch ::drop_component() accordingly.
* app/widgets/gimplayertreeview.c: implement dropping of
components as new layers. Addresses bugs #158483 and #158133.
2004-09-10 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview-dnd.c
(gimp_container_tree_view_drop_status): always call
gdk_drag_status() before returning FALSE.
(gimp_container_tree_view_drag_motion): never return FALSE, an
impossible drop location is now reported by calling
gdk_drag_status() above. Always returning TRUE makes sure
gimp_container_tree_view_drag_leave() is called unconditionally
and can remove the scroll_timeout set in drag_motion().
Fixes bug #152193 and many other obscure DND crashes caused by the
scroll_timeout being invoked after the widget is destroyed.
2004-06-30 Sven Neumann <sven@gimp.org>
* app/widgets/gimpselectiondata.[ch]: renamed the SVG related
functions so that they deal with an anonymous data stream that
could as well be a PNG image.
* app/widgets/gimpdnd.[ch]
* app/widgets/gimpcontainertreeview-dnd.c: changed accordingly.
* app/display/gimpdisplayshell-dnd.[ch]
* app/vectors/gimpvectors-import.[ch]
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpvectorstreeview.c: use gsize for the length of
the buffer.
* app/widgets/gimpdnd.[ch]
* app/widgets/widgets-enums.[ch]: added GIMP_DND_TYPE_PNG which isn't
used yet.
2004-06-30 Michael Natterer <mitch@gimp.org>
* widgets/gimpselectiondata.[ch] (gimp_selection_data_get_svg):
changed return value from gchar* to const gchar*. Renamed
parameters to be consistent with other SVG functions.
* widgets/gimpcontainertreeview-dnd.c
* widgets/gimpdnd.c: changed accordingly.
2004-06-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview-dnd.c: don't free the SVG data
after dropping, it's owned by GtkSelectionData.
2004-06-28 Michael Natterer <mitch@gimp.org>
Allow all sorts of things to be dropped on or in between the
items of a GimpContainerTreeView:
* app/widgets/gimpcontainertreeview.[ch]: added more parameters to
GimpContainerTreeView::drop_possible() to specify where ecactly
the drop should take place (between or into items) and to support
dropping all sorts of things.
Renamed ::drop() to ::drop_viewable() and added ::drop_color(),
::drop_files() and ::drop_svg(), which cover all possible drop
types.
* app/widgets/gimpcontainertreeview-dnd.[ch]: changed accordingly.
Dispatch all kinds of drops to the resp. virtual functions.
* app/widgets/gimpitemtreeview.c: changed accordingly.
* app/widgets/gimplayertreeview.c: allow to drop URIs, colors
and patterns to the layers dialog. Fixes bugs #119506 and #139246.
2004-06-01 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpitemtreeview.c: some cleanup in the tree view
DND code.
2004-05-11 Michael Natterer <mitch@gimp.org>
* app/widgets/widgets-types.h
* app/widgets/gimpcontainerview.[ch]: made GimpContainerView an
interface. Added accessors for all members in the private struct
and made it really private.
* app/widgets/gimpcontainerbox.[ch]: derive it from GimpEditor and
implement GimpContainerViewInterface and its properties.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: implement
GimpContainerViewInterface and use the new accessor functions.
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpdocumentview.c: changed accordingly.
* app/widgets/gimptemplateview.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpundoeditor.c
* app/actions/palettes-commands.c: #include "gimpcontainerview.h"
2003-10-17 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdnd.c (gimp_dnd_file_dest_add): according to an
older mail from Owen, GDK_ACTION_DEFAULT means nothing and should
not be used.
* app/widgets/gimpcontainertreeview-dnd.c
(gimp_container_tree_view_drop_status): pass 0 to gdk_drag_status()
instead of GDK_ACTION_DEFAULT.
2003-10-10 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview-dnd.c: added auto-scrolling
when DND-hovering close to the widget's top or bottom border.
Fixes bug #124231.
* app/widgets/gimpcontainertreeview.h: added some auto-scroll state
to the GimpContainerTreeView struct.
* app/widgets/gimpcontainertreeview.c: remove the auto-scroll
timeout in GtkWidget::unmap().
2003-03-19 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcellrenderertoggle.[ch]
* app/widgets/gimpcellrendererviewable.[ch]: added public
functions to emit the "clicked" signal.
* app/widgets/gimpcontainertreeview.c: use them instead of
g_signal_emit_by_name().
* app/widgets/Makefile.am
* app/widgets/gimpcontainertreeview-dnd.[ch]: new files
implementing DND for tree views.
* app/widgets/gimpcontainertreeview.[ch]: added virtual
functions drop_possible() and drop().
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c: implement drop_possible()
and drop().