Commit Graph

151 Commits

Author SHA1 Message Date
Michael Natterer b05a4efacb use GtkSelectionData's accessors.
2009-03-23  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_data_drop_handle): use
	GtkSelectionData's accessors.


svn path=/trunk/; revision=28209
2009-03-22 23:16:59 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Michael Natterer df792bf8e8 add DND log domain.
2007-11-15  Michael Natterer  <mitch@gimp.org>

	* app/gimp-log.[ch]: add DND log domain.

	* app/widgets/gimpdnd.c: use GIMP_LOG().


svn path=/trunk/; revision=24163
2007-11-15 13:21:23 +00:00
Sven Neumann c1c7afb03a libgimp/gimppatternselectbutton.c libgimp/gimpbrushselectbutton.c
2007-10-16  Sven Neumann  <sven@gimp.org>

	* libgimp/gimppatternselectbutton.c
	* libgimp/gimpbrushselectbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* app/widgets/gimpdnd.c
	* app/widgets/gimpdockbook.c: set GDK_WINDOW_TYPE_HINT_DND on
	popup windows used to implement a DND cursor.

svn path=/trunk/; revision=23841
2007-10-16 13:56:34 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer b53aa45a76 Changed GimpViewable preview rendering to have a context to get
2006-08-29  Michael Natterer  <mitch@gimp.org>

	Changed GimpViewable preview rendering to have a context to get
	FG/BG/whatever from. Use the context to enable dynamic FG/BG
	colors in gradients. Fixes bug #127676 and bug #352214. Addresses
	bug #128367 (doesn't fix it because there's no loading/saving and
	no GUI yet).

	* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
	specifying gradient colors in terms of foreground and background.

	* app/core/gimpgradient.[ch]: added color_type members to the
	GimpGradientSegment struct and honor them in
	gimp_gradient_get_color_at(). Added GimpContext parameters to all
	functions which finally call get_color_at().

	* app/core/gimp-gradients.c: use the new method to implement the
	builtin gradients.

	* app/core/gimpviewable.[ch]: added GimpContext parameters to all
	get_preview() and get_pixbuf() functions.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpgradient.c
	* app/core/gimpimage-preview.[ch]
	* app/core/gimpimagefile.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/text/gimpfont.c
	* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
	and ::get_pixbuf() implementations accordingly.

	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.[ch]
	* app/dialogs/dialogs-constructors.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimptexttool.c
	* app/actions/gradient-editor-commands.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpbrusheditor.[ch]
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpclipboard.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainercombobox.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerentry.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimppropwidgets.[ch]
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpthumbbox.[ch]
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpundoeditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpview-popup.[ch]
	* app/widgets/gimpview.[ch]
	* app/widgets/gimpviewablebutton.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpviewrenderer.[ch]
	* app/widgets/gimpviewrenderer-frame.c
	* app/widgets/gimpviewrendererbrush.c
	* app/widgets/gimpviewrendererbuffer.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimage.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
	and parameters, implement GimpDocked::set_context() in many
	widgets. Pass these locally remembered contexts to GimpViewable
	functions. Did some minor cleanups on the way. There are still
	some minor FIXMEs around where the code uses a NULL context (which
	is allowed by the APIs)

	* app/pdb/drawable_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-08-29 21:44:51 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00
Michael Natterer 32d875d070 app/dialogs/module-dialog.c app/dialogs/palette-import-dialog.c
2005-08-03  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/module-dialog.c
	* app/dialogs/palette-import-dialog.c
	* app/gui/gui.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcursorview.c
	* app/widgets/gimpdnd.c
	* app/widgets/gimpdock.c
	* app/widgets/gimpdockbook.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimpenumaction.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpmenudock.c
	* app/widgets/gimpmessagebox.c
	* app/widgets/gimpmessagedialog.c
	* app/widgets/gimppluginaction.c
	* app/widgets/gimpprogressdialog.c
	* app/widgets/gimpsamplepointeditor.c
	* app/widgets/gimpstringaction.c
	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox.c: use canonical names for signals and
	properties.
2005-08-03 09:34:55 +00:00
Michael Natterer c1c876a963 Some DND fixes / cleanup:
2005-07-25  Michael Natterer  <mitch@gimp.org>

	Some DND fixes / cleanup:

	* app/widgets/widgets-enums.h: renamed GIMP_DND_TYPE_TOOL to
	GIMP_DND_TYPE_TOOL_INFO.

	* app/widgets/gimpselectiondata.[ch]: s/tool/tool_info/g. Moved
	private functions to the end of the file. Include GIMP's PID in
	all GtkSelectionData strings which are used to pass around stuff
	by reference. For things which are referenced by name, also encode
	the object's address in the GtkSelectionData so having a brush
	called "Standard" or a named buffer called "Global Buffer" will
	work together with DND.

	* app/widgets/gimpdnd.[ch]: s/tool/tool_info/g. Renamed
	gimp_dnd_get_data_data() to gimp_dnd_get_object_data() since it's
	not limited to GimpData objects. Follow above selection data API
	changes. Cleanup.

	* libgimp/gimpbrushmenu.c
	* libgimp/gimpdrawablecombobox.c
	* libgimp/gimpfontselectbutton.c
	* libgimp/gimpgradientmenu.c
	* libgimp/gimpimagecombobox.c
	* libgimp/gimppalettemenu.c
	* libgimp/gimppatternmenu.c: follow GtkSelectionData format change
	and check the dropped things' PID against the return value of
	gimp_getpid().
2005-07-25 13:53:00 +00:00
Sven Neumann 8404a9e4e3 use the viewable's description in the drag icon. Use a larger preview.
2005-06-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_get_viewable_icon): use the
	viewable's description in the drag icon. Use a larger preview.

	* app/widgets/gimpdockbook.c: tweak spacing and border-width of
	the tab widget if it is being used as drag icon.
2005-06-04 12:54:24 +00:00
Sven Neumann be3a1dcc08 reduced the number of characters to show before ellipsizing the label.
2005-06-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_get_viewable_icon): reduced the
	number of characters to show before ellipsizing the label.

	* libgimpwidgets/gimpcolorarea.c: added a "draw-border" property.

	* app/widgets/gimpcolorframe.c: draw a border around the color area.
2005-06-04 10:12:03 +00:00
Sven Neumann 33131e6a82 show the viewable's name in the drag icon.
2005-06-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_get_viewable_icon): show the
	viewable's name in the drag icon.
2005-06-03 23:55:05 +00:00
Sven Neumann 101c5a2dc9 pass GIMP_COLOR_AREA_CHECKS_SMALL instead of TRUE for the type of the
2005-05-29  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_get_color_icon): pass
	GIMP_COLOR_AREA_CHECKS_SMALL instead of TRUE for the type of the
	GimpColorArea.

	* app/widgets/gimpcoloreditor.c: added a "context" property.

	* libgimpwidgets/gimpcolorarea.c (gimp_color_area_set_color):
	always use gimp_rgba_distance(), regardless of the area's type.
2005-05-29 13:48:03 +00:00
Michael Natterer 7abaab62e0 added virtual function GimpViewable::get_size() and public API
2005-05-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added virtual function
	GimpViewable::get_size() and public API gimp_viewable_get_size()
	which return width and height and a boolean indicating if the
	viewable has a size at all.
	Added default implementation of GimpViewable::get_popup_size()
	using the new get_size() API.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage.c
	* app/core/gimppattern.c: implement GimpViewable::get_size().

	* app/core/gimpbrush.c
	* app/core/gimppattern.c: removed GimpViewable::get_popup_size()
	implementations, the default one is good enough.

	* app/core/gimpbrushpipe.c (gimp_brush_pipe_get_popup_size):
	redirect to gimp_viewable_get_size() instead of duplicating its
	return values.

	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpview.c: allow pixbuf dragging out of any
	viewable that has a size.

	* app/widgets/gimpdrawabletreeview.c: removed pixbuf dragging code
	here.

	* app/widgets/gimpdnd.c: set gimp busy around encoding/decoding
	pixbufs into/from GtkSelectionData, because it can be a time
	consuming operation.
