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.
This commit is contained in:

committed by
Michael Natterer

parent
8439ecb6da
commit
e0f25134ca
34
ChangeLog
34
ChangeLog
@ -1,3 +1,37 @@
|
||||
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>
|
||||
|
||||
* app/actions/tools-actions.c
|
||||
|
@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette,
|
||||
entry = g_new0 (GimpPaletteEntry, 1);
|
||||
|
||||
entry->color = *color;
|
||||
|
||||
entry->name = g_strdup (name ? name : _("Untitled"));
|
||||
entry->position = palette->n_colors;
|
||||
|
||||
@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette,
|
||||
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
|
||||
gimp_palette_delete_entry (GimpPalette *palette,
|
||||
GimpPaletteEntry *entry)
|
||||
|
@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette,
|
||||
entry = g_new0 (GimpPaletteEntry, 1);
|
||||
|
||||
entry->color = *color;
|
||||
|
||||
entry->name = g_strdup (name ? name : _("Untitled"));
|
||||
entry->position = palette->n_colors;
|
||||
|
||||
@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette,
|
||||
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
|
||||
gimp_palette_delete_entry (GimpPalette *palette,
|
||||
GimpPaletteEntry *entry)
|
||||
|
@ -630,7 +630,6 @@ gimp_palette_add_entry (GimpPalette *palette,
|
||||
entry = g_new0 (GimpPaletteEntry, 1);
|
||||
|
||||
entry->color = *color;
|
||||
|
||||
entry->name = g_strdup (name ? name : _("Untitled"));
|
||||
entry->position = palette->n_colors;
|
||||
|
||||
@ -643,6 +642,45 @@ gimp_palette_add_entry (GimpPalette *palette,
|
||||
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
|
||||
gimp_palette_delete_entry (GimpPalette *palette,
|
||||
GimpPaletteEntry *entry)
|
||||
|
@ -72,10 +72,14 @@ GList * gimp_palette_load (const gchar *filename,
|
||||
GError **error);
|
||||
|
||||
GimpPaletteEntry * gimp_palette_add_entry (GimpPalette *palette,
|
||||
const gchar *name,
|
||||
const GimpRGB *color);
|
||||
const gchar *name,
|
||||
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,
|
||||
GimpPaletteEntry *entry);
|
||||
GimpPaletteEntry *entry);
|
||||
|
||||
void gimp_palette_set_n_columns (GimpPalette *palette,
|
||||
gint n_columns);
|
||||
|
@ -100,6 +100,8 @@ static void palette_import_image_changed (GimpContext *context,
|
||||
static void palette_import_filename_changed (GimpFileEntry *file_entry,
|
||||
ImportDialog *import_dialog);
|
||||
static void import_dialog_drop_callback (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void palette_import_grad_callback (GtkWidget *widget,
|
||||
@ -509,6 +511,8 @@ palette_import_filename_changed (GimpFileEntry *file_entry,
|
||||
|
||||
static void
|
||||
import_dialog_drop_callback (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -66,6 +66,8 @@
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_drawable (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -119,6 +121,8 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_vectors (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -154,6 +158,8 @@ gimp_display_shell_drop_vectors (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_svg (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const guchar *svg_data,
|
||||
gsize svg_data_len,
|
||||
gpointer data)
|
||||
@ -228,6 +234,8 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell,
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_pattern (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -241,6 +249,8 @@ gimp_display_shell_drop_pattern (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
@ -253,6 +263,8 @@ gimp_display_shell_drop_color (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_buffer (GtkWidget *widget,
|
||||
gint drop_x,
|
||||
gint drop_y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -284,6 +296,8 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gimp_display_shell_drop_uri_list (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GList *uri_list,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -21,25 +21,39 @@
|
||||
|
||||
|
||||
void gimp_display_shell_drop_drawable (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_vectors (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_svg (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const guchar *svg_data,
|
||||
gsize svg_data_length,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_pattern (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_buffer (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
void gimp_display_shell_drop_uri_list (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GList *uri_list,
|
||||
gpointer data);
|
||||
|
||||
|
@ -113,6 +113,8 @@ static void gimp_colormap_preview_drag_color (GtkWidget *widget,
|
||||
GimpRGB *color,
|
||||
gpointer data);
|
||||
static void gimp_colormap_preview_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
|
||||
@ -763,6 +765,8 @@ gimp_colormap_preview_drag_color (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_colormap_preview_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -106,9 +106,13 @@ static void gimp_container_view_context_changed (GimpContext *context,
|
||||
GimpViewable *viewable,
|
||||
GimpContainerView *view);
|
||||
static void gimp_container_view_viewable_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_container_view_button_viewable_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
|
||||
@ -1038,6 +1042,8 @@ gimp_container_view_context_changed (GimpContext *context,
|
||||
|
||||
static void
|
||||
gimp_container_view_viewable_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -1053,6 +1059,8 @@ gimp_container_view_viewable_dropped (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_container_view_button_viewable_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -73,6 +73,8 @@ typedef void (* GimpDndDragDataFunc) (GtkWidget *widget,
|
||||
GtkSelectionData *selection,
|
||||
GdkAtom atom);
|
||||
typedef gboolean (* GimpDndDropDataFunc) (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_data_func,
|
||||
gpointer set_data_data,
|
||||
GtkSelectionData *selection);
|
||||
@ -109,6 +111,8 @@ static void gimp_dnd_get_uri_list_data (GtkWidget *widget,
|
||||
GtkSelectionData *selection,
|
||||
GdkAtom atom);
|
||||
static gboolean gimp_dnd_set_uri_list_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_uri_list_func,
|
||||
gpointer set_uri_list_data,
|
||||
GtkSelectionData *selection);
|
||||
@ -119,6 +123,8 @@ static void gimp_dnd_get_color_data (GtkWidget *widget,
|
||||
GtkSelectionData *selection,
|
||||
GdkAtom atom);
|
||||
static gboolean gimp_dnd_set_color_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_color_func,
|
||||
gpointer set_color_data,
|
||||
GtkSelectionData *selection);
|
||||
@ -129,6 +135,8 @@ static void gimp_dnd_get_stream_data (GtkWidget *widget,
|
||||
GtkSelectionData *selection,
|
||||
GdkAtom atom);
|
||||
static gboolean gimp_dnd_set_stream_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_stream_func,
|
||||
gpointer set_stream_data,
|
||||
GtkSelectionData *selection);
|
||||
@ -139,6 +147,8 @@ static void gimp_dnd_get_image_data (GtkWidget *widget,
|
||||
GtkSelectionData *selection,
|
||||
GdkAtom atom);
|
||||
static gboolean gimp_dnd_set_image_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_image_func,
|
||||
gpointer set_image_data,
|
||||
GtkSelectionData *selection);
|
||||
@ -149,6 +159,8 @@ static void gimp_dnd_get_item_data (GtkWidget *widget,
|
||||
GtkSelectionData *selection,
|
||||
GdkAtom atom);
|
||||
static gboolean gimp_dnd_set_item_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_item_func,
|
||||
gpointer set_item_data,
|
||||
GtkSelectionData *selection);
|
||||
@ -160,38 +172,56 @@ static void gimp_dnd_get_data_data (GtkWidget *widget,
|
||||
GdkAtom atom);
|
||||
|
||||
static gboolean gimp_dnd_set_brush_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_brush_func,
|
||||
gpointer set_brush_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_pattern_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_pattern_func,
|
||||
gpointer set_pattern_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_gradient_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_gradient_func,
|
||||
gpointer set_gradient_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_palette_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_palette_func,
|
||||
gpointer set_palette_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_font_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_font_func,
|
||||
gpointer set_font_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_buffer_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_buffer_func,
|
||||
gpointer set_buffer_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_imagefile_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_imagefile_func,
|
||||
gpointer set_imagefile_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_template_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_template_func,
|
||||
gpointer set_template_data,
|
||||
GtkSelectionData *selection);
|
||||
static gboolean gimp_dnd_set_tool_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_tool_func,
|
||||
gpointer set_tool_data,
|
||||
GtkSelectionData *selection);
|
||||
@ -729,7 +759,7 @@ gimp_dnd_data_drop_handle (GtkWidget *widget,
|
||||
dnd_data->set_data_data_name);
|
||||
|
||||
if (set_data_func &&
|
||||
dnd_data->set_data_func (widget,
|
||||
dnd_data->set_data_func (widget, x, y,
|
||||
set_data_func,
|
||||
set_data_data,
|
||||
selection_data))
|
||||
@ -956,6 +986,8 @@ gimp_dnd_get_uri_list_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_uri_list_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_uri_list_func,
|
||||
gpointer set_uri_list_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -965,7 +997,7 @@ gimp_dnd_set_uri_list_data (GtkWidget *widget,
|
||||
if (! uri_list)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropUriListFunc) set_uri_list_func) (widget, uri_list,
|
||||
(* (GimpDndDropUriListFunc) set_uri_list_func) (widget, x, y, uri_list,
|
||||
set_uri_list_data);
|
||||
|
||||
g_list_foreach (uri_list, (GFunc) g_free, NULL);
|
||||
@ -1068,6 +1100,8 @@ gimp_dnd_get_color_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_color_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_color_func,
|
||||
gpointer set_color_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1077,7 +1111,7 @@ gimp_dnd_set_color_data (GtkWidget *widget,
|
||||
if (! gimp_selection_data_get_color (selection, &color))
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropColorFunc) set_color_func) (widget, &color,
|
||||
(* (GimpDndDropColorFunc) set_color_func) (widget, x, y, &color,
|
||||
set_color_data);
|
||||
|
||||
return TRUE;
|
||||
@ -1150,6 +1184,8 @@ gimp_dnd_get_stream_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_stream_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_stream_func,
|
||||
gpointer set_stream_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1162,7 +1198,7 @@ gimp_dnd_set_stream_data (GtkWidget *widget,
|
||||
if (! stream)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropStreamFunc) set_stream_func) (widget,
|
||||
(* (GimpDndDropStreamFunc) set_stream_func) (widget, x, y,
|
||||
stream, stream_length,
|
||||
set_stream_data);
|
||||
|
||||
@ -1487,6 +1523,8 @@ gimp_dnd_get_image_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_image_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_image_func,
|
||||
gpointer set_image_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1496,7 +1534,7 @@ gimp_dnd_set_image_data (GtkWidget *widget,
|
||||
if (! gimage)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_image_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_image_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (gimage),
|
||||
set_image_data);
|
||||
|
||||
@ -1526,6 +1564,8 @@ gimp_dnd_get_item_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_item_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_item_func,
|
||||
gpointer set_item_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1535,7 +1575,7 @@ gimp_dnd_set_item_data (GtkWidget *widget,
|
||||
if (! item)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_item_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_item_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (item),
|
||||
set_item_data);
|
||||
|
||||
@ -1570,6 +1610,8 @@ gimp_dnd_get_data_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_brush_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_brush_func,
|
||||
gpointer set_brush_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1579,7 +1621,7 @@ gimp_dnd_set_brush_data (GtkWidget *widget,
|
||||
if (! brush)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_brush_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_brush_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (brush),
|
||||
set_brush_data);
|
||||
|
||||
@ -1593,6 +1635,8 @@ gimp_dnd_set_brush_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_pattern_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_pattern_func,
|
||||
gpointer set_pattern_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1603,7 +1647,7 @@ gimp_dnd_set_pattern_data (GtkWidget *widget,
|
||||
if (! pattern)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_pattern_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_pattern_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (pattern),
|
||||
set_pattern_data);
|
||||
|
||||
@ -1617,6 +1661,8 @@ gimp_dnd_set_pattern_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_gradient_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_gradient_func,
|
||||
gpointer set_gradient_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1627,7 +1673,7 @@ gimp_dnd_set_gradient_data (GtkWidget *widget,
|
||||
if (! gradient)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_gradient_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_gradient_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (gradient),
|
||||
set_gradient_data);
|
||||
|
||||
@ -1641,6 +1687,8 @@ gimp_dnd_set_gradient_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_palette_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_palette_func,
|
||||
gpointer set_palette_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1651,7 +1699,7 @@ gimp_dnd_set_palette_data (GtkWidget *widget,
|
||||
if (! palette)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_palette_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_palette_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (palette),
|
||||
set_palette_data);
|
||||
|
||||
@ -1665,6 +1713,8 @@ gimp_dnd_set_palette_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_font_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_font_func,
|
||||
gpointer set_font_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1674,7 +1724,7 @@ gimp_dnd_set_font_data (GtkWidget *widget,
|
||||
if (! font)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_font_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_font_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (font),
|
||||
set_font_data);
|
||||
|
||||
@ -1688,6 +1738,8 @@ gimp_dnd_set_font_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_buffer_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_buffer_func,
|
||||
gpointer set_buffer_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1697,7 +1749,7 @@ gimp_dnd_set_buffer_data (GtkWidget *widget,
|
||||
if (! buffer)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_buffer_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_buffer_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (buffer),
|
||||
set_buffer_data);
|
||||
|
||||
@ -1711,6 +1763,8 @@ gimp_dnd_set_buffer_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_imagefile_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_imagefile_func,
|
||||
gpointer set_imagefile_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1721,7 +1775,7 @@ gimp_dnd_set_imagefile_data (GtkWidget *widget,
|
||||
if (! imagefile)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_imagefile_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_imagefile_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (imagefile),
|
||||
set_imagefile_data);
|
||||
|
||||
@ -1735,6 +1789,8 @@ gimp_dnd_set_imagefile_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_template_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_template_func,
|
||||
gpointer set_template_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1745,7 +1801,7 @@ gimp_dnd_set_template_data (GtkWidget *widget,
|
||||
if (! template)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_template_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_template_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (template),
|
||||
set_template_data);
|
||||
|
||||
@ -1759,6 +1815,8 @@ gimp_dnd_set_template_data (GtkWidget *widget,
|
||||
|
||||
static gboolean
|
||||
gimp_dnd_set_tool_data (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GCallback set_tool_func,
|
||||
gpointer set_tool_data,
|
||||
GtkSelectionData *selection)
|
||||
@ -1769,7 +1827,7 @@ gimp_dnd_set_tool_data (GtkWidget *widget,
|
||||
if (! tool_info)
|
||||
return FALSE;
|
||||
|
||||
(* (GimpDndDropViewableFunc) set_tool_func) (widget,
|
||||
(* (GimpDndDropViewableFunc) set_tool_func) (widget, x, y,
|
||||
GIMP_VIEWABLE (tool_info),
|
||||
set_tool_data);
|
||||
|
||||
|
@ -100,6 +100,8 @@ void gimp_dnd_init (Gimp *gimp);
|
||||
typedef GList * (* GimpDndDragUriListFunc) (GtkWidget *widget,
|
||||
gpointer data);
|
||||
typedef void (* GimpDndDropUriListFunc) (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GList *uri_list,
|
||||
gpointer data);
|
||||
|
||||
@ -117,20 +119,22 @@ void gimp_dnd_uri_list_dest_remove (GtkWidget *widget);
|
||||
/* color dnd functions */
|
||||
|
||||
typedef void (* GimpDndDragColorFunc) (GtkWidget *widget,
|
||||
GimpRGB *color,
|
||||
gpointer data);
|
||||
GimpRGB *color,
|
||||
gpointer data);
|
||||
typedef void (* GimpDndDropColorFunc) (GtkWidget *widget,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
|
||||
void gimp_dnd_color_source_add (GtkWidget *widget,
|
||||
GimpDndDragColorFunc get_color_func,
|
||||
gpointer data);
|
||||
GimpDndDragColorFunc get_color_func,
|
||||
gpointer data);
|
||||
void gimp_dnd_color_source_remove (GtkWidget *widget);
|
||||
|
||||
void gimp_dnd_color_dest_add (GtkWidget *widget,
|
||||
GimpDndDropColorFunc set_color_func,
|
||||
gpointer data);
|
||||
GimpDndDropColorFunc set_color_func,
|
||||
gpointer data);
|
||||
void gimp_dnd_color_dest_remove (GtkWidget *widget);
|
||||
|
||||
|
||||
@ -140,6 +144,8 @@ typedef guchar * (* GimpDndDragStreamFunc) (GtkWidget *widget,
|
||||
gsize *stream_len,
|
||||
gpointer data);
|
||||
typedef void (* GimpDndDropStreamFunc) (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const guchar *stream,
|
||||
gsize stream_len,
|
||||
gpointer data);
|
||||
@ -158,10 +164,12 @@ void gimp_dnd_svg_dest_remove (GtkWidget *widget);
|
||||
/* GimpViewable (by GType) dnd functions */
|
||||
|
||||
typedef GimpViewable * (* GimpDndDragViewableFunc) (GtkWidget *widget,
|
||||
gpointer data);
|
||||
gpointer data);
|
||||
typedef void (* GimpDndDropViewableFunc) (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
|
||||
|
||||
gboolean gimp_dnd_drag_source_set_by_type (GtkWidget *widget,
|
||||
|
@ -64,10 +64,14 @@ static void gimp_drawable_tree_view_floating_selection_changed
|
||||
|
||||
static void gimp_drawable_tree_view_new_pattern_dropped
|
||||
(GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_drawable_tree_view_new_color_dropped
|
||||
(GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
|
||||
@ -228,6 +232,8 @@ gimp_drawable_tree_view_floating_selection_changed (GimpImage *gimage
|
||||
|
||||
static void
|
||||
gimp_drawable_tree_view_new_dropped (GimpItemTreeView *view,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpBucketFillMode fill_mode,
|
||||
const GimpRGB *color,
|
||||
GimpPattern *pattern)
|
||||
@ -271,10 +277,12 @@ gimp_drawable_tree_view_new_dropped (GimpItemTreeView *view,
|
||||
|
||||
static void
|
||||
gimp_drawable_tree_view_new_pattern_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_drawable_tree_view_new_dropped (GIMP_ITEM_TREE_VIEW (data),
|
||||
gimp_drawable_tree_view_new_dropped (GIMP_ITEM_TREE_VIEW (data), x, y,
|
||||
GIMP_PATTERN_BUCKET_FILL,
|
||||
NULL,
|
||||
GIMP_PATTERN (viewable));
|
||||
@ -282,10 +290,12 @@ gimp_drawable_tree_view_new_pattern_dropped (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_drawable_tree_view_new_color_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_drawable_tree_view_new_dropped (GIMP_ITEM_TREE_VIEW (data),
|
||||
gimp_drawable_tree_view_new_dropped (GIMP_ITEM_TREE_VIEW (data), x, y,
|
||||
GIMP_FG_BUCKET_FILL,
|
||||
color,
|
||||
NULL);
|
||||
|
@ -89,6 +89,8 @@ static void gimp_fg_bg_editor_drag_color (GtkWidget *widget,
|
||||
GimpRGB *color,
|
||||
gpointer data);
|
||||
static void gimp_fg_bg_editor_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
|
||||
@ -628,6 +630,8 @@ gimp_fg_bg_editor_drag_color (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_fg_bg_editor_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -116,6 +116,8 @@ static void gimp_gradient_editor_set_data (GimpDataEditor *editor,
|
||||
static void gimp_gradient_editor_gradient_dirty (GimpGradientEditor *editor,
|
||||
GimpGradient *gradient);
|
||||
static void gradient_editor_drop_gradient (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gradient_editor_scrollbar_update (GtkAdjustment *adj,
|
||||
@ -602,6 +604,8 @@ gimp_gradient_editor_zoom (GimpGradientEditor *editor,
|
||||
|
||||
static void
|
||||
gradient_editor_drop_gradient (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -112,6 +112,8 @@ static void gimp_item_tree_view_drop_viewable (GimpContainerTreeView *view
|
||||
GtkTreeViewDropPosition drop_pos);
|
||||
|
||||
static void gimp_item_tree_view_new_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
|
||||
@ -792,6 +794,8 @@ gimp_item_tree_view_drop_viewable (GimpContainerTreeView *tree_view,
|
||||
|
||||
static void
|
||||
gimp_item_tree_view_new_dropped (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -91,6 +91,11 @@ static gint palette_editor_eventbox_button_press (GtkWidget *widget,
|
||||
static gint palette_editor_color_area_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpPaletteEditor *editor);
|
||||
static void palette_editor_color_area_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
static void palette_editor_draw_entries (GimpPaletteEditor *editor,
|
||||
gint row_start,
|
||||
gint column_highlight);
|
||||
@ -110,9 +115,13 @@ static void palette_editor_drag_color (GtkWidget *widget,
|
||||
GimpRGB *color,
|
||||
gpointer data);
|
||||
static void palette_editor_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
static void palette_editor_drop_palette (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void palette_editor_invalidate_preview (GimpPalette *palette,
|
||||
@ -244,6 +253,7 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
|
||||
palette_editor_drag_color,
|
||||
editor);
|
||||
gimp_dnd_color_dest_add (eventbox, palette_editor_drop_color, editor);
|
||||
gimp_dnd_color_dest_add (editor->color_area, palette_editor_color_area_drop_color, editor);
|
||||
gimp_dnd_viewable_dest_add (eventbox, GIMP_TYPE_PALETTE,
|
||||
palette_editor_drop_palette,
|
||||
editor);
|
||||
@ -655,6 +665,7 @@ palette_editor_color_area_button_press (GtkWidget *widget,
|
||||
return FALSE; /* continue with eventbox_button_press */
|
||||
}
|
||||
|
||||
|
||||
/* functions for drawing & updating the palette dialog color area **********/
|
||||
|
||||
static gint
|
||||
@ -1068,8 +1079,10 @@ palette_editor_drag_color (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
palette_editor_drop_color (GtkWidget *widget,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
|
||||
|
||||
@ -1082,8 +1095,54 @@ palette_editor_drop_color (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
palette_editor_color_area_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (data);
|
||||
gint entry_width;
|
||||
gint entry_height;
|
||||
gint row, col;
|
||||
gint pos;
|
||||
|
||||
/* calc drop pos */
|
||||
entry_width = editor->col_width + SPACING;
|
||||
entry_height = (ENTRY_HEIGHT * editor->zoom_factor) + SPACING;
|
||||
col = (x - 1) / entry_width;
|
||||
row = (y - 1) / entry_height;
|
||||
pos = row * editor->columns + col;
|
||||
|
||||
if (GIMP_DATA_EDITOR (editor)->data_editable)
|
||||
{
|
||||
GimpPalette *palette = GIMP_PALETTE (GIMP_DATA_EDITOR (editor)->data);
|
||||
|
||||
/* on an existing entry? */
|
||||
if (pos >= 0 && pos < palette->n_colors)
|
||||
{
|
||||
/* yep - insert it */
|
||||
editor->color = gimp_palette_insert_entry (palette,
|
||||
pos,
|
||||
NULL,
|
||||
color);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* nope - add it on the end */
|
||||
editor->color = gimp_palette_add_entry (palette,
|
||||
NULL,
|
||||
color);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
palette_editor_drop_palette (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -2914,6 +2914,8 @@ gimp_prop_unit_menu_notify (GObject *config,
|
||||
/*************/
|
||||
|
||||
static void gimp_prop_preview_drop (GtkWidget *menu,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_prop_preview_notify (GObject *config,
|
||||
@ -2978,6 +2980,8 @@ gimp_prop_preview_new (GObject *config,
|
||||
|
||||
static void
|
||||
gimp_prop_preview_drop (GtkWidget *preview,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -66,6 +66,8 @@ static gboolean gimp_selection_preview_button_press(GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpSelectionEditor *editor);
|
||||
static void gimp_selection_editor_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
|
||||
@ -317,6 +319,8 @@ gimp_selection_preview_button_press (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_selection_editor_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -49,15 +49,23 @@
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_toolbox_drop_uri_list (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GList *uri_list,
|
||||
gpointer data);
|
||||
static void gimp_toolbox_drop_drawable (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_toolbox_drop_tool (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_toolbox_drop_buffer (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
|
||||
@ -102,6 +110,8 @@ gimp_toolbox_dnd_init (GimpToolbox *toolbox)
|
||||
|
||||
static void
|
||||
gimp_toolbox_drop_uri_list (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GList *uri_list,
|
||||
gpointer data)
|
||||
{
|
||||
@ -133,6 +143,8 @@ gimp_toolbox_drop_uri_list (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_toolbox_drop_drawable (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -195,6 +207,8 @@ gimp_toolbox_drop_drawable (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_toolbox_drop_tool (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -205,6 +219,8 @@ gimp_toolbox_drop_tool (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_toolbox_drop_buffer (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -55,6 +55,8 @@ image_preview_clicked (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
image_preview_drop_image (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -59,6 +59,8 @@ brush_preview_clicked (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
brush_preview_drop_brush (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -79,6 +81,8 @@ pattern_preview_clicked (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
pattern_preview_drop_pattern (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
@ -99,6 +103,8 @@ gradient_preview_clicked (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gradient_preview_drop_gradient (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -69,6 +69,8 @@ static void gimp_tool_options_editor_restore_clicked (GtkWidget *w
|
||||
static void gimp_tool_options_editor_delete_clicked (GtkWidget *widget,
|
||||
GimpToolOptionsEditor *editor);
|
||||
static void gimp_tool_options_editor_drop_tool (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
|
||||
@ -380,6 +382,8 @@ gimp_tool_options_editor_delete_clicked (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gimp_tool_options_editor_drop_tool (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -146,6 +146,8 @@ static void gimp_color_select_update_pos (GimpColorSelect *select);
|
||||
|
||||
#if 0
|
||||
static void gimp_color_select_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data);
|
||||
#endif
|
||||
@ -632,6 +634,8 @@ gimp_color_select_update_pos (GimpColorSelect *select)
|
||||
#if 0
|
||||
static void
|
||||
gimp_color_select_drop_color (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
const GimpRGB *color,
|
||||
gpointer data)
|
||||
{
|
||||
|
@ -2914,6 +2914,8 @@ gimp_prop_unit_menu_notify (GObject *config,
|
||||
/*************/
|
||||
|
||||
static void gimp_prop_preview_drop (GtkWidget *menu,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_prop_preview_notify (GObject *config,
|
||||
@ -2978,6 +2980,8 @@ gimp_prop_preview_new (GObject *config,
|
||||
|
||||
static void
|
||||
gimp_prop_preview_drop (GtkWidget *preview,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
|
Reference in New Issue
Block a user