From c300cb95064572d1eb96802b466eccd40abcf860 Mon Sep 17 00:00:00 2001 From: sleuth Date: Sat, 8 Dec 2001 04:11:48 +0000 Subject: [PATCH] Don't de-select icons unless they are removed from the view. (Also fixes case if you remove a file behind E's back.) Free items on icon deletion. Kevin Brosius SVN revision: 5754 --- src/icons.c | 18 ++++++++++++++++++ src/view.c | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/icons.c b/src/icons.c index bc261a391..7bacd80a7 100644 --- a/src/icons.c +++ b/src/icons.c @@ -399,6 +399,18 @@ e_icon_cleanup(E_Icon *ic) D_ENTER; /* FIXME: free stuff here! this leaks ... */ + /* (think I got them all) */ + + if (ic->obj.event1) + { + evas_del_object(ic->view->evas, ic->obj.event1); + evas_del_object(ic->view->evas, ic->obj.event2); + } + + if (ic->obj.sel.under.icon) ebits_free(ic->obj.sel.under.icon); + if (ic->obj.sel.under.text) ebits_free(ic->obj.sel.under.text); + if (ic->obj.sel.over.icon) ebits_free(ic->obj.sel.over.icon); + if (ic->obj.sel.over.text) ebits_free(ic->obj.sel.over.text); e_object_cleanup(E_OBJECT(ic)); @@ -490,6 +502,12 @@ e_icon_hide(E_Icon *ic) evas_hide(ic->view->evas, ic->obj.event1); evas_hide(ic->view->evas, ic->obj.event2); + /* Hide any selection in the view */ + if(ic->obj.sel.under.icon) ebits_hide(ic->obj.sel.under.icon); + if(ic->obj.sel.under.text) ebits_hide(ic->obj.sel.under.text); + if(ic->obj.sel.over.icon) ebits_hide(ic->obj.sel.over.icon); + if(ic->obj.sel.over.text) ebits_hide(ic->obj.sel.over.text); + D_RETURN; } diff --git a/src/view.c b/src/view.c index b1d7fb627..fb0ad5f57 100644 --- a/src/view.c +++ b/src/view.c @@ -2796,6 +2796,7 @@ e_dnd_drop_request(Ecore_Event * ev) static void e_dnd_drop_request_free(void) { + D_ENTER; if (dnd_files) { @@ -2808,6 +2809,7 @@ e_dnd_drop_request_free(void) dnd_num_files = 0; } + D_RETURN; } @@ -2820,8 +2822,7 @@ e_dnd_handle_drop( E_View *v, E_dnd_enum dnd_pending_mode ) char *filename; D_ENTER; - - e_view_deselect_all(); + /* Need hostname for URL (file://hostname/...) */ if(gethostname( hostname, PATH_MAX)) {