diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 1a0eb6194..535d3a2e3 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -169,7 +169,6 @@ static E_Config_DD *conf_match_edd = NULL; static Ecore_Timer *action_timeout = NULL; -static Eina_Inlist *cfg_opts = NULL; ////////////////////////////////////////////////////////////////////////// #undef DBG @@ -4284,54 +4283,41 @@ _e_comp_cfg_init(void) { E_Configure_Option *co; + e_configure_option_domain_current_set("e_comp"); E_CONFIGURE_OPTION_ADD(co, BOOL, vsync, conf, _("Tear-free compositing (VSYNC)"), _("composite"), _("border")); co->requires_restart = 1; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, fast_borders, conf, _("Use fast composite effects for windows"), _("composite"), _("border"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, fast_menus, conf, _("Use fast composite effects for menus"), _("composite"), _("menu"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, fast_popups, conf, _("Use fast composite effects for popups"), _("composite"), _("popup"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, fast_overrides, conf, _("Use fast composite effects for override-redirect windows (tooltips and such)"), _("composite"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_borders, conf, _("Disable composite effects for windows"), _("composite"), _("border"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_menus, conf, _("Disable composite effects for menus"), _("composite"), _("menu"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_popups, conf, _("Disable composite effects for popups"), _("composite"), _("popup"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_overrides, conf, _("Disable composite effects for override-redirect windows (tooltips and such)"), _("composite"), _("theme"), _("animate")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_overrides, conf, _("Disable composite effects for the screen"), _("composite"), _("theme"), _("animate"), _("screen")); E_CONFIGURE_OPTION_HELP(co, _("This option disables composite effects from themes, such as animating the screen fade when blanking")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, smooth_windows, conf, _("Smooth scaling of composited window content"), _("composite"), _("border")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, nocomp_fs, conf, _("Don't composite fullscreen windows"), _("composite"), _("border")); co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, ENUM, engine, conf, _("Compositing engine"), _("composite"), _("border")); co->info_cb = _e_comp_config_engine_info_cb; co->requires_restart = 1; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, STR, shadow_style, conf, _("Default window style"), _("composite"), _("border"), _("theme")); co->info_cb = _e_comp_config_style_info_cb; co->thumb_cb = _e_comp_config_style_thumb_cb; co->funcs[1].none = co->funcs[0].none = e_comp_shadows_reset; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); e_configure_option_category_tag_add(_("windows"), _("composite")); e_configure_option_category_tag_add(_("composite"), _("composite")); @@ -4463,7 +4449,7 @@ e_comp_shutdown(void) e_comp_wl_shutdown(); #endif - E_CONFIGURE_OPTION_LIST_CLEAR(cfg_opts); + e_configure_option_domain_clear("e_comp"); e_configure_option_category_tag_del(_("composite"), _("composite")); e_configure_option_category_tag_del(_("windows"), _("composite")); diff --git a/src/bin/e_configure_option.c b/src/bin/e_configure_option.c index 08eac77d8..4e5800acd 100644 --- a/src/bin/e_configure_option.c +++ b/src/bin/e_configure_option.c @@ -17,7 +17,6 @@ static Eio_Monitor *gtk_theme_mon = NULL; static Eina_List *gtk_theme_mons = NULL; //Eio_Monitor static Eio_File *bg_ls[2] = {NULL, NULL}; static Eio_Monitor *bg_mon[2] = {NULL, NULL}; -static Eina_Inlist *opts_list = NULL; static Eina_Hash *tags_name_hash = NULL; /* (const char*)tag:(Eina_Stringshare*)tag */ static Eina_Hash *tags_hash = NULL; /* tag:item */ static Eina_Hash *tags_alias_hash = NULL; /* alias:tag */ @@ -36,6 +35,8 @@ static Eina_Bool event_block = EINA_TRUE; static Eina_List *categories = NULL; static Eina_Hash *category_hash = NULL; static Eina_Hash *category_icon_hash = NULL; +static Eina_Hash *domain_hash = NULL; +static const char *domain_current = NULL; static void _e_configure_option_event_str_end(void *d EINA_UNUSED, E_Event_Configure_Option_Category_Add *ev) @@ -67,11 +68,7 @@ _e_configure_option_event_tag_add_del(Eina_Stringshare *tag, Eina_Bool del) { E_Event_Configure_Option_Tag_Add *ev; - if (event_block) - { - if (del) eina_stringshare_del(tag); - return; - } + if (event_block) return; ev = E_NEW(E_Event_Configure_Option_Tag_Add, 1); ev->tag = tag; if (del) @@ -116,8 +113,6 @@ _e_configure_option_tag_remove(E_Configure_Option *co, Eina_Stringshare *tag) static void _e_configure_option_free(E_Configure_Option *co) { - if (!co->private) - opts_list = eina_inlist_remove(opts_list, EINA_INLIST_GET(co)); if (co->changed) { eina_value_flush(&co->val); @@ -135,6 +130,18 @@ _e_configure_option_free(E_Configure_Option *co) free(co); } +static void +_e_configure_option_list_free(Eina_Inlist *l) +{ + while (l) + { + E_Configure_Option *co = (E_Configure_Option*)l; + + l = eina_inlist_remove(l, l); + e_configure_option_del(co); + } +} + static void _e_configure_option_event_del_end(void *d EINA_UNUSED, E_Event_Configure_Option_Del *ev) { @@ -1427,13 +1434,14 @@ e_configure_option_init(void) E_EVENT_CONFIGURE_OPTION_TAG_ADD = ecore_event_type_new(); E_EVENT_CONFIGURE_OPTION_TAG_DEL = ecore_event_type_new(); + domain_hash = eina_hash_string_superfast_new((Eina_Free_Cb)_e_configure_option_list_free); tags_name_hash = eina_hash_string_superfast_new(NULL); tags_hash = eina_hash_string_superfast_new(NULL); tags_tag_alias_hash = eina_hash_stringshared_new((Eina_Free_Cb)_e_configure_option_tag_alias_list_free); tags_alias_hash = eina_hash_string_superfast_new(NULL); tags_alias_name_hash = eina_hash_string_superfast_new(NULL); #define OPT_ADD(TYPE, NAME, DESC, ...) \ - co = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_##TYPE, DESC, #NAME, EINA_FALSE, &e_config->NAME, NULL); \ + co = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_##TYPE, DESC, #NAME, &e_config->NAME, NULL); \ e_configure_option_tags_set(co, (const char *[]){__VA_ARGS__, NULL}, 0) #define OPT_HELP(STR) \ co->help = eina_stringshare_add(STR) @@ -1443,6 +1451,8 @@ e_configure_option_init(void) #define OPT_ICON(ICON) \ e_configure_option_data_set(co, "icon", eina_stringshare_add(ICON)) + e_configure_option_domain_current_set("internal"); + OPT_ADD(BOOL, show_splash, _("Show splash screen on startup"), _("splash"), _("startup")); OPT_ADD(STR, init_default_theme, _("Startup splash theme"), _("splash"), _("startup"), _("theme"), _("animate")); co->info_cb = _e_configure_init_default_theme_info_cb; @@ -2128,14 +2138,14 @@ e_configure_option_shutdown(void) opts_changed_list = eina_list_free(opts_changed_list); event_block = EINA_TRUE; E_FREE_LIST(tags_list, eina_stringshare_del); - E_FREE_LIST(tags_alias_list, eina_stringshare_del); - while (opts_list) - _e_configure_option_free((E_Configure_Option *)opts_list); + domain_current = NULL; + E_FN_DEL(eina_hash_free, domain_hash); E_FN_DEL(eina_hash_free, tags_hash); E_FN_DEL(eina_hash_free, tags_tag_alias_hash); E_FN_DEL(eina_hash_free, tags_name_hash); E_FN_DEL(eina_hash_free, tags_alias_name_hash); E_FN_DEL(eina_hash_free, tags_alias_hash); + E_FREE_LIST(tags_alias_list, eina_stringshare_del); E_FN_DEL(eio_monitor_del, theme_mon[0]); E_FN_DEL(eio_monitor_del, theme_mon[1]); E_FN_DEL(eio_file_cancel, theme_ls[0]); @@ -2161,20 +2171,20 @@ e_configure_option_shutdown(void) } EAPI E_Configure_Option * -e_configure_option_add(E_Configure_Option_Type type, const char *desc, const char *name, Eina_Bool private_scope, void *valptr, const void *data) +e_configure_option_add(E_Configure_Option_Type type, const char *desc, const char *name, void *valptr, const void *data) { E_Configure_Option *co; + Eina_Inlist *l; co = E_NEW(E_Configure_Option, 1); - if (!private_scope) - opts_list = eina_inlist_append(opts_list, EINA_INLIST_GET(co)); + l = eina_hash_find(domain_hash, domain_current); + eina_hash_set(domain_hash, domain_current, eina_inlist_append(l, EINA_INLIST_GET(co))); co->type = type; _e_configure_option_value_reset(co); co->name = eina_stringshare_add(name); co->desc = eina_stringshare_add(desc); co->valptr = valptr; co->data = (void *)data; - co->private = !!private_scope; _e_configure_option_event_changed(co); return co; } @@ -2514,6 +2524,7 @@ e_configure_option_category_tag_add(const char *cat, const char *tag) Eina_Stringshare *t, *c; Eina_List *l; + if (!tags_name_hash) return; EINA_SAFETY_ON_NULL_RETURN(cat); EINA_SAFETY_ON_NULL_RETURN(tag); t = eina_hash_find(tags_name_hash, tag); @@ -2567,6 +2578,7 @@ e_configure_option_category_tag_del(const char *cat, const char *tag) EAPI Eina_Stringshare * e_configure_option_category_icon_get(const char *cat) { + if (!category_icon_hash) return NULL; EINA_SAFETY_ON_NULL_RETURN_VAL(cat, NULL); return eina_hash_find(category_icon_hash, cat); } @@ -2574,6 +2586,7 @@ e_configure_option_category_icon_get(const char *cat) EAPI void e_configure_option_category_icon_set(const char *cat, const char *icon) { + if (!category_icon_hash) return; EINA_SAFETY_ON_NULL_RETURN(cat); eina_stringshare_del(eina_hash_set(category_icon_hash, cat, eina_stringshare_add(icon))); } @@ -2584,6 +2597,7 @@ e_configure_option_tag_alias_add(const char *tag, const char *alias) Eina_Stringshare *t, *o; Eina_List *l; + if (!tags_name_hash) return; EINA_SAFETY_ON_NULL_RETURN(tag); EINA_SAFETY_ON_NULL_RETURN(alias); @@ -2603,6 +2617,7 @@ e_configure_option_tag_alias_del(const char *tag, const char *alias) Eina_Stringshare *t, *a; Eina_List *l; + if (!tags_alias_hash) return; EINA_SAFETY_ON_NULL_RETURN(tag); EINA_SAFETY_ON_NULL_RETURN(alias); @@ -2798,3 +2813,24 @@ e_configure_option_ctx_free(E_Configure_Option_Ctx *ctx) free(ctx); } +EAPI void +e_configure_option_domain_current_set(const char *domain) +{ + domain_current = domain; +} + +EAPI Eina_Inlist * +e_configure_option_domain_list(const char *domain) +{ + if (!domain_hash) return NULL; + EINA_SAFETY_ON_NULL_RETURN_VAL(domain, NULL); + return eina_hash_find(domain_hash, domain); +} + +EAPI void +e_configure_option_domain_clear(const char *domain) +{ + if (!domain_hash) return; + EINA_SAFETY_ON_NULL_RETURN(domain); + eina_hash_del_by_key(domain_hash, domain); +} diff --git a/src/bin/e_configure_option.h b/src/bin/e_configure_option.h index 3e8346b3b..af4bc7acf 100644 --- a/src/bin/e_configure_option.h +++ b/src/bin/e_configure_option.h @@ -21,10 +21,10 @@ typedef Evas_Object *(*E_Configure_Option_Info_Thumb_Cb)(E_Configure_Option_Info #define E_CONFIGURE_OPTION_TAG_LENGTH 128 #define E_CONFIGURE_OPTION_ADD(OPT, TYPE, NAME, CFGPTR, DESC, ...) \ - OPT = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_##TYPE, DESC, #NAME, EINA_TRUE, &CFGPTR->NAME, NULL);\ + OPT = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_##TYPE, DESC, #NAME, &CFGPTR->NAME, NULL);\ e_configure_option_tags_set(OPT, (const char*[]){__VA_ARGS__, NULL}, 0) #define E_CONFIGURE_OPTION_ADD_CUSTOM(OPT, NAME, DESC, ...) \ - OPT = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_CUSTOM, DESC, NAME, EINA_TRUE, NULL, NULL);\ + OPT = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_CUSTOM, DESC, NAME, NULL, NULL);\ e_configure_option_tags_set(OPT, (const char*[]){__VA_ARGS__, NULL}, 0) #define E_CONFIGURE_OPTION_HELP(OPT, STR) \ OPT->help = eina_stringshare_add(_(STR)) @@ -33,16 +33,6 @@ typedef Evas_Object *(*E_Configure_Option_Info_Thumb_Cb)(E_Configure_Option_Info OPT->info = eina_stringshare_add(_(FMT)) #define E_CONFIGURE_OPTION_ICON(OPT, ICON) \ e_configure_option_data_set(OPT, "icon", eina_stringshare_add(ICON)) -#define E_CONFIGURE_OPTION_LIST_CLEAR(LIST) do {\ - while (LIST) \ - { \ - E_Configure_Option *co; \ -\ - co = (E_Configure_Option*)LIST; \ - LIST = eina_inlist_remove(LIST, EINA_INLIST_GET(co)); \ - e_configure_option_del(co); \ - }\ -} while (0) EAPI extern int E_EVENT_CONFIGURE_OPTION_CHANGED; @@ -94,7 +84,6 @@ struct E_Configure_Option void (*one)(); void (*two)(); } funcs[2]; //disable, enable - Eina_Bool private : 1; Eina_Bool requires_restart : 1; Eina_Bool changed : 1; }; @@ -138,7 +127,7 @@ EAPI const Eina_List *e_configure_option_changed_list(void); EAPI void e_configure_option_apply_all(void); EAPI void e_configure_option_reset_all(void); -EAPI E_Configure_Option *e_configure_option_add(E_Configure_Option_Type type, const char *desc, const char *name, Eina_Bool private_scope, void *valptr, const void *data); +EAPI E_Configure_Option *e_configure_option_add(E_Configure_Option_Type type, const char *desc, const char *name, void *valptr, const void *data); EAPI void e_configure_option_tags_set(E_Configure_Option *co, const char const **tags, unsigned int num_tags); EAPI void e_configure_option_del(E_Configure_Option *eci); EAPI const Eina_List *e_configure_option_tag_list_options(const char *tag); @@ -172,6 +161,10 @@ EAPI const Eina_List *e_configure_option_ctx_match_tag_list(E_Configure_Option_C EAPI Eina_Bool e_configure_option_ctx_tag_add(E_Configure_Option_Ctx *ctx, Eina_Stringshare *tag); EAPI Eina_Bool e_configure_option_ctx_tag_pop(E_Configure_Option_Ctx *ctx); +EAPI void e_configure_option_domain_current_set(const char *domain); +EAPI Eina_Inlist *e_configure_option_domain_list(const char *domain); +EAPI void e_configure_option_domain_clear(const char *domain); + EINTERN int e_configure_option_init(void); EINTERN int e_configure_option_shutdown(void); # endif diff --git a/src/modules/conf_comp/e_mod_main.c b/src/modules/conf_comp/e_mod_main.c index affa2296b..9b448aa05 100644 --- a/src/modules/conf_comp/e_mod_main.c +++ b/src/modules/conf_comp/e_mod_main.c @@ -5,7 +5,6 @@ #include "e_comp_cfdata.h" static E_Int_Menu_Augmentation *maug = NULL; -static Eina_Inlist *cfg_opts = NULL; /* module private routines */ EINTERN Mod *_comp_mod = NULL; @@ -73,10 +72,10 @@ e_modapi_init(E_Module *m) { E_Configure_Option *co; + e_configure_option_domain_current_set("conf_comp"); E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("settings"), _("Composite settings panel"), _("composite"), _("border")); co->info = eina_stringshare_add("appearance/comp"); E_CONFIGURE_OPTION_ICON(co, "preferences-composite"); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); } e_module_delayed_set(m, 0); @@ -100,7 +99,7 @@ e_modapi_shutdown(E_Module *m) } free(mod); - E_CONFIGURE_OPTION_LIST_CLEAR(cfg_opts); + e_configure_option_domain_clear("conf_comp"); if (maug) { diff --git a/src/modules/everything/e_mod_main.c b/src/modules/everything/e_mod_main.c index ad3d319b0..0e4bc2dfd 100644 --- a/src/modules/everything/e_mod_main.c +++ b/src/modules/everything/e_mod_main.c @@ -22,7 +22,6 @@ Evry_API *evry = NULL; Evry_Config *evry_conf = NULL; int _evry_events[NUM_EVRY_EVENTS]; E_Module *_mod_evry = NULL; -static E_Configure_Option *cfg_opt = NULL; /* module setup */ EAPI E_Module_Api e_modapi = @@ -64,11 +63,16 @@ e_modapi_init(E_Module *m) e_configure_registry_item_add ("launcher/run_everything", 40, _("Everything Configuration"), NULL, module_icon, evry_config_dialog); - E_CONFIGURE_OPTION_ADD_CUSTOM(cfg_opt, _("settings"), _("Everything launcher settings"), _("exec"), _("everything")); - E_CONFIGURE_OPTION_ICON(cfg_opt, module_icon); - cfg_opt->info = eina_stringshare_add("launcher/run_everything"); - e_configure_option_category_tag_add(_("everything"), _("everything")); - e_configure_option_category_icon_set(_("everything"), module_icon);; + { + E_Configure_Option *co; + + e_configure_option_domain_current_set("everything"); + E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("settings"), _("Everything launcher settings"), _("exec"), _("everything")); + E_CONFIGURE_OPTION_ICON(co, module_icon); + co->info = eina_stringshare_add("launcher/run_everything"); + e_configure_option_category_tag_add(_("everything"), _("everything")); + e_configure_option_category_icon_set(_("everything"), module_icon);; + } evry_init(); _evry_type_init("NONE"); @@ -169,7 +173,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__) em->active = EINA_FALSE; } e_configure_option_category_tag_del(_("everything"), _("everything")); - E_FN_DEL(e_configure_option_del, cfg_opt); + e_configure_option_domain_clear("everything"); evry_plug_apps_shutdown(); evry_plug_files_shutdown(); diff --git a/src/modules/fileman/e_mod_main.c b/src/modules/fileman/e_mod_main.c index 36c2de078..05c1710f6 100644 --- a/src/modules/fileman/e_mod_main.c +++ b/src/modules/fileman/e_mod_main.c @@ -16,7 +16,6 @@ static E_Action *act = NULL; static E_Action *act2 = NULL; static E_Int_Menu_Augmentation *maug = NULL; static Ecore_Event_Handler *zone_add_handler = NULL; -static Eina_Inlist *cfg_opts = NULL; static E_Config_DD *paths_edd = NULL, *conf_edd = NULL; Config *fileman_config = NULL; @@ -163,7 +162,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__) e_configure_option_tag_alias_del(_("files"), _("filemanager")); e_configure_option_tag_alias_del(_("files"), _("file manager")); - E_CONFIGURE_OPTION_LIST_CLEAR(cfg_opts); + e_configure_option_domain_clear("fileman"); _e_mod_fileman_config_free(); E_CONFIG_DD_FREE(conf_edd); E_CONFIG_DD_FREE(paths_edd); @@ -385,88 +384,70 @@ _e_mod_fileman_config_load(void) { E_Configure_Option *co; + e_configure_option_domain_current_set("fileman"); + E_CONFIGURE_OPTION_ADD(co, ENUM, view.mode, fileman_config, _("Default view mode"), _("files")); co->info_cb = _cfg_view_mode_info_cb; E_CONFIGURE_OPTION_ICON(co, "system-file-manager"); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, DOUBLE_INT, icon.icon.w, fileman_config, _("Icon size"), _("files"), _("image")); E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 16, 256, 1, _("%1.0f pixels")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, icon.extension.show, fileman_config, _("Show file extensions"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, view.show_full_path, fileman_config, _("Show full path in filemanager window titles"), _("files"), _("border")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, view.show_toolbar, fileman_config, _("Show path toolbar in filemanager windows"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, ENUM, view.toolbar_orient, fileman_config, _("Filemanager path toolbar position"), _("files")); co->info_cb = _cfg_toolbar_orient_cb_info_cb; E_CONFIGURE_OPTION_ICON(co, "system-file-manager"); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, view.show_sidebar, fileman_config, _("Show favorites sidebar in filemanager windows"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.no_case, fileman_config, _("Ignore letter case when sorting files"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.extension, fileman_config, _("Group files by extension"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.mtime, fileman_config, _("Sort files by modification time"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.size, fileman_config, _("Sort files by size"), _("files"), _("size")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); /* FIXME: exclusive */ E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.dirs.first, fileman_config, _("Sort directories first"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.dirs.last, fileman_config, _("Sort directories last"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, view.open_dirs_in_place, fileman_config, _("Open directories in place"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, view.single_click, fileman_config, _("Use single click to open files"), _("files")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, selection.windows_modifiers, fileman_config, _("Use alternate (Mac-style) selection modifiers"), _("files"), _("key")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, view.desktop_navigation, fileman_config, _("Allow navigation on desktop"), _("files")); E_CONFIGURE_OPTION_HELP(co, _("Normally, icons on the desktop come from $XDG_HOME_DIR/Desktop[-$SCREEN]. " "With this option enabled, the desktop can freely change directories using the Navigate " "menu or type buffer.")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, DOUBLE_UINT, icon.max_thumb_size, fileman_config, _("Maximum file size for which thumbnails should be generated"), _("files"), _("size"), _("image")); E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 0, 512, 1, _("%1.0f MiB")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, DOUBLE, view.spring_delay, fileman_config, _("Spring folder delay"), _("files"), _("delay")); E_CONFIGURE_OPTION_HELP(co, _("A \"spring folder\" is the action that occurs when dragging a file onto a folder: " "the folder will \"spring\" open and create a new window to continue the drag operation in.")); E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 1, 10, 1, _("%1.0f seconds")); co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("settings"), _("File icons"), _("files"), _("image")); co->info = eina_stringshare_add("fileman/file_icons"); E_CONFIGURE_OPTION_ICON(co, "preferences-file-icons"); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); e_configure_option_tag_alias_add(_("files"), _("filemanager")); e_configure_option_tag_alias_add(_("files"), _("file manager")); diff --git a/src/modules/notification/e_mod_main.c b/src/modules/notification/e_mod_main.c index 8ccc0d8f2..bba546d91 100644 --- a/src/modules/notification/e_mod_main.c +++ b/src/modules/notification/e_mod_main.c @@ -10,8 +10,6 @@ Config *notification_cfg = NULL; static E_Config_DD *conf_edd = NULL; -static Eina_Inlist *cfg_opts = NULL; - static unsigned int _notification_notify(E_Notification_Notify *n) { @@ -237,21 +235,16 @@ e_modapi_init(E_Module *m) notification_mod = m; + e_configure_option_domain_current_set("notification"); E_CONFIGURE_OPTION_ADD(co, BOOL, show_low, notification_cfg, _("Display low urgency notifications"), _("notification")); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, show_normal, notification_cfg, _("Display normal urgency notifications"), _("notification")); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, show_critical, notification_cfg, _("Display high urgency notifications"), _("notification")); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, force_timeout, notification_cfg, _("Force a specified timeout on all notifications"), _("notification"), _("delay")); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, DOUBLE, timeout, notification_cfg, _("Timeout to force on notifications"), _("notification"), _("delay")); E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 0.0, 15.0, 0.1, _("%.1f seconds")); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, ENUM, corner, notification_cfg, _("Corner in which to display notifications"), _("notification"), _("screen")); co->info_cb = _notification_corner_info_cb; E_CONFIGURE_OPTION_ICON(co, buf); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); e_configure_option_category_tag_add(_("screen"), _("notification")); e_configure_option_category_tag_add(_("notification"), _("notification")); @@ -277,7 +270,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__) e_notification_server_unregister(); - E_CONFIGURE_OPTION_LIST_CLEAR(cfg_opts); + e_configure_option_domain_clear("quickaccess"); e_configure_option_category_tag_del(_("screen"), _("notification")); e_configure_option_category_tag_del(_("notification"), _("notification")); _notification_cfg_free(notification_cfg); diff --git a/src/modules/quickaccess/e_mod_main.c b/src/modules/quickaccess/e_mod_main.c index f2ab03379..616bee28f 100644 --- a/src/modules/quickaccess/e_mod_main.c +++ b/src/modules/quickaccess/e_mod_main.c @@ -4,7 +4,6 @@ EINTERN int _e_quick_access_log_dom = -1; static E_Config_DD *conf_edd = NULL; Mod *qa_mod = NULL; Config *qa_config = NULL; -static Eina_Inlist *qa_cfg_opts = NULL; /** * in priority order: @@ -64,23 +63,20 @@ e_modapi_init(E_Module *m) return NULL; } + e_configure_option_domain_current_set("quickaccess"); + E_CONFIGURE_OPTION_ADD_CUSTOM(co, _("settings"), _("Quickaccess settings panel"), _("quickaccess"), _("border")); co->info = eina_stringshare_add("launcher/quickaccess"); E_CONFIGURE_OPTION_ICON(co, buf); - qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, hide_when_behind, qa_config, _("Hide windows on activate instead of raising"), _("quickaccess"), _("border")); E_CONFIGURE_OPTION_HELP(co, _("By default, activating a Quickaccess binding when the window is behind other windows will raise the window. " "This option changes that behavior to hide the window instead.")); - qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, autohide, qa_config, _("Hide windows when focus is lost"), _("quickaccess"), _("border"), _("focus")); E_CONFIGURE_OPTION_HELP(co, _("This option causes Quickaccess windows to automatically hide when they lose focus")); - qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, skip_taskbar, qa_config, _("Skip taskbar"), _("quickaccess"), _("border")); E_CONFIGURE_OPTION_HELP(co, _("This option causes Quickaccess windows to not show up in taskbars")); - qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, skip_pager, qa_config, _("Skip pager"), _("quickaccess"), _("border")); E_CONFIGURE_OPTION_HELP(co, _("This option causes Quickaccess windows to not show up in pagers")); - qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co)); e_configure_option_category_tag_add(_("windows"), _("quickaccess")); e_configure_option_category_tag_add(_("quickaccess"), _("quickaccess")); @@ -101,7 +97,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__) e_configure_registry_item_del("launcher/quickaccess"); e_configure_registry_category_del("launcher"); - E_CONFIGURE_OPTION_LIST_CLEAR(qa_cfg_opts); + e_configure_option_domain_clear("quickaccess"); e_configure_option_category_tag_del(_("quickaccess"), _("quickaccess")); e_configure_option_category_tag_del(_("windows"), _("quickaccess")); diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index 159610c93..aef0a1e12 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -6,8 +6,6 @@ #define TILING_RESIZE_STEP 5 #define TILING_WRAP_SPEED 0.1 -static Eina_Inlist *cfg_opts = NULL; - typedef enum { TILING_RESIZE, TILING_MOVE, @@ -3907,23 +3905,20 @@ e_modapi_init(E_Module *m) { E_Configure_Option *co; - co = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_CUSTOM, _("Tiling settings"), "tiling", EINA_TRUE, NULL, NULL); - e_configure_option_tags_set(co, (const char*[]){_("tiling"), _("border"), NULL}, 0); + e_configure_option_domain_current_set("tiling"); + + E_CONFIGURE_OPTION_ADD_CUSTOM(co, "tiling", _("Tiling settings"), _("tiling"), _("border")); co->info = eina_stringshare_add("windows/tiling"); E_CONFIGURE_OPTION_ICON(co, _G.edj_path); co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, tile_dialogs, tiling_g.config, _("Tile dialog windows"), _("dialog"), _("tiling"), _("border"), _("placement")); co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, BOOL, show_titles, tiling_g.config, _("Show window titles when tiling"), _("tiling"), _("border")); co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf; - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); E_CONFIGURE_OPTION_ADD(co, STR, keyhints, tiling_g.config, _("Tiling key hints"), _("key"), _("tiling")); co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf; E_CONFIGURE_OPTION_ICON(co, _G.edj_path); - cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co)); e_configure_option_category_tag_add(_("windows"), _("tiling")); e_configure_option_category_tag_add(_("tiling"), _("tiling")); @@ -4050,14 +4045,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__) end_special_input(); - while (cfg_opts) - { - E_Configure_Option *co; - - co = (E_Configure_Option*)cfg_opts; - cfg_opts = eina_inlist_remove(cfg_opts, EINA_INLIST_GET(co)); - e_configure_option_del(co); - } + e_configure_option_domain_clear("tiling"); e_configure_option_category_icon_set(_("tiling"), _G.edj_path); e_configure_option_category_tag_del(_("border"), _("tiling"));