Sun Oct 24 13:05:15 PDT 1999
(KainX) Added Epplet_query_config_data_with_def(). See the header file for syntax. For some reason, the compiler didn't like it when I spelled out "default." SVN revision: 964
This commit is contained in:
parent
0ce900fd91
commit
d01fc8f7dc
|
@ -78,3 +78,11 @@ work here, but I'll need lots of testing.
|
||||||
|
|
||||||
PLEASE remove all .lock files from ~/.enlightenment/epplet_config/*/ and close
|
PLEASE remove all .lock files from ~/.enlightenment/epplet_config/*/ and close
|
||||||
all running epplets before running any new ones!
|
all running epplets before running any new ones!
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Sun Oct 24 13:05:15 PDT 1999
|
||||||
|
(KainX)
|
||||||
|
|
||||||
|
Added Epplet_query_config_data_with_def(). See the header file for syntax.
|
||||||
|
For some reason, the compiler didn't like it when I spelled out "default."
|
||||||
|
|
19
api/epplet.c
19
api/epplet.c
|
@ -3942,6 +3942,25 @@ Epplet_query_config_data(char *key)
|
||||||
return ((char *) NULL);
|
return ((char *) NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
Epplet_query_config_data_with_def(char *key, char *def)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
ConfigItem *ci;
|
||||||
|
|
||||||
|
if (config_dict)
|
||||||
|
{
|
||||||
|
for (i = 0; i < config_dict->num_entries; i++)
|
||||||
|
{
|
||||||
|
ci = &(config_dict->entries[i]);
|
||||||
|
if ((ci->key) && !strcmp(key, ci->key))
|
||||||
|
/* we've found the key */
|
||||||
|
return (ci->value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (def);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Epplet_modify_config_data(char *key, char *value)
|
Epplet_modify_config_data(char *key, char *value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -364,6 +364,10 @@ int Epplet_get_instance(void);
|
||||||
/* Here you can query a config setting. */
|
/* Here you can query a config setting. */
|
||||||
char *Epplet_query_config_data(char *key);
|
char *Epplet_query_config_data(char *key);
|
||||||
|
|
||||||
|
/* Same as above, but returns the value of default instead of NULL if no */
|
||||||
|
/* match is found. */
|
||||||
|
char *Epplet_query_config_data_with_def(char *key, char *def);
|
||||||
|
|
||||||
/* Use this to change or add a config setting. */
|
/* Use this to change or add a config setting. */
|
||||||
void Epplet_modify_config_data(char *key, char *value);
|
void Epplet_modify_config_data(char *key, char *value);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue