forked from enlightenment/enlightenment
Use new eina_list_search_sorted_near_list.
Match new api. By: Tiago Rezende Campos Falcão SVN revision: 41626
This commit is contained in:
parent
365d84efd2
commit
23d3ff38d9
|
@ -493,17 +493,15 @@ _e_theme_mappings_quickfind_free_cb(const Eina_Hash *hash, const void *key, void
|
|||
static void
|
||||
_e_theme_category_register(const char *category)
|
||||
{
|
||||
const char *c;
|
||||
Eina_List *l;
|
||||
int ret;
|
||||
|
||||
if (!categories)
|
||||
categories = eina_list_append(categories, eina_stringshare_add(category));
|
||||
|
||||
l = eina_list_search_sorted_near_list(categories, EINA_COMPARE_CB(strcmp), category);
|
||||
c = eina_list_data_get(l);
|
||||
l = eina_list_search_sorted_near_list(categories, EINA_COMPARE_CB(strcmp),
|
||||
category, &ret);
|
||||
|
||||
ret = strcmp(c, category);
|
||||
if (!ret) return;
|
||||
|
||||
if (ret < 0)
|
||||
|
|
|
@ -541,22 +541,16 @@ _get_theme_categories_list(void)
|
|||
EINA_LIST_FOREACH(e_theme_category_list(), g, c)
|
||||
{
|
||||
const char *result;
|
||||
int res;
|
||||
|
||||
if (!c) continue;
|
||||
|
||||
cats2 = eina_list_search_sorted_near_list(cats, _cb_sort, c);
|
||||
result = eina_list_data_get(cats2);
|
||||
if (result)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = strcmp(c, result);
|
||||
if (!res) continue;
|
||||
if (res < 0)
|
||||
cats = eina_list_prepend_relative_list(cats, eina_stringshare_ref(c), cats2);
|
||||
else
|
||||
cats = eina_list_append_relative_list(cats, eina_stringshare_ref(c), cats2);
|
||||
}
|
||||
cats2 = eina_list_search_sorted_near_list(cats, _cb_sort, c, &res);
|
||||
if (!res) continue;
|
||||
if (res < 0)
|
||||
cats = eina_list_prepend_relative_list(cats, eina_stringshare_ref(c), cats2);
|
||||
else
|
||||
cats = eina_list_append_relative_list(cats, eina_stringshare_ref(c), cats2);
|
||||
}
|
||||
|
||||
EINA_LIST_FREE(cats, category)
|
||||
|
|
Loading…
Reference in New Issue