2005-05-25 10:05:17 +00:00
Michael Natterer 7609645970 Implement dragging and dropping in any GdkPixbuf supported format. Fixes
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-04-09 17:56:04 +00:00
Sven Neumann 1ce630e929 don't add the same target multiple times. This used to happen when
2005-03-26  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c: don't add the same target multiple times.
	This used to happen when  gimp_dnd_foo_source_add() is called
	after calling gimp_dnd_drag_source_set_by_type().
2005-03-26 16:39:51 +00:00
Sven Neumann 7684721c15 virtualized GimpView::set_viewable.
2005-03-25  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpview.[ch]: virtualized GimpView::set_viewable.

	* app/widgets/gimptoolbox-image-area.c: hook into "set_viewable"
	and add an XDS drag source.

	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpdnd.c: unset the XdndDirectSave0 property when
	the drag ends, minor cleanups.
2005-03-25 17:16:07 +00:00
Sven Neumann 0bc3233be7 app/widgets/Makefile.am new files.
2005-03-25  Sven Neumann  <sven@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/gimpdnd-xds.[ch]: new files.

	* app/widgets/gimpdnd.[ch]
	* app/widgets/widgets-enums.h: added a basic XDS (Direct Save
	Protocol) implementation.

	* app/widgets/gimpimageview.c: allow to save images by dragging
	them from the Images dialog to an XDS capable file manager.
2005-03-25 14:23:35 +00:00
Michael Natterer bfa7335635 added gimp_dnd_get_component_icon().
2005-01-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c: added gimp_dnd_get_component_icon().

	* app/widgets/gimpcomponenteditor.c: allow to drag
	components. They can't be dropped anywhere yet.
2005-01-15 14:55:15 +00:00
Michael Natterer 6dda0d82a6 reordered so COMPONENT is after IMAGE.
2005-01-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-enums.h (enum GimpDndType): reordered so
	COMPONENT is after IMAGE.

	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpselectiondata.[ch]: added API for passing
	components around via DND. Speaks in terms of a
	(GimpImage,GimpChannelType) tuple.
2005-01-15 02:24:38 +00:00
Michael Natterer e0f25134ca Applied modified patch from Ben Campbell which adds drop coordinates to
2004-12-31  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Ben Campbell which adds drop
	coordinates to the color drop callback and uses it to insert
	colors in the palette editor. Extended the patch to add drop
	coordinates to all drop callbacks.

	* app/core/gimppalette.[ch]: added gimp_palette_insert_entry().

	* app/display/gimpdisplayshell-dnd.[ch]: added drop coordinates
	to all drop callbacks.

	* app/dialogs/palette-import-dialog.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcontainerview.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfgbgeditor.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimppropwidgets.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* libgimpwidgets/gimpcolorselect.c: changed accordingly. The passed
	drop coordiantes are so far unused.

	* app/widgets/gimppaletteeditor.c: use the drop coordinates to
	insert the new color into the palette at the right place instead
	of always appending. Fixes bug #150030.
2004-12-31 14:36:30 +00:00
Michael Natterer da1a2de846 remember for which GdkDragContext the icon_widget was made.
2004-10-06  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_data_drag_begin): remember for
	which GdkDragContext the icon_widget was made.

	(gimp_dnd_data_drag_end): destroy the icon_widget only if it was
	created for this GdkDragContext. Fixes broken DND icon_widgets
	when dragging the same source again while the old icon_widget is
	still floating back from an unsuccessful drop. Fixes bug #139337.
2004-10-06 18:55:24 +00:00
Michael Natterer f338d93835 reverse order of DND dests so "text/uri-list" is preferred again after my
2004-09-16  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_uri_list_dest_add): reverse
	order of DND dests so "text/uri-list" is preferred again after my
	DND change of 2004-06-29. Fixes dropping of multiple files.
