# HG changeset patch # User zas_ # Date 1208958378 0 # Node ID 3bb9a8df6ee99470e8d4d8ec6060762158309c1b # Parent e994613f4bad94fdf914c2403ed1de2b4b98a526 Honor Control and Shift keys while drag'n'droping files to directories. Before a menu (Copy/Move/Cancel) was always displayed, now if the user hold Shift key or Control key, the menu is not shown, but move or copy actions take place. If no modifier key is used, the menu is displayed as usual. diff -r e994613f4bad -r 3bb9a8df6ee9 src/view_dir.c --- a/src/view_dir.c Wed Apr 23 13:03:04 2008 +0000 +++ b/src/view_dir.c Wed Apr 23 13:46:18 2008 +0000 @@ -721,6 +721,7 @@ { GList *list; gint active; + gint done = FALSE; list = uri_filelist_from_text((gchar *)selection_data->data, TRUE); if (!list) return; @@ -728,8 +729,26 @@ active = access_file(fd->path, W_OK | X_OK); vd_color_set(vd, fd, TRUE); - vd->popup = vd_drop_menu(vd, active); - gtk_menu_popup(GTK_MENU(vd->popup), NULL, NULL, NULL, NULL, 0, time); + + if (active) + { + if (context->actions == GDK_ACTION_COPY) + { + file_util_copy_simple(list, fd->path); + done = TRUE; + } + else if (context->actions == GDK_ACTION_MOVE) + { + file_util_move_simple(list, fd->path); + done = TRUE; + } + } + + if (done == FALSE) + { + vd->popup = vd_drop_menu(vd, active); + gtk_menu_popup(GTK_MENU(vd->popup), NULL, NULL, NULL, NULL, 0, time); + } vd->drop_fd = fd; vd->drop_list = list;