From 3a79d6a21e6df4a25f4b9129a044cc025c34b997 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Thu, 19 Mar 2009 01:45:58 +0000 Subject: [PATCH] fix drag&drop of multiple files and reduce variables scopes. SVN revision: 39568 --- src/bin/e_fm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index b9ee9b51c..5f3e6c513 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -6150,9 +6150,7 @@ _e_fm2_cb_dnd_drop(void *data, const char *type, void *event) static void _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier *modifiers) { - Eina_List *l; - E_Fm2_Icon *ic2; - int multi_sel = 0, range_sel = 0, seen = 0, sel_change = 0; + int multi_sel = 0, range_sel = 0, sel_change = 0; if (ic->sd->config->selection.windows_modifiers) { @@ -6175,6 +6173,9 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier *modifiers) } if (range_sel) { + const Eina_List *l; + E_Fm2_Icon *ic2; + Eina_Bool seen = 0; /* find last selected - if any, and select all icons between */ EINA_LIST_FOREACH(ic->sd->icons, l, ic2) { @@ -6206,8 +6207,10 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier *modifiers) } } } - else if (!multi_sel) + else if ((!multi_sel) && ((up) || ((!up) && (!ic->selected)))) { + const Eina_List *l; + E_Fm2_Icon *ic2; /* desel others */ EINA_LIST_FOREACH(ic->sd->icons, l, ic2) { @@ -6225,6 +6228,8 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier *modifiers) { if (!up) { + const Eina_List *l; + E_Fm2_Icon *ic2; EINA_LIST_FOREACH(ic->sd->icons, l, ic2) { ic2->last_selected = 0;