#include <Elementary.h>
#include "elm_priv.h"
+#ifdef ELM_EFREET
+#define NON_EXISTING (void *)-1
+static Efreet_Icon_Theme *icon_theme = NULL;
+#endif
+
/**
* @defgroup Icon Icon
*
const char *path;
elm_need_efreet();
- if (!icon_theme) return EINA_FALSE;
+ if (icon_theme == NON_EXISTING) return EINA_FALSE;
+ if (!icon_theme)
+ {
+ icon_theme = efreet_icon_theme_find(getenv("E_ICON_THEME"));
+ if (!icon_theme)
+ {
+ const char **itr;
+ static const char *themes[] = {
+ "gnome", "Human", "oxygen", "hicolor", NULL
+ };
+ for (itr = themes; *itr; itr++)
+ {
+ icon_theme = efreet_icon_theme_find(*itr);
+ if (icon_theme) break;
+ }
+ }
+ }
+ if (!icon_theme)
+ {
+ icon_theme = NON_EXISTING;
+ return EINA_FALSE;
+ }
path = efreet_icon_path_find(icon_theme->name.internal, name, size);
wd->freedesktop.use = !!path;
if (wd->freedesktop.use)
#ifdef ELM_EFREET
static int _elm_need_efreet = 0;
-Efreet_Icon_Theme *icon_theme = NULL;
#endif
EAPI Eina_Bool
elm_need_efreet(void)
efreet_init();
efreet_mime_init();
efreet_trash_init();
- icon_theme = efreet_icon_theme_find(getenv("E_ICON_THEME"));
- if (!icon_theme)
- {
- const char **itr;
- static const char *themes[] = {
- "gnome", "Human", "oxygen", "hicolor", NULL
- };
- for (itr = themes; *itr; itr++)
- {
- icon_theme = efreet_icon_theme_find(*itr);
- if (icon_theme) break;
- }
- }
/*
{
Eina_List **list;
#ifdef ELM_EFREET
if (--_elm_need_efreet) return;
- icon_theme = NULL;
_elm_need_efreet = 0;
efreet_trash_shutdown();
efreet_mime_shutdown();