Commit 3f5e10c1 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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).
parent 0acea735
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 Philip Lafleur <plafleur@cvs.gnome.org>
* plug-ins/common/unsharp.c: The preview's row buffer was
......
......@@ -764,7 +764,11 @@ gimp_dnd_data_source_add (GimpDndType data_type,
if (target_list)
{
gtk_target_list_add_table (target_list, &dnd_data->target_entry, 1);
GdkAtom atom = gdk_atom_intern (dnd_data->target_entry.target, TRUE);
gtk_target_list_add (target_list, atom,
dnd_data->target_entry.flags,
dnd_data->target_entry.info);
}
else
{
......@@ -805,9 +809,7 @@ gimp_dnd_data_source_remove (GimpDndType data_type,
if (target_list)
{
GdkAtom atom;
atom = gdk_atom_intern (dnd_data->target_entry.target, TRUE);
GdkAtom atom = gdk_atom_intern (dnd_data->target_entry.target, TRUE);
if (atom != GDK_NONE)
gtk_target_list_remove (target_list, atom);
......@@ -856,7 +858,11 @@ gimp_dnd_data_dest_add (GimpDndType data_type,
if (target_list)
{
gtk_target_list_add_table (target_list, &dnd_data->target_entry, 1);
GdkAtom atom = gdk_atom_intern (dnd_data->target_entry.target, TRUE);
gtk_target_list_add (target_list, atom,
dnd_data->target_entry.flags,
dnd_data->target_entry.info);
}
else
{
......@@ -883,9 +889,7 @@ gimp_dnd_data_dest_remove (GimpDndType data_type,
if (target_list)
{
GdkAtom atom;
atom = gdk_atom_intern (dnd_data->target_entry.target, TRUE);
GdkAtom atom = gdk_atom_intern (dnd_data->target_entry.target, TRUE);
if (atom != GDK_NONE)
gtk_target_list_remove (target_list, atom);
......
......@@ -184,7 +184,7 @@ gimp_selection_data_get_uris (GtkSelectionData *selection)
g_return_val_if_fail (selection != NULL, NULL);
if (selection->format != 8)
if ((selection->format != 8) || (selection->length < 1))
{
g_warning ("Received invalid file data!");
return NULL;
......@@ -397,7 +397,7 @@ gimp_selection_data_get_svg (GtkSelectionData *selection,
g_return_val_if_fail (selection != NULL, NULL);
g_return_val_if_fail (length != NULL, NULL);
if (selection->format != 8)
if ((selection->format != 8) || (selection->length < 1))
{
g_warning ("Received invalid SVG data!");
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment