efreet: Add variable to prevent cache update

SVN revision: 47536
This commit is contained in:
Sebastian Dransfeld 2010-03-28 18:54:25 +00:00
parent b5c3618813
commit d8bde974e6
4 changed files with 16 additions and 7 deletions

View File

@ -193,6 +193,8 @@ main()
if (!eina_init()) goto eina_error;
if (!eet_init()) goto eet_error;
efreet_cache_update = 0;
/* create homedir */
snprintf(file, sizeof(file), "%s/.efreet", efreet_home_dir_get());
if (!ecore_file_mkpath(file)) goto efreet_error;

View File

@ -12,6 +12,8 @@
#include "efreet_private.h"
#include "efreet_xml.h"
EAPI int efreet_cache_update = 1;
static int _efreet_init_count = 0;
static int efreet_parsed_locale = 0;
static const char *efreet_lang = NULL;

View File

@ -177,8 +177,6 @@ static void efreet_desktop_cache_update_free(void *data, void *ev);
int
efreet_desktop_init(void)
{
char buf[PATH_MAX];
_efreet_desktop_log_dom = eina_log_domain_register("Efreet_desktop", EFREET_DEFAULT_LOG_COLOR);
if (_efreet_desktop_log_dom < 0)
{
@ -206,11 +204,16 @@ efreet_desktop_init(void)
EFREET_EVENT_CACHE_UPDATE = ecore_event_type_new();
if (efreet_cache_update)
{
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/.efreet", efreet_home_dir_get());
if (!ecore_file_mkpath(buf)) goto edd_error;
cache_monitor = ecore_file_monitor_add(buf,
efreet_desktop_cache_update,
NULL);
}
/* TODO:
* Should add a lock here, so that several programs starting at the same

View File

@ -212,6 +212,8 @@ EAPI const char *efreet_desktop_cache_dirs(void);
#define NON_EXISTING (void *)-1
EAPI extern int efreet_cache_update;
/**
* @}
*/