+efreet_dirs_reset()

SVN revision: 72104
This commit is contained in:
Mike Blumenkrantz 2012-06-14 07:28:23 +00:00
parent 1442bc1e74
commit f5d9c7bf2f
4 changed files with 28 additions and 0 deletions

View File

@ -123,3 +123,7 @@
2012-06-07 Mike Blumenkrantz
* Support XDG_DESKTOP_DIR
2012-06-14 Mike Blumenkrantz
* Added efreet_dirs_reset() to delete cached env variable information

View File

@ -11,6 +11,7 @@ Improvements:
Additions:
* Support XDG_DESKTOP_DIR
* efreet_dirs_reset() for refreshing env vars after locale switches
Efreet 1.2.0

View File

@ -187,6 +187,22 @@ efreet_hostname_get(void)
return hostname;
}
EAPI void
efreet_dirs_reset(void)
{
const char *s;
eina_stringshare_replace(&hostname, NULL);
eina_stringshare_replace(&xdg_desktop_dir, NULL);
eina_stringshare_replace(&xdg_cache_home, NULL);
eina_stringshare_replace(&xdg_config_home, NULL);
eina_stringshare_replace(&xdg_data_home, NULL);
eina_stringshare_replace(&efreet_home_dir, NULL);
EINA_LIST_FREE(xdg_data_dirs, s)
eina_stringshare_del(s);
EINA_LIST_FREE(xdg_config_dirs, s)
eina_stringshare_del(s);
}
/**
* @internal
* @param key The environemnt key to lookup

View File

@ -65,6 +65,13 @@ EAPI const char *efreet_cache_home_get(void);
*/
EAPI const char *efreet_hostname_get(void);
/**
* @brief Resets all the stored env variables. This must be called whenever the
* locale is changed.
* @since 1.3
*/
EAPI void efreet_dirs_reset(void);
/**
* Efreet_Event_Cache_Update
*/