Commit 19a003d9 authored by Gene Z. Ragan's avatar Gene Z. Ragan Committed by Gene Ragan

Handle a case where Netscape submits duplicate drag data before the first

2001-03-14  Gene Z. Ragan  <gzr@eazel.com>

	* libnautilus-extensions/nautilus-icon-dnd.c:
	(drag_data_received_callback):
	Handle a case where Netscape submits duplicate drag data
	before the first instance of the data has been freed.
parent 959703aa
2001-03-14 Gene Z. Ragan <gzr@eazel.com>
* libnautilus-extensions/nautilus-icon-dnd.c:
(drag_data_received_callback):
Handle a case where Netscape submits duplicate drag data
before the first instance of the data has been freed.
2001-03-14 Gene Z. Ragan <gzr@eazel.com>
* libnautilus-extensions/nautilus-icon-container.c:
......
......@@ -402,19 +402,18 @@ drag_data_received_callback (GtkWidget *widget,
case NAUTILUS_ICON_DND_BGIMAGE:
case NAUTILUS_ICON_DND_KEYWORD:
case NAUTILUS_ICON_DND_URI_LIST:
case NAUTILUS_ICON_DND_URL:
/* Save the data so we can do the actual work on drop. */
g_assert (drag_info->selection_data == NULL);
drag_info->selection_data = nautilus_gtk_selection_data_copy_deep (data);
break;
/* Netscape keeps sending us the data, even though we accept the first drag */
//case NAUTILUS_ICON_DND_URL:
// if (drag_info->selection_data != NULL) {
// nautilus_gtk_selection_data_free_deep (drag_info->selection_data);
// drag_info->selection_data = nautilus_gtk_selection_data_copy_deep (data);
// }
// break;
case NAUTILUS_ICON_DND_URL:
if (drag_info->selection_data != NULL) {
nautilus_gtk_selection_data_free_deep (drag_info->selection_data);
drag_info->selection_data = nautilus_gtk_selection_data_copy_deep (data);
}
break;
default:
g_message ("drag_data_received_callback unknown");
......@@ -457,7 +456,7 @@ drag_data_received_callback (GtkWidget *widget,
receive_dropped_uri_list
(NAUTILUS_ICON_CONTAINER (widget),
(char*) data->data, x, y);
gtk_drag_finish (context, FALSE, FALSE, time);
gtk_drag_finish (context, TRUE, FALSE, time);
break;
default:
......
......@@ -402,19 +402,18 @@ drag_data_received_callback (GtkWidget *widget,
case NAUTILUS_ICON_DND_BGIMAGE:
case NAUTILUS_ICON_DND_KEYWORD:
case NAUTILUS_ICON_DND_URI_LIST:
case NAUTILUS_ICON_DND_URL:
/* Save the data so we can do the actual work on drop. */
g_assert (drag_info->selection_data == NULL);
drag_info->selection_data = nautilus_gtk_selection_data_copy_deep (data);
break;
/* Netscape keeps sending us the data, even though we accept the first drag */
//case NAUTILUS_ICON_DND_URL:
// if (drag_info->selection_data != NULL) {
// nautilus_gtk_selection_data_free_deep (drag_info->selection_data);
// drag_info->selection_data = nautilus_gtk_selection_data_copy_deep (data);
// }
// break;
case NAUTILUS_ICON_DND_URL:
if (drag_info->selection_data != NULL) {
nautilus_gtk_selection_data_free_deep (drag_info->selection_data);
drag_info->selection_data = nautilus_gtk_selection_data_copy_deep (data);
}
break;
default:
g_message ("drag_data_received_callback unknown");
......@@ -457,7 +456,7 @@ drag_data_received_callback (GtkWidget *widget,
receive_dropped_uri_list
(NAUTILUS_ICON_CONTAINER (widget),
(char*) data->data, x, y);
gtk_drag_finish (context, FALSE, FALSE, time);
gtk_drag_finish (context, TRUE, FALSE, time);
break;
default:
......
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