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:
Michael Jennings 1999-10-24 13:10:22 +00:00
parent 0ce900fd91
commit d01fc8f7dc
3 changed files with 31 additions and 0 deletions

View File

@ -78,3 +78,11 @@ work here, but I'll need lots of testing.
PLEASE remove all .lock files from ~/.enlightenment/epplet_config/*/ and close
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."

View File

@ -3942,6 +3942,25 @@ Epplet_query_config_data(char *key)
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
Epplet_modify_config_data(char *key, char *value)
{

View File

@ -364,6 +364,10 @@ int Epplet_get_instance(void);
/* Here you can query a config setting. */
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. */
void Epplet_modify_config_data(char *key, char *value);