efreet: Add variable to prevent cache update

SVN revision: 47536
devs/devilhorns/wayland_egl
Sebastian Dransfeld 13 years ago
parent b5c3618813
commit d8bde974e6
  1. 2
      legacy/efreet/src/bin/efreet_desktop_cache_create.c
  2. 2
      legacy/efreet/src/lib/efreet.c
  3. 17
      legacy/efreet/src/lib/efreet_desktop.c
  4. 2
      legacy/efreet/src/lib/efreet_private.h

@ -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;

@ -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;

@ -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();
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);
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

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

Loading…
Cancel
Save