Mercurial > geeqie.yaz
comparison src/view_dir.c @ 494:3bb9a8df6ee9
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.
author | zas_ |
---|---|
date | Wed, 23 Apr 2008 13:46:18 +0000 |
parents | 48c8e49b571c |
children | e21da52016c8 |
comparison
equal
deleted
inserted
replaced
493:e994613f4bad | 494:3bb9a8df6ee9 |
---|---|
719 | 719 |
720 if (info == TARGET_URI_LIST) | 720 if (info == TARGET_URI_LIST) |
721 { | 721 { |
722 GList *list; | 722 GList *list; |
723 gint active; | 723 gint active; |
724 gint done = FALSE; | |
724 | 725 |
725 list = uri_filelist_from_text((gchar *)selection_data->data, TRUE); | 726 list = uri_filelist_from_text((gchar *)selection_data->data, TRUE); |
726 if (!list) return; | 727 if (!list) return; |
727 | 728 |
728 active = access_file(fd->path, W_OK | X_OK); | 729 active = access_file(fd->path, W_OK | X_OK); |
729 | 730 |
730 vd_color_set(vd, fd, TRUE); | 731 vd_color_set(vd, fd, TRUE); |
731 vd->popup = vd_drop_menu(vd, active); | 732 |
732 gtk_menu_popup(GTK_MENU(vd->popup), NULL, NULL, NULL, NULL, 0, time); | 733 if (active) |
734 { | |
735 if (context->actions == GDK_ACTION_COPY) | |
736 { | |
737 file_util_copy_simple(list, fd->path); | |
738 done = TRUE; | |
739 } | |
740 else if (context->actions == GDK_ACTION_MOVE) | |
741 { | |
742 file_util_move_simple(list, fd->path); | |
743 done = TRUE; | |
744 } | |
745 } | |
746 | |
747 if (done == FALSE) | |
748 { | |
749 vd->popup = vd_drop_menu(vd, active); | |
750 gtk_menu_popup(GTK_MENU(vd->popup), NULL, NULL, NULL, NULL, 0, time); | |
751 } | |
733 | 752 |
734 vd->drop_fd = fd; | 753 vd->drop_fd = fd; |
735 vd->drop_list = list; | 754 vd->drop_list = list; |
736 } | 755 } |
737 } | 756 } |