struct _config_section *parent;
void (*set_defaults)(struct _config_section *);
+ Eina_Bool (*update)(struct _config_section *);
};
static void
base->set_defaults(base);
}
+static Eina_Bool
+_config_section_update(struct _config_section *base)
+{
+ Eina_List *node;
+ struct _config_section *sub;
+ Eina_Bool ret = EINA_FALSE;
+
+ EINA_LIST_FOREACH(base->subsections, node, sub)
+ if (_config_section_update(sub))
+ ret = EINA_TRUE;
+
+ if (!base->update)
+ return ret;
+
+ return base->update(base) || ret;
+}
+
static struct _config_section *
_config_section_find(struct _config_section *base, const char *section)
{
if (!_section) \
break; \
_section->set_defaults = _config_ ## _id ## _set_defaults; \
+ _section->update = _config_ ## _id ## _update; \
_section->parent = _parent; \
_section->edd = _ ## _id ## _edd; \
if (!_section->parent) \
hotkey->previous_engine = _config_string_list_new(previous_engine);
}
+#define _config_hotkey_update NULL;
+
static void
_config_hotkey_section_init(struct _config_section *base)
{
general->dconf_preserve_name_prefixes = _config_string_list_new(dconf_preserve_name_prefixes);
}
+#define _config_general_update NULL;
+
static void
_config_general_section_init(struct _config_section *base)
{
panel->use_custom_font = EINA_FALSE;
}
+#define _config_panel_update NULL;
+
static void
_config_panel_section_init(struct _config_section *base)
{
hangul->autoreorder = EINA_TRUE;
}
+#define _config_hangul_update NULL;
+
static void
_config_hangul_section_init(struct _config_section *base)
{
return edd;
}
-static void
-_config_engine_set_defaults(struct _config_section *base)
-{
-}
+#define _config_engine_set_defaults NULL;
+#define _config_engine_update NULL;
static void
_config_engine_section_init(struct _config_section *base)
return edd;
}
-static void
-_config_ibus_set_defaults(struct _config_section *base)
-{
-}
+#define _config_ibus_set_defaults NULL;
+#define _config_ibus_update NULL;
static void
_config_ibus_section_init(struct _config_section *base)
conf->theme = eina_stringshare_add("default");
}
+#define _config_weekeyboard_update NULL
+
static void
_config_weekeyboard_section_init(struct _config_section *base)
{
Eina_List *node;
EINA_LIST_FOREACH(config_eet->sections, node, s)
- if((sec = _config_section_find(s, section)))
+ if ((sec = _config_section_find(s, section)))
return sec;
return NULL;
{ \
DBG("Read section '%s' from Eet file '%s'", #_id , _eet->path); \
_config_section_init(sec, _id, NULL); \
+ if (_config_section_update(sec)) \
+ wkb_ibus_config_section_write(_eet, sec); \
_eet->sections = eina_list_append(_eet->sections, sec); \
} \
} while (0)