move NON_EXISTING define to efreet_cache

SVN revision: 56917
This commit is contained in:
Sebastian Dransfeld 2011-02-10 14:34:03 +00:00
parent ec310fc5db
commit 8094cbf79b
3 changed files with 5 additions and 8 deletions

View File

@ -24,6 +24,8 @@ static int _efreet_cache_log_dom = -1;
#include "efreet_private.h"
#include "efreet_cache_private.h"
#define NON_EXISTING (void *)-1
typedef struct _Efreet_Old_Cache Efreet_Old_Cache;
struct _Efreet_Old_Cache

View File

@ -307,7 +307,7 @@ efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int siz
/* we didn't find the icon in the theme or in the inherited directories
* then just look for a non theme icon
*/
if (!value || (value == NON_EXISTING))
if (!value)
{
Efreet_Cache_Fallback_Icon *cache;
@ -316,8 +316,6 @@ efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int siz
if (!value) INF("lookup for `%s` failed in fallback too with %p.", icon, cache);
}
if (value == NON_EXISTING) value = NULL;
#ifdef SLOPPY_SPEC
FREE(tmp);
#endif
@ -390,14 +388,14 @@ efreet_icon_list_find(const char *theme_name, Eina_List *icons,
/* we didn't find the icons in the theme or in the inherited directories
* then just look for a non theme icon
*/
if (!value || (value == NON_EXISTING))
if (!value)
{
Efreet_Cache_Fallback_Icon *cache;
EINA_LIST_FOREACH(tmps, l, icon)
{
cache = efreet_cache_icon_fallback_find(icon);
value = efreet_icon_fallback_lookup_path(cache);
if (value && (value != NON_EXISTING))
if (value)
break;
}
}
@ -407,7 +405,6 @@ efreet_icon_list_find(const char *theme_name, Eina_List *icons,
free(data);
#endif
if (value == NON_EXISTING) value = NULL;
return value;
}

View File

@ -209,8 +209,6 @@ EAPI void efreet_hash_free(Eina_Hash *hash, Eina_Free_Cb free_cb);
EAPI void efreet_setowner(const char *path);
EAPI void efreet_fsetowner(int fd);
#define NON_EXISTING (void *)-1
EAPI extern int efreet_cache_update;
/**