2004-09-16 14:28:10 +00:00
David Odin cddf61a3e6 app/widgets/gimppreview.c renamed these two files to...
* app/widgets/gimppreview.c
* app/widgets/gimppreview.h: renamed these two files to...

* app/widgets/gimpview.c
* app/widgets/gimpview.h: ... these files.

Also renamed GimpPreview to GimpView.
This is the first step of the great Preview->View renaming process.

* app/actions/palettes-commands.c

* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpnavigationview.c

* app/gui/palette-import-dialog.c

* app/tools/gimppaintoptions-gui.c

* app/widgets/Makefile.am
* app/widgets/gimpaction.c
* app/widgets/gimpactiongroup.c
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainergridview.h
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdnd.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpnavigationpreview.c
* app/widgets/gimpnavigationpreview.h
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimppropwidgets.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpthumbbox.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpviewabledialog.c
* app/widgets/widgets-types.h: changed accordingly.
2004-08-24 17:16:46 +00:00
Michael Natterer cc6aa18619 app/widgets/gimpdnd.[ch] app/widgets/gimpselectiondata.[ch] changed
2004-06-30  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpselectiondata.[ch]
	* app/widgets/gimpcontainertreeview.[ch]: changed "files" and "uris"
	to "uri_list" in all function names, parameters and typedefs.

	* app/widgets/gimpcontainertreeview-dnd.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/display/gimpdisplayshell-dnd.[ch]
	* app/display/gimpdisplayshell.c: changed accordingly.
2004-06-30 14:47:23 +00:00
Sven Neumann 114f747f4c renamed the SVG related functions so that they deal with an anonymous data
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 11:57:17 +00:00
Michael Natterer 425fd699e3 changed return value from gchar* to const gchar*. Renamed parameters to be
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 23:18:18 +00:00
Michael Natterer 3f5e10c1d6 use gtk_target_list_add() instead of gtk_target_list_add_table() because
2004-06-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c: use gtk_target_list_add() instead of
	gtk_target_list_add_table() because the latter prepends the
	targets to the internal list which screws the order (== priority)
	of DND targets.

	* app/widgets/gimpselectiondata.c: added some more checks for
	failed drops (selection_data->length < 0).
2004-06-29 13:20:30 +00:00
Michael Natterer 667de3c9f4 app/widgets/Makefile.am new files containing the code which
2004-06-28  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/gimpselectiondata.[ch]: new files containing the
	code which encodes/decodes all sorts of stuff to/from its
	GtkSelectionData representation. Used to live in gimpdnd.c

	* app/widgets/gimpdnd.c: use the new functions (unclutters the
	file quite a bit), converted tabs to spaces.
2004-06-28 20:39:54 +00:00
Michael Natterer 61116ebb05 removed utility funtion gimp_dnd_open_files().
2004-06-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]: removed utility funtion
	gimp_dnd_open_files().

	* app/widgets/gimptoolbox-dnd.c: added gimp_toolbox_drop_files()
	instead.

	* app/display/gimpdisplayshell-dnd.c (gimp_display_shell_drop_files):
	show the error message if opening a dropped file fails.
2004-06-02 17:35:55 +00:00
Michael Natterer b6beebcc00 removed enum GimpDndType...
2004-06-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.h: removed enum GimpDndType...

	* app/widgets/widgets-enums.h: ...and added it here.

	* app/widgets/gimpdnd.c: added more g_return_if_fail(). Allow
	all gimp_dnd_foo_dest_add() functions to be called without
	callback (just add the target if callback is NULL).

	(gimp_dnd_open_files): removed the checks for validity of the
	passed filenames/uris...

	(gimp_dnd_set_file_data): ...and added it here so all callbacks
	get an already sanitized list of strings.
2004-06-02 16:56:00 +00:00
Michael Natterer 3fbab6b46c if the dropped stuff is a local filename (no file URI), convert it to an
2004-05-28  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_open_files): if the dropped
	stuff is a local filename (no file URI), convert it to an
	URI instead of forwarding it unmodified.
