Commit e0f25134 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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.
parent 8439ecb6
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 Michael Natterer <mitch@gimp.org> 2004-12-31 Michael Natterer <mitch@gimp.org>
* app/actions/tools-actions.c * app/actions/tools-actions.c
......
...@@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette, ...@@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette,
entry = g_new0 (GimpPaletteEntry, 1); entry = g_new0 (GimpPaletteEntry, 1);
entry->color = *color; entry->color = *color;
entry->name = g_strdup (name ? name : _("Untitled")); entry->name = g_strdup (name ? name : _("Untitled"));
entry->position = palette->n_colors; entry->position = palette->n_colors;
...@@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette, ...@@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette,
return entry; return entry;
} }
GimpPaletteEntry *
gimp_palette_insert_entry (GimpPalette *palette,
gint position,
const gchar *name,
const GimpRGB *color)
{
GimpPaletteEntry *entry;
GList *list;
g_return_val_if_fail (GIMP_IS_PALETTE (palette), NULL);
g_return_val_if_fail (color != NULL, NULL);
if (position < 0 || position >= palette->n_colors)
return gimp_palette_add_entry (palette, name, color);
entry = g_new0 (GimpPaletteEntry, 1);
entry->color = *color;
entry->name = g_strdup (name ? name : _("Untitled"));
entry->position = position;
palette->colors = g_list_insert (palette->colors, entry, position);
palette->n_colors += 1;
/* renumber the displaced entries */
for (list = g_list_nth (palette->colors, position + 1);
list;
list = g_list_next (list))
{
entry = (GimpPaletteEntry *) list->data;
entry->position += 1;
}
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
return entry;
}
void void
gimp_palette_delete_entry (GimpPalette *palette, gimp_palette_delete_entry (GimpPalette *palette,
GimpPaletteEntry *entry) GimpPaletteEntry *entry)
......
...@@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette, ...@@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette,
entry = g_new0 (GimpPaletteEntry, 1); entry = g_new0 (GimpPaletteEntry, 1);
entry->color = *color; entry->color = *color;
entry->name = g_strdup (name ? name : _("Untitled")); entry->name = g_strdup (name ? name : _("Untitled"));
entry->position = palette->n_colors; entry->position = palette->n_colors;
...@@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette, ...@@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette,
return entry; return entry;
} }
GimpPaletteEntry *
gimp_palette_insert_entry (GimpPalette *palette,
gint position,
const gchar *name,
const GimpRGB *color)
{
GimpPaletteEntry *entry;
GList *list;
g_return_val_if_fail (GIMP_IS_PALETTE (palette), NULL);
g_return_val_if_fail (color != NULL, NULL);
if (position < 0 || position >= palette->n_colors)
return gimp_palette_add_entry (palette, name, color);
entry = g_new0 (GimpPaletteEntry, 1);
entry->color = *color;
entry->name = g_strdup (name ? name : _("Untitled"));
entry->position = position;
palette->colors = g_list_insert (palette->colors, entry, position);
palette->n_colors += 1;
/* renumber the displaced entries */
for (list = g_list_nth (palette->colors, position + 1);
list;
list = g_list_next (list))
{
entry = (GimpPaletteEntry *) list->data;
entry->position += 1;
}
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
return entry;
}
void void
gimp_palette_delete_entry (GimpPalette *palette, gimp_palette_delete_entry (GimpPalette *palette,
GimpPaletteEntry *entry) GimpPaletteEntry *entry)
......
...@@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette, ...@@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette,
entry = g_new0 (GimpPaletteEntry, 1); entry = g_new0 (GimpPaletteEntry, 1);
entry->color = *color; entry->color = *color;
entry->name = g_strdup (name ? name : _("Untitled")); entry->name = g_strdup (name ? name : _("Untitled"));
entry->position = palette->n_colors; entry->position = palette->n_colors;
...@@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette, ...@@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette,
return entry; return entry;
} }
GimpPaletteEntry *
gimp_palette_insert_entry (GimpPalette *palette,
gint position,
const gchar *name,
const GimpRGB *color)
{
GimpPaletteEntry *entry;
GList *list;
g_return_val_if_fail (GIMP_IS_PALETTE (palette), NULL);
g_return_val_if_fail (color != NULL, NULL);
if (position < 0 || position >= palette->n_colors)
return gimp_palette_add_entry (palette, name, color);
entry = g_new0 (GimpPaletteEntry, 1);
entry->color = *color;
entry->name = g_strdup (name ? name : _("Untitled"));
entry->position = position;
palette->colors = g_list_insert (palette->colors, entry, position);
palette->n_colors += 1;
/* renumber the displaced entries */
for (list = g_list_nth (palette->colors, position + 1);
list;
list = g_list_next (list))
{
entry = (GimpPaletteEntry *) list->data;
entry->position += 1;
}
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
return entry;
}
void void
gimp_palette_delete_entry (GimpPalette *palette, gimp_palette_delete_entry (GimpPalette *palette,
GimpPaletteEntry *entry) GimpPaletteEntry *entry)
......
...@@ -72,10 +72,14 @@ GList * gimp_palette_load (const gchar *filename, ...@@ -72,10 +72,14 @@ GList * gimp_palette_load (const gchar *filename,
GError **error); GError **error);
GimpPaletteEntry * gimp_palette_add_entry (GimpPalette *palette, GimpPaletteEntry * gimp_palette_add_entry (GimpPalette *palette,
const gchar *name, const gchar *name,
const GimpRGB *color); const GimpRGB *color);
GimpPaletteEntry * gimp_palette_insert_entry (GimpPalette *palette,
gint position,
const gchar *name,
const GimpRGB *color);
void gimp_palette_delete_entry (GimpPalette *palette, void gimp_palette_delete_entry (GimpPalette *palette,
GimpPaletteEntry *entry); GimpPaletteEntry *entry);
void gimp_palette_set_n_columns (GimpPalette *palette, void gimp_palette_set_n_columns (GimpPalette *palette,
gint n_columns); gint n_columns);
......
...@@ -100,6 +100,8 @@ static void palette_import_image_changed (GimpContext *context, ...@@ -100,6 +100,8 @@ static void palette_import_image_changed (GimpContext *context,
static void palette_import_filename_changed (GimpFileEntry *file_entry, static void palette_import_filename_changed (GimpFileEntry *file_entry,
ImportDialog *import_dialog); ImportDialog *import_dialog);
static void import_dialog_drop_callback (GtkWidget *widget, static void import_dialog_drop_callback (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
static void palette_import_grad_callback (GtkWidget *widget, static void palette_import_grad_callback (GtkWidget *widget,
...@@ -509,6 +511,8 @@ palette_import_filename_changed (GimpFileEntry *file_entry, ...@@ -509,6 +511,8 @@ palette_import_filename_changed (GimpFileEntry *file_entry,
static void static void
import_dialog_drop_callback (GtkWidget *widget, import_dialog_drop_callback (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data) gpointer data)
{ {
......
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
void void
gimp_display_shell_drop_drawable (GtkWidget *widget, gimp_display_shell_drop_drawable (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data) gpointer data)
{ {
...@@ -119,6 +121,8 @@ gimp_display_shell_drop_drawable (GtkWidget *widget, ...@@ -119,6 +121,8 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
void void
gimp_display_shell_drop_vectors (GtkWidget *widget, gimp_display_shell_drop_vectors (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data) gpointer data)
{ {
...@@ -154,6 +158,8 @@ gimp_display_shell_drop_vectors (GtkWidget *widget, ...@@ -154,6 +158,8 @@ gimp_display_shell_drop_vectors (GtkWidget *widget,
void void
gimp_display_shell_drop_svg (GtkWidget *widget, gimp_display_shell_drop_svg (GtkWidget *widget,
gint x,
gint y,
const guchar *svg_data, const guchar *svg_data,
gsize svg_data_len, gsize svg_data_len,
gpointer data) gpointer data)
...@@ -228,6 +234,8 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell, ...@@ -228,6 +234,8 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell,
void void
gimp_display_shell_drop_pattern (GtkWidget *widget, gimp_display_shell_drop_pattern (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data) gpointer data)
{ {
...@@ -241,6 +249,8 @@ gimp_display_shell_drop_pattern (GtkWidget *widget, ...@@ -241,6 +249,8 @@ gimp_display_shell_drop_pattern (GtkWidget *widget,
void void
gimp_display_shell_drop_color (GtkWidget *widget, gimp_display_shell_drop_color (GtkWidget *widget,
gint x,
gint y,
const GimpRGB *color, const GimpRGB *color,
gpointer data) gpointer data)
{ {
...@@ -253,6 +263,8 @@ gimp_display_shell_drop_color (GtkWidget *widget, ...@@ -253,6 +263,8 @@ gimp_display_shell_drop_color (GtkWidget *widget,
void void
gimp_display_shell_drop_buffer (GtkWidget *widget, gimp_display_shell_drop_buffer (GtkWidget *widget,
gint drop_x,
gint drop_y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data) gpointer data)
{ {
...@@ -284,6 +296,8 @@ gimp_display_shell_drop_buffer (GtkWidget *widget, ...@@ -284,6 +296,8 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
void void
gimp_display_shell_drop_uri_list (GtkWidget *widget, gimp_display_shell_drop_uri_list (GtkWidget *widget,
gint x,
gint y,
GList *uri_list, GList *uri_list,
gpointer data) gpointer data)
{ {
......
...@@ -21,25 +21,39 @@ ...@@ -21,25 +21,39 @@
void gimp_display_shell_drop_drawable (GtkWidget *widget, void gimp_display_shell_drop_drawable (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
void gimp_display_shell_drop_vectors (GtkWidget *widget, void gimp_display_shell_drop_vectors (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
void gimp_display_shell_drop_svg (GtkWidget *widget, void gimp_display_shell_drop_svg (GtkWidget *widget,
gint x,
gint y,
const guchar *svg_data, const guchar *svg_data,
gsize svg_data_length, gsize svg_data_length,
gpointer data); gpointer data);
void gimp_display_shell_drop_pattern (GtkWidget *widget, void gimp_display_shell_drop_pattern (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
void gimp_display_shell_drop_color (GtkWidget *widget, void gimp_display_shell_drop_color (GtkWidget *widget,
gint x,
gint y,
const GimpRGB *color, const GimpRGB *color,
gpointer data); gpointer data);
void gimp_display_shell_drop_buffer (GtkWidget *widget, void gimp_display_shell_drop_buffer (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
void gimp_display_shell_drop_uri_list (GtkWidget *widget, void gimp_display_shell_drop_uri_list (GtkWidget *widget,
gint x,
gint y,
GList *uri_list, GList *uri_list,
gpointer data); gpointer data);
......
...@@ -113,6 +113,8 @@ static void gimp_colormap_preview_drag_color (GtkWidget *widget, ...@@ -113,6 +113,8 @@ static void gimp_colormap_preview_drag_color (GtkWidget *widget,
GimpRGB *color, GimpRGB *color,
gpointer data); gpointer data);
static void gimp_colormap_preview_drop_color (GtkWidget *widget, static void gimp_colormap_preview_drop_color (GtkWidget *widget,
gint x,
gint y,
const GimpRGB *color, const GimpRGB *color,
gpointer data); gpointer data);
...@@ -763,6 +765,8 @@ gimp_colormap_preview_drag_color (GtkWidget *widget, ...@@ -763,6 +765,8 @@ gimp_colormap_preview_drag_color (GtkWidget *widget,
static void static void
gimp_colormap_preview_drop_color (GtkWidget *widget, gimp_colormap_preview_drop_color (GtkWidget *widget,
gint x,
gint y,
const GimpRGB *color, const GimpRGB *color,
gpointer data) gpointer data)
{ {
......
...@@ -106,9 +106,13 @@ static void gimp_container_view_context_changed (GimpContext *context, ...@@ -106,9 +106,13 @@ static void gimp_container_view_context_changed (GimpContext *context,
GimpViewable *viewable, GimpViewable *viewable,
GimpContainerView *view); GimpContainerView *view);
static void gimp_container_view_viewable_dropped (GtkWidget *widget, static void gimp_container_view_viewable_dropped (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
static void gimp_container_view_button_viewable_dropped (GtkWidget *widget, static void gimp_container_view_button_viewable_dropped (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
...@@ -1038,6 +1042,8 @@ gimp_container_view_context_changed (GimpContext *context, ...@@ -1038,6 +1042,8 @@ gimp_container_view_context_changed (GimpContext *context,
static void static void
gimp_container_view_viewable_dropped (GtkWidget *widget, gimp_container_view_viewable_dropped (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data) gpointer data)
{ {
...@@ -1053,6 +1059,8 @@ gimp_container_view_viewable_dropped (GtkWidget *widget, ...@@ -1053,6 +1059,8 @@ gimp_container_view_viewable_dropped (GtkWidget *widget,
static void static void
gimp_container_view_button_viewable_dropped (GtkWidget *widget, gimp_container_view_button_viewable_dropped (GtkWidget *widget,
gint x,
gint y,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data) gpointer data)
{ {
......
...@@ -73,6 +73,8 @@ typedef void (* GimpDndDragDataFunc) (GtkWidget *widget, ...@@ -73,6 +73,8 @@ typedef void (* GimpDndDragDataFunc) (GtkWidget *widget,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom); GdkAtom atom);
typedef gboolean (* GimpDndDropDataFunc) (GtkWidget *widget, typedef gboolean (* GimpDndDropDataFunc) (GtkWidget *widget,
gint x,
gint y,
GCallback set_data_func, GCallback set_data_func,
gpointer set_data_data, gpointer set_data_data,
GtkSelectionData *selection); GtkSelectionData *selection);
...@@ -109,6 +111,8 @@ static void gimp_dnd_get_uri_list_data (GtkWidget *widget, ...@@ -109,6 +111,8 @@ static void gimp_dnd_get_uri_list_data (GtkWidget *widget,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom); GdkAtom atom);
static gboolean gimp_dnd_set_uri_list_data (GtkWidget *widget, static gboolean gimp_dnd_set_uri_list_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_uri_list_func, GCallback set_uri_list_func,
gpointer set_uri_list_data, gpointer set_uri_list_data,
GtkSelectionData *selection); GtkSelectionData *selection);
...@@ -119,6 +123,8 @@ static void gimp_dnd_get_color_data (GtkWidget *widget, ...@@ -119,6 +123,8 @@ static void gimp_dnd_get_color_data (GtkWidget *widget,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom); GdkAtom atom);
static gboolean gimp_dnd_set_color_data (GtkWidget *widget, static gboolean gimp_dnd_set_color_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_color_func, GCallback set_color_func,
gpointer set_color_data, gpointer set_color_data,
GtkSelectionData *selection); GtkSelectionData *selection);
...@@ -129,6 +135,8 @@ static void gimp_dnd_get_stream_data (GtkWidget *widget, ...@@ -129,6 +135,8 @@ static void gimp_dnd_get_stream_data (GtkWidget *widget,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom); GdkAtom atom);
static gboolean gimp_dnd_set_stream_data (GtkWidget *widget, static gboolean gimp_dnd_set_stream_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_stream_func, GCallback set_stream_func,
gpointer set_stream_data, gpointer set_stream_data,
GtkSelectionData *selection); GtkSelectionData *selection);
...@@ -139,6 +147,8 @@ static void gimp_dnd_get_image_data (GtkWidget *widget, ...@@ -139,6 +147,8 @@ static void gimp_dnd_get_image_data (GtkWidget *widget,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom); GdkAtom atom);
static gboolean gimp_dnd_set_image_data (GtkWidget *widget, static gboolean gimp_dnd_set_image_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_image_func, GCallback set_image_func,
gpointer set_image_data, gpointer set_image_data,
GtkSelectionData *selection); GtkSelectionData *selection);
...@@ -149,6 +159,8 @@ static void gimp_dnd_get_item_data (GtkWidget *widget, ...@@ -149,6 +159,8 @@ static void gimp_dnd_get_item_data (GtkWidget *widget,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom); GdkAtom atom);
static gboolean gimp_dnd_set_item_data (GtkWidget *widget, static gboolean gimp_dnd_set_item_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_item_func, GCallback set_item_func,
gpointer set_item_data, gpointer set_item_data,
GtkSelectionData *selection); GtkSelectionData *selection);
...@@ -160,38 +172,56 @@ static void gimp_dnd_get_data_data (GtkWidget *widget, ...@@ -160,38 +172,56 @@ static void gimp_dnd_get_data_data (GtkWidget *widget,
GdkAtom atom); GdkAtom atom);
static gboolean gimp_dnd_set_brush_data (GtkWidget *widget, static gboolean gimp_dnd_set_brush_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_brush_func, GCallback set_brush_func,
gpointer set_brush_data, gpointer set_brush_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_pattern_data (GtkWidget *widget, static gboolean gimp_dnd_set_pattern_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_pattern_func, GCallback set_pattern_func,
gpointer set_pattern_data, gpointer set_pattern_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_gradient_data (GtkWidget *widget, static gboolean gimp_dnd_set_gradient_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_gradient_func, GCallback set_gradient_func,
gpointer set_gradient_data, gpointer set_gradient_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_palette_data (GtkWidget *widget, static gboolean gimp_dnd_set_palette_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_palette_func, GCallback set_palette_func,
gpointer set_palette_data, gpointer set_palette_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_font_data (GtkWidget *widget, static gboolean gimp_dnd_set_font_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_font_func, GCallback set_font_func,
gpointer set_font_data, gpointer set_font_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_buffer_data (GtkWidget *widget, static gboolean gimp_dnd_set_buffer_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_buffer_func, GCallback set_buffer_func,
gpointer set_buffer_data, gpointer set_buffer_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_imagefile_data (GtkWidget *widget, static gboolean gimp_dnd_set_imagefile_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_imagefile_func, GCallback set_imagefile_func,
gpointer set_imagefile_data, gpointer set_imagefile_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_template_data (GtkWidget *widget, static gboolean gimp_dnd_set_template_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_template_func, GCallback set_template_func,
gpointer set_template_data, gpointer set_template_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static gboolean gimp_dnd_set_tool_data (GtkWidget *widget, static gboolean gimp_dnd_set_tool_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_tool_func, GCallback set_tool_func,
gpointer set_tool_data, gpointer set_tool_data,
GtkSelectionData *selection); GtkSelectionData *selection);
...@@ -729,7 +759,7 @@ gimp_dnd_data_drop_handle (GtkWidget *widget, ...@@ -729,7 +759,7 @@ gimp_dnd_data_drop_handle (GtkWidget *widget,
dnd_data->set_data_data_name); dnd_data->set_data_data_name);
if (set_data_func && if (set_data_func &&
dnd_data->set_data_func (widget, dnd_data->set_data_func (widget, x, y,
set_data_func, set_data_func,
set_data_data, set_data_data,
selection_data)) selection_data))
...@@ -956,6 +986,8 @@ gimp_dnd_get_uri_list_data (GtkWidget *widget, ...@@ -956,6 +986,8 @@ gimp_dnd_get_uri_list_data (GtkWidget *widget,
static gboolean static gboolean
gimp_dnd_set_uri_list_data (GtkWidget *widget, gimp_dnd_set_uri_list_data (GtkWidget *widget,
gint x,
gint y,
GCallback set_uri_list_func, GCallback set_uri_list_func,
gpointer set_uri_list_data, gpointer set_uri_list_data,
GtkSelectionData *selection) GtkSelectionData *selection)
...@@ -965,7 +997,7 @@ gimp_dnd_set_uri_list_data (GtkWidget *widget, ...@@ -965,7 +997,7 @@ gimp_dnd_set_uri_list_data (GtkWidget *widget,
if (! uri_list) if (! uri_list)
return FALSE; return FALSE;
(* (GimpDndDropUriListFunc) set_uri_list_func) (widget, uri_list, (* (GimpDndDropUriListFunc) set_uri_list_func) (widget, x, y, uri_list,
set_uri_list_data); set_uri_list_data);
g_list_foreach (uri_list, (GFunc) g_free, NULL); g_list_foreach (uri_list, (GFunc) g_free, NULL);
...@@ -1068,6 +1100,8 @@ gimp_dnd_get_color_data (GtkWidget *widget, ...@@ -1068,6 +1100,8 @@ gimp_dnd_get_color_data (GtkWidget *widget,
static gboolean static gboolean
gimp_dnd_set_color_data (GtkWidget *widget, gimp_dnd_set_color_data (GtkWidget *widget,
gint x,
gint y,