mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
131da633d5
commit
da1a2de846
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
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-05 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* tools/pdbgen/lib.pl: Slight cleanup of doc generating code.
|
||||
|
|
|
@ -607,6 +607,9 @@ gimp_dnd_data_drag_begin (GtkWidget *widget,
|
|||
|
||||
gtk_drag_set_icon_widget (context, window,
|
||||
DRAG_ICON_OFFSET, DRAG_ICON_OFFSET);
|
||||
|
||||
/* remember for which drag context the widget was made */
|
||||
g_object_set_data (G_OBJECT (window), "gimp-gdk-drag-context", context);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -614,7 +617,22 @@ static void
|
|||
gimp_dnd_data_drag_end (GtkWidget *widget,
|
||||
GdkDragContext *context)
|
||||
{
|
||||
g_object_set_data (G_OBJECT (widget), "gimp-dnd-data-widget", NULL);
|
||||
GtkWidget *icon_widget;
|
||||
|
||||
icon_widget = g_object_get_data (G_OBJECT (widget), "gimp-dnd-data-widget");
|
||||
|
||||
if (icon_widget)
|
||||
{
|
||||
/* destroy the icon_widget only if it was made for this drag
|
||||
* context. See bug #139337.
|
||||
*/
|
||||
if (g_object_get_data (G_OBJECT (icon_widget),
|
||||
"gimp-gdk-drag-context") ==
|
||||
(gpointer) context)
|
||||
{
|
||||
g_object_set_data (G_OBJECT (widget), "gimp-dnd-data-widget", NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue