Never save system properties in apps config files unless they have been overridden (modified locally)

SVN revision: 8789
This commit is contained in:
handyande 2004-02-03 22:53:13 +00:00 committed by handyande
parent 129dae7f9e
commit ba0281b1f0
2 changed files with 11 additions and 1 deletions

View File

@ -61,7 +61,8 @@ typedef enum Ecore_Config_Type {
typedef enum Ecore_Config_Flag {
PF_NONE=0,
PF_BOUNDS=1,
PF_MODIFIED=2
PF_MODIFIED=2,
PF_SYSTEM=4
} Ecore_Config_Flag;

View File

@ -591,6 +591,7 @@ Ecore_Config_Server *ecore_config_init_global(char *name) {
int ecore_config_init(char *name) {
char *buf, *p;
Ecore_Config_Prop *sys;
__app_name = strdup(name);
__server_local = ecore_config_init_local(name);
@ -609,6 +610,14 @@ int ecore_config_init(char *name) {
if (ecore_config_load_file(buf) != 0)
if (ecore_config_load_file(PACKAGE_DATA_DIR "/system.db") != 0)
return ECORE_CONFIG_ERR_NOFILE;
sys = __bundle_local->data;
while (sys) {
/* unmark it modified - modification will mean it has been overridden */
sys->flags&=~PF_MODIFIED;
/* mark as system so that examine can hide them */
sys->flags&=PF_SYSTEM;
sys=sys->next;
}
}
free(buf);
}