2004-05-28 14:54:39 +00:00
Michael Natterer 957190d750 use the new dynamic GtkTargetList based API for changing the widget's drag
2004-04-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_data_source_add)
	(gimp_dnd_data_source_remove): use the new dynamic GtkTargetList
	based API for changing the widget's drag source types.

	* app/widgets/gimpdocumentview.c (gimp_document_view_new): simply
	call gimp_dnd_file_source_add() instead of duplicating the whole
	GtkTargetEntry array insanity just for adding one source type.
2004-04-15 17:04:43 +00:00
Michael Natterer 18d9161eea Get rid of the "current_context" which was in fact just a bunch of global
2004-04-15  Michael Natterer  <mitch@gimp.org>

	Get rid of the "current_context" which was in fact just a bunch of
	global variables. Instead, pass the needed context all the way
	from the GUI and the PDB to the core. This is a prerequisite for
	macro recording and generally helps separating the various
	subsystems from each other. Work in progress...

	* app/core/gimp.[ch]: removed member "current_context" and
	gimp_[get|set]_current_context().

	* app/core/gimp-edit.[ch]
	* app/core/gimpdrawable-blend.[ch]
	* app/core/gimpdrawable-bucket-fill.[ch]
	* app/core/gimpdrawable-offset.[ch]
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpimage-crop.[ch]
	* app/core/gimpimage-flip.[ch]
	* app/core/gimpimage-merge.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/core/gimpimage-rotate.[ch]
	* app/core/gimpimage.[ch]
	* app/core/gimpimagefile.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.[ch]
	* app/core/gimpselection.[ch]
	* app/core/gimptemplate.[ch]
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/pdb/procedural_db.[ch]
	* app/text/gimptext-compat.[ch]
	* app/text/gimptextlayer-transform.[ch]
	* app/gui/brush-select.[ch]
	* app/gui/font-select.[ch]
	* app/gui/gradient-select.[ch]
	* app/gui/palette-select.[ch]
	* app/gui/pattern-select.[ch]: added tons of "GimpContext *context"
	parameters and use the passed context instead of
	gimp_get_current_context().

	* app/app_procs.c
	* app/batch.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors.c
	* app/gui/convert-dialog.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/widgets/gimpdnd.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpthumbbox.c: pass gimp_get_user_context() or
	GIMP_CONTEXT(tool_options) or whatever is the right context
	to the changed core functions.

	* tools/pdbgen/app.pl: pass "GimpContext *context" to all
	generated PDB invokers.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: pass the new context
	parameter to the changed core functions.

	* app/pdb/*_cmds.c: regenerated.
2004-04-14 23:37:34 +00:00
Simon Budig d69b608d4a Disabled debug output and made it conditional with DEBUG_DND.
2004-03-10  Simon Budig  <simon@gimp.org>

	* app/widgets/gimpdnd.c: Disabled debug output and made it
	conditional with DEBUG_DND.
2004-03-10 14:00:52 +00:00
Michael Natterer dfba90fe46 changed "svg_data" from guchar* to gchar*, cleaned up debugging output.
2003-12-21  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]: changed "svg_data" from guchar* to
	gchar*, cleaned up debugging output.
2003-12-21 21:57:46 +00:00
Michael Natterer 1246aa0804 return a boolean indicating success from all drop handlers.
2003-12-21  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c: return a boolean indicating success from
	all drop handlers.

	(gimp_dnd_data_drop_handle): finish the drop correctly by calling
	gtk_drag_finish() with the above success value.
2003-12-21 10:53:56 +00:00
Michael Natterer e5dd444762 changed unused SVG dnd API to speak in terms of "guchar *data", "gint
2003-12-20  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]: changed unused SVG dnd API to speak in
	terms of "guchar *data", "gint data_len" instead of GimpVectors.
2003-12-20 21:59:52 +00:00
Michael Natterer 3fb7d2b325 sanitized DND identifiers (e.g. GIMP_BRUSH ->
2003-12-20  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.h: sanitized DND identifiers
	(e.g. GIMP_BRUSH -> application/x-gimp-brush-name).

	* app/widgets/gimpdnd.[ch]: added stubs for SVG DND with
	on-the-fly conversion from/to GimpVectors. Someone needs to add
	the conversion functions...
2003-12-20 19:51:21 +00:00
Sven Neumann c0ab166122 when constructing an URI list, don't add a newline character after the
2003-11-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_get_file_data): when constructing
	an URI list, don't add a newline character after the last item.
2003-11-22 00:33:22 +00:00
Michael Natterer c5865e497c changed drag source stuff to allow multiple data types. Changed DND source
2003-11-20  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]: changed drag source stuff to allow
	multiple data types. Changed DND source API to speak in terms of
	add()/remove() instead of set()/unset(). Added GimpDndDragFileFunc
	typedef and gimp_dnd_file_source_add().

	Unfortunately GTK+'s DND API lacks symmetry here (no GtkTargetList
	based API for drag sources), so we cannot really change drag
	sources on-the-fly and need to set GtkTargetEntry arrays manually.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpmenuitem.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimppreview.c
	* app/widgets/gimptoolbox-color-area.c: changed accordingly.

	* app/widgets/gimpdocumentview.c: ditto. Additionally offer
	"text/uri-list" so it's possible to drag images from the document
	history to the file manager or browser.
2003-11-20 16:26:15 +00:00
Michael Natterer de98d7af5f cleanup before doing real changes.
2003-11-20  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.c: cleanup before doing real changes.
2003-11-20 11:32:53 +00:00
Manish Singh b6ca2bfbbb Display an error if we still can't convert a filename to a valid uri.
2003-11-19  Manish Singh  <yosh@gimp.org>

        * app/widgets/gimpdnd.c (gimp_dnd_open_files): Display an error if we
        still can't convert a filename to a valid uri. Further addresses
        #127424.
2003-11-19 23:48:16 +00:00
Manish Singh a8356d4834 strstr on dnd_crap, not filename, since filename will be NULL in that
2003-11-19  Manish Singh  <yosh@gimp.org>

        * app/widgets/gimpdnd.c (gimp_dnd_open_files): strstr on dnd_crap,
        not filename, since filename will be NULL in that case. Also remove
        doubled declaration of filename.
2003-11-19 21:45:41 +00:00
Michael Natterer 481d42d536 added static "the_dnd_gimp" variable and don't use the global "the_gimp"
2003-11-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]: added static "the_dnd_gimp" variable
	and don't use the global "the_gimp" any more.
	Added gimp_dnd_init() to let the DND system know about the GUI's
	Gimp instance.

	* app/gui/gui.c (gui_init): call gimp_dnd_init().

	* app/app_procs.h: changed the #warning about including
	"app_procs.h" to an #error, like the other headers in app/ do.
2003-11-03 23:24:32 +00:00
Sven Neumann 33370866a2 according to an older mail from Owen, GDK_ACTION_DEFAULT means nothing and
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-17 11:28:28 +00:00
Sven Neumann c1c9e829ef for file drag destinations, set GDK_ACTION_DEFAULT and GDK_ACTION_MOVE in
2003-10-17  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_file_dest_add): for file drag
	destinations, set GDK_ACTION_DEFAULT and GDK_ACTION_MOVE in
	addition to GDK_ACTION_COPY. Enables DND from Konqueror.
2003-10-17 00:04:38 +00:00
Sven Neumann 6096d3e395 gimp_dnd_viewable_dest_add() calls gtk_drag_dest_set() for us so we don't
2003-10-17  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimptooloptionseditor.c: gimp_dnd_viewable_dest_add()
	calls gtk_drag_dest_set() for us so we don't need to do it here.
2003-10-16 23:43:22 +00:00
Sven Neumann 4c695c22bb some minor code cleanup.
2003-10-17  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c: some minor code cleanup.

	* libgimpcolor/gimpcolorspace.c: removed trailing whitespace.
2003-10-16 22:03:20 +00:00