From: englebass Date: Sat, 16 Jan 2010 13:43:28 +0000 (+0000) Subject: remove Ecore_Data X-Git-Tag: 2.0_alpha~51^2~527 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=190039f18df43053fa972a1fe480a70924f1528f;p=framework%2Fuifw%2Fefreet.git remove Ecore_Data git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@45218 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/efreet_menu.c b/src/lib/efreet_menu.c index 1110fa1..3d7df4f 100644 --- a/src/lib/efreet_menu.c +++ b/src/lib/efreet_menu.c @@ -12,7 +12,6 @@ #include #include -#include #include "Efreet.h" #include "efreet_private.h" @@ -381,7 +380,7 @@ static void efreet_menu_resolve_moves(Efreet_Menu_Internal *internal); static void efreet_menu_concatenate(Efreet_Menu_Internal *dest, Efreet_Menu_Internal *src); static int efreet_menu_cb_menu_compare(Efreet_Menu_Internal *a, Efreet_Menu_Internal *b); -static int efreet_menu_cb_md_compare(Efreet_Menu_Desktop *a, Efreet_Menu_Desktop *b); +static int efreet_menu_cb_md_compare(const Efreet_Menu_Desktop *a, const Efreet_Menu_Desktop *b); static int efreet_menu_save_menu(Efreet_Menu *menu, FILE *f, int indent); static int efreet_menu_save_indent(FILE *f, int indent); @@ -2753,32 +2752,19 @@ efreet_menu_process_filters(Efreet_Menu_Internal *internal, unsigned int only_un /* sort the menu applications. we do this in process filters so it will only * be done once per menu.*/ - if (internal->applications) + if (eina_list_count(internal->applications)) { - int count; + Efreet_Menu_Desktop *md; + Eina_List *l, *l2; - count = eina_list_count(internal->applications); - if (count) + EINA_LIST_FOREACH_SAFE(internal->applications, l, l2, md) { - Ecore_Sheap *sheap; - Efreet_Menu_Desktop *md; - - sheap = ecore_sheap_new( - ECORE_COMPARE_CB(efreet_menu_cb_md_compare), count); - while ((md = eina_list_data_get(internal->applications))) - { - internal->applications = eina_list_remove_list(internal->applications, - internal->applications); - ecore_sheap_insert(sheap, md); - } - while ((md = ecore_sheap_extract(sheap))) - { - if (md->desktop->no_display) continue; - internal->applications = eina_list_append(internal->applications, md); - } - - ecore_sheap_destroy(sheap); + if (md->desktop->no_display) + internal->applications = eina_list_remove_list(internal->applications, l); } + internal->applications = eina_list_sort(internal->applications, + eina_list_count(internal->applications), + EINA_COMPARE_CB(efreet_menu_cb_md_compare)); } } @@ -3594,7 +3580,7 @@ efreet_menu_directory_get(Efreet_Menu_Internal *internal, const char *path) * @brief Compares the desktop files. */ static int -efreet_menu_cb_md_compare(Efreet_Menu_Desktop *a, Efreet_Menu_Desktop *b) +efreet_menu_cb_md_compare(const Efreet_Menu_Desktop *a, const Efreet_Menu_Desktop *b) { #ifdef STRICT_SPEC return strcmp(ecore_file_file_get(a->desktop->orig_path), ecore_file_file_get(b->desktop->orig_path));