Esempio n. 1
0
char               *
_ecore_config_ipc_prop_desc(Ecore_Config_Server * srv, const long serial,
			    const char *key)
{
#ifdef HAVE_EVAS2
   Ecore_Config_Prop  *e;

   e = ecore_config_get(key);
   if (e)
     {
	estring            *s = estring_new(512);

	estring_appendf(s, "%s: %s", e->key, ecore_config_type_get(e));
	if (e->flags & ECORE_CONFIG_FLAG_BOUNDS)
	   estring_appendf(s, ", range %d..%d", e->lo, e->hi);
	return estring_disown(s);
     }
#endif
   return strdup("<undefined>");
}
Esempio n. 2
0
char               *
_ecore_config_ipc_prop_list(Ecore_Config_Server * srv, const long serial)
{
   Ecore_Config_Bundle *theme;
   Ecore_Config_Prop  *e;
   estring            *s;
   int                 f;

   theme = ecore_config_bundle_by_serial_get(srv, serial);
   e = theme ? theme->data : NULL;
   s = estring_new(8192);
   f = 0;
   while (e)
     {
	/* ignore system properties in listings, unless they have been overridden */
	if (e->flags & ECORE_CONFIG_FLAG_SYSTEM && !(e->flags & ECORE_CONFIG_FLAG_MODIFIED))
	  {
	     e = e->next;
	     continue;
	  }
	estring_appendf(s, "%s%s: %s", f ? "\n" : "", e->key,
			ecore_config_type_get(e));
	if (e->flags & ECORE_CONFIG_FLAG_BOUNDS)
	  {
	     if (e->type == ECORE_CONFIG_FLT)
		estring_appendf(s, ", range %le..%le",
				(float)e->lo / ECORE_CONFIG_FLOAT_PRECISION,
				(float)e->hi / ECORE_CONFIG_FLOAT_PRECISION);
	     else
		estring_appendf(s, ", range %d..%d", e->lo, e->hi);
	  }
	if (e->type == ECORE_CONFIG_THM)
	   estring_appendf(s, ", group %s", e->data ? e->data : "Main");
	f = 1;
	e = e->next;
     }

   return estring_disown(s);
}
Esempio n. 3
0
char               *
_ecore_config_ipc_bundle_list(Ecore_Config_Server * srv)
{
   Ecore_Config_Bundle *ns;
   estring            *s;
   int                 f;

   ns = ecore_config_bundle_1st_get(srv);
   s = estring_new(8192);
   f = 0;
   if (!ns)
      return strdup("<no_bundles_created>");

   while (ns)
     {
	estring_appendf(s, "%s%d: %s", f ? "\n" : "",
			ecore_config_bundle_serial_get(ns),
			ecore_config_bundle_label_get(ns));
	f = 1;
	ns = ecore_config_bundle_next_get(ns);
     }

   return estring_disown(s);
}
Esempio n. 4
0
}

static char               *
_ecore_config_ipc_global_prop_list(Ecore_Config_Server * srv __UNUSED__, long serial __UNUSED__)
{
   Ecore_Config_DB_File  *db;
   char                 **keys;
   int                    key_count, x;
   estring               *s;
   int                    f;
   char                   buf[PATH_MAX], *p; 	
   // char		*data;   		UNUSED
   Ecore_Config_Type      type;

   db = NULL;
   s = estring_new(8192);
   f = 0;
   if ((p = getenv("HOME")))
     {
	snprintf(buf, sizeof(buf), "%s/.e/config.eet", p);
	if (!(db = _ecore_config_db_open_read(buf)))
	  {
	     strcpy(buf, PACKAGE_DATA_DIR"/system.eet");
	     if (!(db = _ecore_config_db_open_read(buf)))
	       return NULL;
	  }
     }
   if (!db) return NULL;
   key_count = 0;
   keys = _ecore_config_db_keys_get(db, &key_count);
   if (keys)