use eina_hash_direct_add

use eina_hash_direct_add where we use a struct member as key

SVN revision: 55193
This commit is contained in:
Sebastian Dransfeld 2010-12-03 14:53:01 +00:00
parent c06fe60c99
commit 9e3be1a1a4
3 changed files with 4 additions and 4 deletions

View File

@ -241,7 +241,7 @@ efreet_desktop_get(const char *file)
efreet_cache_desktop_update();
}
if (efreet_desktop_cache) eina_hash_add(efreet_desktop_cache, desktop->orig_path, desktop);
if (efreet_desktop_cache) eina_hash_direct_add(efreet_desktop_cache, desktop->orig_path, desktop);
desktop->cached = 1;
return desktop;
}

View File

@ -385,7 +385,7 @@ efreet_icon_find_theme_check(const char *theme_name)
theme = efreet_icon_theme_new();
if (!theme) return NULL;
theme->name.internal = eina_stringshare_add(theme_name);
eina_hash_add(efreet_icon_themes, (void *)theme->name.internal, theme);
eina_hash_direct_add(efreet_icon_themes, (void *)theme->name.internal, theme);
}
return theme;
@ -1405,7 +1405,7 @@ efreet_icon_theme_dir_scan(const char *search_dir, const char *theme_name)
theme = efreet_icon_theme_new();
if (!theme) goto error;
theme->name.internal = key;
eina_hash_add(efreet_icon_themes,
eina_hash_direct_add(efreet_icon_themes,
(void *)theme->name.internal, theme);
}
else

View File

@ -2828,7 +2828,7 @@ efreet_menu_process_app_pool(Eina_List *pool, Eina_List *applications,
if (efreet_menu_filter_matches(filter->op, md))
{
applications = eina_list_append(applications, md);
eina_hash_add(matches, (void *)md->id, md);
eina_hash_direct_add(matches, (void *)md->id, md);
md->allocated = 1;
}
}