discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=3a149bc52c9072d121fe694a288684ae49db07fc

commit 3a149bc52c9072d121fe694a288684ae49db07fc
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Nov 6 17:26:08 2015 -0500

    break out ranged queue list deletion into util function
---
 src/bin/empc.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/bin/empc.c b/src/bin/empc.c
index c4daa48..9bcec4d 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -2163,9 +2163,8 @@ queue_list_item_realize(void *data EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED, vo
 }
 
 static void
-queue_list_delete_selected(void)
+queue_list_delete_list(const Eina_List *items)
 {
-   const Eina_List *items;
    Eina_List *l, *headers = NULL;
    int start = -1, num = 0, total = 0;
    Elm_Object_Item *it, *next, *hdr = NULL;
@@ -2173,10 +2172,8 @@ queue_list_delete_selected(void)
    Empd_Empdd_Song *so;
    unsigned int sub = 0;
 
-   items = elm_genlist_selected_items_get(queue_list);
    if (!items) return;
-   l = eina_list_clone(items);
-   l = eina_list_sort(l, 0, (Eina_Compare_Cb)queue_list_sort);
+   l = eina_list_sort(eina_list_clone(items), 0, 
(Eina_Compare_Cb)queue_list_sort);
    EINA_LIST_FREE(l, it)
      {
         if (hdr != elm_genlist_item_parent_get(it))
@@ -2225,6 +2222,12 @@ queue_list_delete_selected(void)
 }
 
 static void
+queue_list_delete_selected(void)
+{
+   queue_list_delete_list(elm_genlist_selected_items_get(queue_list));
+}
+
+static void
 queue_list_delete_inverted(void)
 {
    const Eina_List *items;

-- 


Reply via email to