mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
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.
This commit is contained in:
parent
3cc4d73954
commit
51f5b159c9
3 changed files with 71 additions and 32 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
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;
|
||||
|
||||
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;
|
||||
|
||||
default:
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
default:
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue