Added theme functionality to support the examine changes

Oh, and I was told to blow my trumpet ;)


SVN revision: 10010
This commit is contained in:
handyande 2004-05-02 21:02:49 +00:00 committed by handyande
parent c62c7f1fdf
commit 20950022d6
4 changed files with 24 additions and 0 deletions

View File

@ -9,3 +9,4 @@ Yuri <da2001@hotmail.ru>
Nicholas Curran <quasar@bigblue.net.au>
Howell Tam <pigeon@pigeond.net>
Nathan Ingersoll <rbdpngn@users.sourceforge.net>
Andrew Elcock <andy@elcock.org>

View File

@ -82,6 +82,7 @@ typedef struct Ecore_Config_Prop {
long val,lo,hi,step;
Ecore_Config_Flag flags;
Ecore_Config_Listener_List *listeners;
void *data;
struct Ecore_Config_Prop *next; /**< pointer to the next property in the list */
} Ecore_Config_Prop;
@ -133,6 +134,7 @@ int ecore_config_set_rgb(const char *key,char *val);
char *ecore_config_get_rgbstr(const char *key);
int ecore_config_set_float(const char *key,float val);
int ecore_config_set_theme(const char *key,char *val);
int ecore_config_set_theme_preview_group(const char *key, char *group);
int ecore_config_set_as_string(const char *key,char *val);
int ecore_config_default(const char *key,char *val,float lo,float hi,float step);

View File

@ -366,6 +366,25 @@ int ecore_config_set_rgb(const char *key, char* val) {
int ecore_config_set_theme(const char *key, char* val) {
return ecore_config_set_typed(__ecore_config_bundle_local,key,(void *)val,PT_THM); }
int ecore_config_set_theme_preview_group(const char *key, char *group) {
int ret;
Ecore_Config_Prop *e;
Ecore_Config_Bundle *t;
ret=ECORE_CONFIG_ERR_SUCC;
t=__ecore_config_bundle_local;
if(!(e=ecore_config_get(t,key))) { /* prop doesn't exist yet */
if((ret=ecore_config_add_typed(t,key,"",PT_THM))!=ECORE_CONFIG_ERR_SUCC) /* try to add it */
return ret; /* ...failed */
if(!(e=ecore_config_get(t,key))) /* get handle */
return ECORE_CONFIG_ERR_FAIL;
}
if (e->data) free(e->data);
printf("Set group of %s on key %s\n", group, key);
e->data=strdup(group);
return ret; }
static int ecore_config_default_typed(Ecore_Config_Bundle *t,const char *key,void *val,int type) {
int ret;
Ecore_Config_Prop *e;

View File

@ -83,6 +83,8 @@ char *_ecore_config_ipc_prop_list(Ecore_Config_Server *srv, const long serial) {
else
estring_appendf(s,", range %d..%d",e->lo,e->hi);
}
if(e->type==PT_THM)
estring_appendf(s,", group %s",e->data?e->data:"Main");
f=1;
e=e->next; }