Commit 51f5b159 authored by Pavel Cisler's avatar Pavel Cisler Committed by Pavel Cisler
Browse files

Fix a problem that I introduced with my recent change to drag&drop -

2000-07-06  Pavel Cisler  <pavel@eazel.com>

	* libnautilus-extensions/nautilus-icon-dnd.c:
	(nautilus_icon_container_get_drop_action):
	Fix a problem that I introduced with my recent change to
	drag&drop - colors, background images, etc would no longet
	get accepted in the icon view.
	Made nautilus_icon_container_get_drop_action only check
	the selection list and the drop target if the dragged data
	is a file operation drag&drop.
parent 3cc4d739
2000-07-06 Pavel Cisler <pavel@eazel.com>
* libnautilus-extensions/nautilus-icon-dnd.c:
(nautilus_icon_container_get_drop_action):
Fix a problem that I introduced with my recent change to
drag&drop - colors, background images, etc would no longet
get accepted in the icon view.
Made nautilus_icon_container_get_drop_action only check
the selection list and the drop target if the dragged data
is a file operation drag&drop.
2000-07-06 Andy Hertzfeld <andy@eazel.com>
* src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_remove_view):
......
......@@ -739,24 +739,38 @@ nautilus_icon_container_get_drop_action (NautilusIconContainer *container,
char *drop_target;
gboolean icon_hit;
if (container->details->dnd_info->drag_info.selection_list == NULL) {
*default_action = 0;
*non_default_action = 0;
return;
}
g_assert (container->details->dnd_info->drag_info.got_drop_data_type);
switch (container->details->dnd_info->drag_info.data_type) {
case NAUTILUS_ICON_DND_GNOME_ICON_LIST:
if (container->details->dnd_info->drag_info.selection_list == NULL) {
*default_action = 0;
*non_default_action = 0;
return;
}
drop_target = nautilus_icon_container_find_drop_target (container,
context, x, y, &icon_hit);
if (!drop_target) {
*default_action = 0;
*non_default_action = 0;
return;
}
nautilus_drag_default_drop_action (drop_target,
container->details->dnd_info->drag_info.selection_list,
default_action, non_default_action);
g_free (drop_target);
break;
drop_target = nautilus_icon_container_find_drop_target (container,
context, x, y, &icon_hit);
case NAUTILUS_ICON_DND_COLOR:
case NAUTILUS_ICON_DND_BGIMAGE:
case NAUTILUS_ICON_DND_KEYWORD:
*default_action = GDK_ACTION_MOVE;
*default_action = GDK_ACTION_MOVE;
break;
if (!drop_target) {
*default_action = 0;
*non_default_action = 0;
return;
default:
}
nautilus_drag_default_drop_action (drop_target,
container->details->dnd_info->drag_info.selection_list, default_action, non_default_action);
g_free (drop_target);
}
static void
......
......@@ -739,24 +739,38 @@ nautilus_icon_container_get_drop_action (NautilusIconContainer *container,
char *drop_target;
gboolean icon_hit;
if (container->details->dnd_info->drag_info.selection_list == NULL) {
*default_action = 0;
*non_default_action = 0;
return;
}
g_assert (container->details->dnd_info->drag_info.got_drop_data_type);
switch (container->details->dnd_info->drag_info.data_type) {
case NAUTILUS_ICON_DND_GNOME_ICON_LIST:
if (container->details->dnd_info->drag_info.selection_list == NULL) {
*default_action = 0;
*non_default_action = 0;
return;
}
drop_target = nautilus_icon_container_find_drop_target (container,
context, x, y, &icon_hit);
if (!drop_target) {
*default_action = 0;
*non_default_action = 0;
return;
}
nautilus_drag_default_drop_action (drop_target,
container->details->dnd_info->drag_info.selection_list,
default_action, non_default_action);
g_free (drop_target);
break;
drop_target = nautilus_icon_container_find_drop_target (container,
context, x, y, &icon_hit);
case NAUTILUS_ICON_DND_COLOR:
case NAUTILUS_ICON_DND_BGIMAGE:
case NAUTILUS_ICON_DND_KEYWORD:
*default_action = GDK_ACTION_MOVE;
*default_action = GDK_ACTION_MOVE;
break;
if (!drop_target) {
*default_action = 0;
*non_default_action = 0;
return;
default:
}
nautilus_drag_default_drop_action (drop_target,
container->details->dnd_info->drag_info.selection_list, default_action, non_default_action);
g_free (drop_target);
}
static void
......
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