[evolution/gnome-3-20] Bug 768013 - [Wayland] Drag and drop copies emails instead of moving them



commit e5c212500d7d28c0dd731ff7034eeddbfc334dd6
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jun 30 12:33:03 2016 +0200

    Bug 768013 - [Wayland] Drag and drop copies emails instead of moving them

 mail/em-folder-tree.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 2c8592a..ce5ab9f 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2651,17 +2651,17 @@ folder_tree_drop_target (EMFolderTree *folder_tree,
                        targets = targets->next;
                }
        } else {
-               gint i;
-
-               while (targets != NULL) {
-                       for (i = 0; i < NUM_DROP_TYPES; i++) {
-                               if (targets->data == (gpointer) drop_atoms[i]) {
-                                       atom = drop_atoms[i];
+               GList *link;
+               gint ii;
+
+               /* The drop_atoms[] is sorted in the preference order. */
+               for (ii = 0; ii < NUM_DROP_TYPES; ii++) {
+                       for (link = targets; link; link = g_list_next (link)) {
+                               if (link->data == (gpointer) drop_atoms[ii]) {
+                                       atom = drop_atoms[ii];
                                        goto done;
                                }
                        }
-
-                       targets = targets->next;
                }
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]