summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2008-12-17 15:33:43 +0000
committerCedric BAIL <cedric.bail@free.fr>2008-12-17 15:33:43 +0000
commit773d102291f1341a5e11c5a05027ede526b8d600 (patch)
treef9f367ea2be603598d4264c7b8b699f3046da8f2
parente29866312c9e61ba192036c02fe8e612e91b111c (diff)
This commit is huge. I did test it a lot on my computer, and it run fine here.
But is so big i fear i could have broken some piece of code. So report any wrong behaviour to me (cedric on #edevelop). So moving e17 and efreet to eina_hash. With a little efreet API break so they must come together. SVN revision: 38185
-rw-r--r--src/bin/e_actions.c18
-rw-r--r--src/bin/e_border.c89
-rw-r--r--src/bin/e_config_data.c10
-rw-r--r--src/bin/e_config_data.h9
-rw-r--r--src/bin/e_configure.c8
-rw-r--r--src/bin/e_datastore.c14
-rw-r--r--src/bin/e_dnd.c31
-rw-r--r--src/bin/e_exec.c24
-rw-r--r--src/bin/e_filereg.c52
-rw-r--r--src/bin/e_fm.c4
-rw-r--r--src/bin/e_fm_custom.c117
-rw-r--r--src/bin/e_fm_main.c2
-rw-r--r--src/bin/e_fm_mime.c115
-rw-r--r--src/bin/e_fm_shared.h16
-rw-r--r--src/bin/e_font.c42
-rw-r--r--src/bin/e_font.h4
-rw-r--r--src/bin/e_gadcon.c15
-rw-r--r--src/bin/e_int_config_modules.c247
-rw-r--r--src/bin/e_int_menus.c105
-rw-r--r--src/bin/e_intl.c29
-rw-r--r--src/bin/e_ipc_codec.c18
-rw-r--r--src/bin/e_manager.c21
-rw-r--r--src/bin/e_menu.c35
-rw-r--r--src/bin/e_module.c60
-rw-r--r--src/bin/e_path.c40
-rw-r--r--src/bin/e_path.h8
-rw-r--r--src/bin/e_remote_main.c10
-rw-r--r--src/bin/e_shelf.c12
-rw-r--r--src/bin/e_stolen.c24
-rw-r--r--src/bin/e_sys_main.c13
-rw-r--r--src/bin/e_theme.c94
-rw-r--r--src/bin/e_thumb.c11
-rw-r--r--src/modules/conf_fonts/e_int_config_fonts.c6
-rw-r--r--src/modules/conf_imc/e_int_config_imc.c52
-rw-r--r--src/modules/conf_intl/e_int_config_intl.c204
-rw-r--r--src/modules/exebuf/e_exebuf.c58
-rw-r--r--src/modules/fileman/e_fwin.c27
-rw-r--r--src/modules/illume/e_kbd_dict.c26
-rw-r--r--src/modules/illume/e_kbd_dict.h4
-rw-r--r--src/modules/illume/e_mod_win.c2
-rw-r--r--src/modules/mixer/e_mod_main.c18
-rw-r--r--src/modules/mixer/e_mod_main.h2
-rw-r--r--src/modules/syscon/e_mod_main.c1
-rw-r--r--src/modules/temperature/e_mod_main.c32
-rw-r--r--src/modules/temperature/e_mod_main.h2
-rw-r--r--src/preload/e_precache.c23
46 files changed, 941 insertions, 813 deletions
diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c
index aceef84c5..fac7f814e 100644
--- a/src/bin/e_actions.c
+++ b/src/bin/e_actions.c
@@ -2256,7 +2256,7 @@ ACT_FN_END_MOUSE(delayed_action)
2256} 2256}
2257 2257
2258/* local subsystem globals */ 2258/* local subsystem globals */
2259static Evas_Hash *actions = NULL; 2259static Eina_Hash *actions = NULL;
2260static Eina_List *action_list = NULL; 2260static Eina_List *action_list = NULL;
2261static Eina_List *action_names = NULL; 2261static Eina_List *action_names = NULL;
2262static Eina_List *action_groups = NULL; 2262static Eina_List *action_groups = NULL;
@@ -2268,8 +2268,9 @@ e_actions_init(void)
2268{ 2268{
2269 E_Action *act; 2269 E_Action *act;
2270 2270
2271 actions = eina_hash_string_superfast_new(NULL);
2271 ACT_GO(window_move); 2272 ACT_GO(window_move);
2272 e_action_predef_name_set(_("Window : Actions"), _("Move"), 2273 e_action_predef_name_set(_("Window : Actions"), _("Move"),
2273 "window_move", NULL, NULL, 0); 2274 "window_move", NULL, NULL, 0);
2274 2275
2275 ACT_GO_MOUSE(window_move); 2276 ACT_GO_MOUSE(window_move);
@@ -2655,7 +2656,7 @@ e_actions_shutdown(void)
2655{ 2656{
2656 e_action_predef_name_all_del(); 2657 e_action_predef_name_all_del();
2657 action_names = eina_list_free(action_names); 2658 action_names = eina_list_free(action_names);
2658 evas_hash_free(actions); 2659 eina_hash_free(actions);
2659 actions = NULL; 2660 actions = NULL;
2660 2661
2661 E_FREE_LIST(action_list, e_object_del); 2662 E_FREE_LIST(action_list, e_object_del);
@@ -2672,14 +2673,14 @@ EAPI E_Action *
2672e_action_add(const char *name) 2673e_action_add(const char *name)
2673{ 2674{
2674 E_Action *act; 2675 E_Action *act;
2675 2676
2676 act = e_action_find(name); 2677 act = e_action_find(name);
2677 if (!act) 2678 if (!act)
2678 { 2679 {
2679 act = E_OBJECT_ALLOC(E_Action, E_ACTION_TYPE, _e_action_free); 2680 act = E_OBJECT_ALLOC(E_Action, E_ACTION_TYPE, _e_action_free);
2680 if (!act) return NULL; 2681 if (!act) return NULL;
2681 act->name = name; 2682 act->name = name;
2682 actions = evas_hash_direct_add(actions, act->name, act); 2683 eina_hash_direct_add(actions, act->name, act);
2683 action_names = eina_list_append(action_names, name); 2684 action_names = eina_list_append(action_names, name);
2684 action_list = eina_list_append(action_list, act); 2685 action_list = eina_list_append(action_list, act);
2685 } 2686 }
@@ -2691,7 +2692,7 @@ e_action_del(const char *name)
2691{ 2692{
2692 E_Action *act; 2693 E_Action *act;
2693 2694
2694 act = evas_hash_find(actions, name); 2695 act = eina_hash_find(actions, name);
2695 if (act) 2696 if (act)
2696 _e_action_free(act); 2697 _e_action_free(act);
2697} 2698}
@@ -2700,8 +2701,7 @@ EAPI E_Action *
2700e_action_find(const char *name) 2701e_action_find(const char *name)
2701{ 2702{
2702 E_Action *act; 2703 E_Action *act;
2703 2704 act = eina_hash_find(actions, name);
2704 act = evas_hash_find(actions, name);
2705 return act; 2705 return act;
2706} 2706}
2707 2707
@@ -2870,7 +2870,7 @@ e_action_groups_get(void)
2870static void 2870static void
2871_e_action_free(E_Action *act) 2871_e_action_free(E_Action *act)
2872{ 2872{
2873 actions = evas_hash_del(actions, act->name, act); 2873 eina_hash_del(actions, act->name, act);
2874 action_names = eina_list_remove(action_names, act->name); 2874 action_names = eina_list_remove(action_names, act->name);
2875 action_list = eina_list_remove(action_list, act); 2875 action_list = eina_list_remove(action_list, act);
2876 free(act); 2876 free(act);
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 78d0e8eb0..cf81787e7 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -107,7 +107,7 @@ static void _e_border_hook_call(E_Border_Hook_Point hookpoint, E_Border *bd);
107/* local subsystem globals */ 107/* local subsystem globals */
108static Eina_List *handlers = NULL; 108static Eina_List *handlers = NULL;
109static Eina_List *borders = NULL; 109static Eina_List *borders = NULL;
110static Evas_Hash *borders_hash = NULL; 110static Eina_Hash *borders_hash = NULL;
111static E_Border *focused = NULL; 111static E_Border *focused = NULL;
112 112
113static E_Border *resize = NULL; 113static E_Border *resize = NULL;
@@ -183,12 +183,12 @@ e_border_init(void)
183 ecore_x_passive_grab_replay_func_set(_e_border_cb_grab_replay, NULL); 183 ecore_x_passive_grab_replay_func_set(_e_border_cb_grab_replay, NULL);
184 184
185 handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_POINTER_WARP, _e_border_cb_pointer_warp, NULL)); 185 handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_POINTER_WARP, _e_border_cb_pointer_warp, NULL));
186
187 handlers = eina_list_append(handlers, ecore_event_handler_add(EFREET_EVENT_DESKTOP_LIST_CHANGE, _e_border_cb_efreet_desktop_list_change, NULL)); 186 handlers = eina_list_append(handlers, ecore_event_handler_add(EFREET_EVENT_DESKTOP_LIST_CHANGE, _e_border_cb_efreet_desktop_list_change, NULL));
188 handlers = eina_list_append(handlers, ecore_event_handler_add(EFREET_EVENT_DESKTOP_CHANGE, _e_border_cb_efreet_desktop_change, NULL)); 187 handlers = eina_list_append(handlers, ecore_event_handler_add(EFREET_EVENT_DESKTOP_CHANGE, _e_border_cb_efreet_desktop_change, NULL));
189
190 handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_CONFIG_ICON_THEME, _e_border_cb_config_icon_theme, NULL)); 188 handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_CONFIG_ICON_THEME, _e_border_cb_config_icon_theme, NULL));
191 189
190 if (!borders_hash) borders_hash = eina_hash_string_superfast_new(NULL);
191
192 E_EVENT_BORDER_ADD = ecore_event_type_new(); 192 E_EVENT_BORDER_ADD = ecore_event_type_new();
193 E_EVENT_BORDER_REMOVE = ecore_event_type_new(); 193 E_EVENT_BORDER_REMOVE = ecore_event_type_new();
194 E_EVENT_BORDER_DESK_SET = ecore_event_type_new(); 194 E_EVENT_BORDER_DESK_SET = ecore_event_type_new();
@@ -218,6 +218,9 @@ e_border_shutdown(void)
218{ 218{
219 E_FREE_LIST(handlers, ecore_event_handler_del); 219 E_FREE_LIST(handlers, ecore_event_handler_del);
220 220
221 if (borders_hash) eina_hash_free(borders_hash);
222 borders_hash = NULL;
223
221 return 1; 224 return 1;
222} 225}
223 226
@@ -471,7 +474,7 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map, int internal)
471 */ 474 */
472/* ecore_x_window_reparent(win, bd->client.shell_win, 0, 0); */ 475/* ecore_x_window_reparent(win, bd->client.shell_win, 0, 0); */
473 bd->need_reparent = 1; 476 bd->need_reparent = 1;
474 477
475 ecore_x_window_border_width_set(win, 0); 478 ecore_x_window_border_width_set(win, 0);
476 ecore_x_window_show(bd->event_win); 479 ecore_x_window_show(bd->event_win);
477 ecore_x_window_show(bd->client.shell_win); 480 ecore_x_window_show(bd->client.shell_win);
@@ -486,7 +489,7 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map, int internal)
486 bd->desk = e_desk_current_get(bd->zone); 489 bd->desk = e_desk_current_get(bd->zone);
487 e_container_border_add(bd); 490 e_container_border_add(bd);
488 borders = eina_list_append(borders, bd); 491 borders = eina_list_append(borders, bd);
489 bd2 = evas_hash_find(borders_hash, e_util_winid_str_get(bd->client.win)); 492 bd2 = eina_hash_find(borders_hash, e_util_winid_str_get(bd->client.win));
490 if (bd2) 493 if (bd2)
491 { 494 {
492 printf("EEEEK! 2 borders with same client window id in them! very bad!\n"); 495 printf("EEEEK! 2 borders with same client window id in them! very bad!\n");
@@ -495,13 +498,13 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map, int internal)
495 printf("bd=%p, bd->references=%i, bd->deleted=%i, bd->client.win=%x\n", 498 printf("bd=%p, bd->references=%i, bd->deleted=%i, bd->client.win=%x\n",
496 bd2, bd2->e_obj_inherit.references, bd2->e_obj_inherit.deleted, 499 bd2, bd2->e_obj_inherit.references, bd2->e_obj_inherit.deleted,
497 bd2->client.win); 500 bd2->client.win);
498 borders_hash = evas_hash_del(borders_hash, e_util_winid_str_get(bd->client.win), bd2); 501 eina_hash_del(borders_hash, e_util_winid_str_get(bd->client.win), bd2);
499 borders_hash = evas_hash_del(borders_hash, e_util_winid_str_get(bd2->bg_win), bd2); 502 eina_hash_del(borders_hash, e_util_winid_str_get(bd2->bg_win), bd2);
500 borders_hash = evas_hash_del(borders_hash, e_util_winid_str_get(bd2->win), bd2); 503 eina_hash_del(borders_hash, e_util_winid_str_get(bd2->win), bd2);
501 } 504 }
502 borders_hash = evas_hash_add(borders_hash, e_util_winid_str_get(bd->client.win), bd); 505 eina_hash_add(borders_hash, e_util_winid_str_get(bd->client.win), bd);
503 borders_hash = evas_hash_add(borders_hash, e_util_winid_str_get(bd->bg_win), bd); 506 eina_hash_add(borders_hash, e_util_winid_str_get(bd->bg_win), bd);
504 borders_hash = evas_hash_add(borders_hash, e_util_winid_str_get(bd->win), bd); 507 eina_hash_add(borders_hash, e_util_winid_str_get(bd->win), bd);
505 managed = 1; 508 managed = 1;
506 ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &managed, 1); 509 ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &managed, 1);
507 ecore_x_window_prop_card32_set(win, E_ATOM_CONTAINER, &bd->zone->container->num, 1); 510 ecore_x_window_prop_card32_set(win, E_ATOM_CONTAINER, &bd->zone->container->num, 1);
@@ -2401,40 +2404,40 @@ e_border_unstick(E_Border *bd)
2401} 2404}
2402 2405
2403EAPI void 2406EAPI void
2404e_border_pinned_set(E_Border *bd, int set) 2407e_border_pinned_set(E_Border *bd, int set)
2405{ 2408{
2406 int layer; 2409 int layer;
2407 int stacking; 2410 int stacking;
2408 2411
2409 if (bd) 2412 if (bd)
2410 { 2413 {
2411 bd->borderless = set; 2414 bd->borderless = set;
2412 bd->user_skip_winlist = set; 2415 bd->user_skip_winlist = set;
2413 if (set) 2416 if (set)
2414 { 2417 {
2415 layer = 50; 2418 layer = 50;
2416 stacking = E_STACKING_BELOW; 2419 stacking = E_STACKING_BELOW;
2417 } 2420 }
2418 else 2421 else
2419 { 2422 {
2420 layer = 100; 2423 layer = 100;
2421 stacking = E_STACKING_NONE; 2424 stacking = E_STACKING_NONE;
2422 } 2425 }
2423
2424 e_border_layer_set(bd, layer);
2425 e_hints_window_stacking_set(bd, stacking);
2426 2426
2427 bd->client.border.changed = 1; 2427 e_border_layer_set(bd, layer);
2428 bd->changed = 1; 2428 e_hints_window_stacking_set(bd, stacking);
2429 } 2429
2430} 2430 bd->client.border.changed = 1;
2431 bd->changed = 1;
2432 }
2433}
2431 2434
2432EAPI E_Border * 2435EAPI E_Border *
2433e_border_find_by_client_window(Ecore_X_Window win) 2436e_border_find_by_client_window(Ecore_X_Window win)
2434{ 2437{
2435 E_Border *bd; 2438 E_Border *bd;
2436 2439
2437 bd = evas_hash_find(borders_hash, e_util_winid_str_get(win)); 2440 bd = eina_hash_find(borders_hash, e_util_winid_str_get(win));
2438 if ((bd) && (!e_object_is_del(E_OBJECT(bd))) && 2441 if ((bd) && (!e_object_is_del(E_OBJECT(bd))) &&
2439 (bd->client.win == win)) 2442 (bd->client.win == win))
2440 return bd; 2443 return bd;
@@ -2445,8 +2448,8 @@ EAPI E_Border *
2445e_border_find_all_by_client_window(Ecore_X_Window win) 2448e_border_find_all_by_client_window(Ecore_X_Window win)
2446{ 2449{
2447 E_Border *bd; 2450 E_Border *bd;
2448 2451
2449 bd = evas_hash_find(borders_hash, e_util_winid_str_get(win)); 2452 bd = eina_hash_find(borders_hash, e_util_winid_str_get(win));
2450 if ((bd) && (bd->client.win == win)) 2453 if ((bd) && (bd->client.win == win))
2451 return bd; 2454 return bd;
2452 return NULL; 2455 return NULL;
@@ -2456,8 +2459,8 @@ EAPI E_Border *
2456e_border_find_by_frame_window(Ecore_X_Window win) 2459e_border_find_by_frame_window(Ecore_X_Window win)
2457{ 2460{
2458 E_Border *bd; 2461 E_Border *bd;
2459 2462
2460 bd = evas_hash_find(borders_hash, e_util_winid_str_get(win)); 2463 bd = eina_hash_find(borders_hash, e_util_winid_str_get(win));
2461 if ((bd) && (!e_object_is_del(E_OBJECT(bd))) && 2464 if ((bd) && (!e_object_is_del(E_OBJECT(bd))) &&
2462 (bd->bg_win == win)) 2465 (bd->bg_win == win))
2463 return bd; 2466 return bd;
@@ -2468,8 +2471,8 @@ EAPI E_Border *
2468e_border_find_by_window(Ecore_X_Window win) 2471e_border_find_by_window(Ecore_X_Window win)
2469{ 2472{
2470 E_Border *bd; 2473 E_Border *bd;
2471 2474
2472 bd = evas_hash_find(borders_hash, e_util_winid_str_get(win)); 2475 bd = eina_hash_find(borders_hash, e_util_winid_str_get(win));
2473 if ((bd) && (!e_object_is_del(E_OBJECT(bd))) && 2476 if ((bd) && (!e_object_is_del(E_OBJECT(bd))) &&
2474 (bd->win == win)) 2477 (bd->win == win))
2475 return bd; 2478 return bd;
@@ -3709,13 +3712,13 @@ _e_border_free(E_Border *bd)
3709 e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); 3712 e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win);
3710 ecore_x_window_del(bd->win); 3713 ecore_x_window_del(bd->win);
3711 3714
3712 borders_hash = evas_hash_del(borders_hash, e_util_winid_str_get(bd->client.win), bd); 3715 eina_hash_del(borders_hash, e_util_winid_str_get(bd->client.win), bd);
3713 borders_hash = evas_hash_del(borders_hash, e_util_winid_str_get(bd->bg_win), bd); 3716 eina_hash_del(borders_hash, e_util_winid_str_get(bd->bg_win), bd);
3714 borders_hash = evas_hash_del(borders_hash, e_util_winid_str_get(bd->win), bd); 3717 eina_hash_del(borders_hash, e_util_winid_str_get(bd->win), bd);
3715 borders = eina_list_remove(borders, bd); 3718 borders = eina_list_remove(borders, bd);
3716 focus_stack = eina_list_remove(focus_stack, bd); 3719 focus_stack = eina_list_remove(focus_stack, bd);
3717 raise_stack = eina_list_remove(raise_stack, bd); 3720 raise_stack = eina_list_remove(raise_stack, bd);
3718 3721
3719 e_container_border_remove(bd); 3722 e_container_border_remove(bd);
3720 free(bd); 3723 free(bd);
3721} 3724}
diff --git a/src/bin/e_config_data.c b/src/bin/e_config_data.c
index b2eee670d..d15699b7f 100644
--- a/src/bin/e_config_data.c
+++ b/src/bin/e_config_data.c
@@ -17,11 +17,11 @@ e_config_descriptor_new(const char *name, int size)
17 eddc.func.list_append = (void *(*)(void *l, void *d)) eina_list_append; 17 eddc.func.list_append = (void *(*)(void *l, void *d)) eina_list_append;
18 eddc.func.list_data = (void *(*)(void *)) eina_list_data_get; 18 eddc.func.list_data = (void *(*)(void *)) eina_list_data_get;
19 eddc.func.list_free = (void *(*)(void *)) eina_list_free; 19 eddc.func.list_free = (void *(*)(void *)) eina_list_free;
20 eddc.func.hash_foreach = 20 eddc.func.hash_foreach =
21 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *)) 21 (void (*) (const Eina_Hash *, Eina_Bool (*) (const Eina_Hash *, const void *, void *, void *), const void *))
22 evas_hash_foreach; 22 eina_hash_foreach;
23 eddc.func.hash_add = (void *(*) (void *, const char *, void *)) evas_hash_add; 23 eddc.func.hash_add = (Eina_Hash* (*) (Eina_Hash *, const void *, void *)) eet_eina_hash_add_alloc;
24 eddc.func.hash_free = (void (*) (void *)) evas_hash_free; 24 eddc.func.hash_free = (void (*) (Eina_Hash *)) eina_hash_free;
25 eddc.name = name; 25 eddc.name = name;
26 eddc.size = size; 26 eddc.size = size;
27 return (E_Config_DD *)eet_data_descriptor2_new(&eddc); 27 return (E_Config_DD *)eet_data_descriptor2_new(&eddc);
diff --git a/src/bin/e_config_data.h b/src/bin/e_config_data.h
index d27e4f826..0a38dea02 100644
--- a/src/bin/e_config_data.h
+++ b/src/bin/e_config_data.h
@@ -29,6 +29,15 @@ typedef Eet_Data_Descriptor E_Config_DD;
29#ifndef E_CONFIG_DATA_H 29#ifndef E_CONFIG_DATA_H
30#define E_CONFIG_DATA_H 30#define E_CONFIG_DATA_H
31 31
32static inline Eina_Hash *
33eet_eina_hash_add_alloc(Eina_Hash *hash, const void *key, void *data)
34{
35 if (!hash) hash = eina_hash_string_superfast_new(NULL);
36 if (!hash) return NULL;
37 eina_hash_add(hash, key, data);
38 return hash;
39}
40
32EAPI E_Config_DD *e_config_descriptor_new(const char *name, int size); 41EAPI E_Config_DD *e_config_descriptor_new(const char *name, int size);
33 42
34#endif 43#endif
diff --git a/src/bin/e_configure.c b/src/bin/e_configure.c
index 3b24f9856..1179b23af 100644
--- a/src/bin/e_configure.c
+++ b/src/bin/e_configure.c
@@ -92,11 +92,11 @@ _e_configure_efreet_desktop_update(void)
92 label = NULL; 92 label = NULL;
93 if (desktop->x) 93 if (desktop->x)
94 { 94 {
95 cfg_cat_cfg = ecore_hash_get(desktop->x, "X-Enlightenment-Config-Category"); 95 cfg_cat_cfg = eina_hash_find(desktop->x, "X-Enlightenment-Config-Category");
96 s = ecore_hash_get(desktop->x, "X-Enlightenment-Config-Priority"); 96 s = eina_hash_find(desktop->x, "X-Enlightenment-Config-Priority");
97 if (s) cfg_pri = atoi(s); 97 if (s) cfg_pri = atoi(s);
98 cfg_cat_name = ecore_hash_get(desktop->x, "X-Enlightenment-Config-Category-Name"); 98 cfg_cat_name = eina_hash_find(desktop->x, "X-Enlightenment-Config-Category-Name");
99 cfg_cat_icon = ecore_hash_get(desktop->x, "X-Enlightenment-Config-Category-Icon"); 99 cfg_cat_icon = eina_hash_find(desktop->x, "X-Enlightenment-Config-Category-Icon");
100 if (cfg_cat_icon) 100 if (cfg_cat_icon)
101 { 101 {
102 if (cfg_cat_icon[0] == '/') 102 if (cfg_cat_icon[0] == '/')
diff --git a/src/bin/e_datastore.c b/src/bin/e_datastore.c
index 7364a2684..d9676a239 100644
--- a/src/bin/e_datastore.c
+++ b/src/bin/e_datastore.c
@@ -6,26 +6,30 @@
6/* local subsystem functions */ 6/* local subsystem functions */
7 7
8/* local subsystem globals */ 8/* local subsystem globals */
9static Evas_Hash *store = NULL; 9static Eina_Hash *store = NULL;
10 10
11/* externally accessible functions */ 11/* externally accessible functions */
12EAPI void 12EAPI void
13e_datastore_set(char *key, void *data) 13e_datastore_set(char *key, void *data)
14{ 14{
15 store = evas_hash_del(store, key, NULL); 15 if (!store) store = eina_hash_string_superfast_new(NULL);
16 store = evas_hash_add(store, key, data); 16 eina_hash_del(store, key, NULL);
17 eina_hash_add(store, key, data);
17} 18}
18 19
19EAPI void * 20EAPI void *
20e_datastore_get(char *key) 21e_datastore_get(char *key)
21{ 22{
22 return evas_hash_find(store, key); 23 return eina_hash_find(store, key);
23} 24}
24 25
25EAPI void 26EAPI void
26e_datastore_del(char *key) 27e_datastore_del(char *key)
27{ 28{
28 store = evas_hash_del(store, key, NULL); 29 eina_hash_del(store, key, NULL);
30 if (eina_hash_population(store)) return;
31 eina_hash_free(store);
32 store = NULL;
29} 33}
30 34
31/* local subsystem functions */ 35/* local subsystem functions */
diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c
index b91cee8cb..07311f4bd 100644
--- a/src/bin/e_dnd.c
+++ b/src/bin/e_dnd.c
@@ -55,7 +55,7 @@ struct _XDnd
55 55
56static Eina_List *_event_handlers = NULL; 56static Eina_List *_event_handlers = NULL;
57static Eina_List *_drop_handlers = NULL; 57static Eina_List *_drop_handlers = NULL;
58static Evas_Hash *_drop_win_hash = NULL; 58static Eina_Hash *_drop_win_hash = NULL;
59 59
60static Ecore_X_Window _drag_win = 0; 60static Ecore_X_Window _drag_win = 0;
61static Ecore_X_Window _drag_win_root = 0; 61static Ecore_X_Window _drag_win_root = 0;
@@ -65,7 +65,7 @@ static E_Drag *_drag_current = NULL;
65 65
66static XDnd *_xdnd = NULL; 66static XDnd *_xdnd = NULL;
67 67
68static Evas_Hash *_drop_handlers_responsives; 68static Eina_Hash *_drop_handlers_responsives;
69static Ecore_X_Atom _action; 69static Ecore_X_Atom _action;
70 70
71/* externally accessible functions */ 71/* externally accessible functions */
@@ -73,6 +73,9 @@ static Ecore_X_Atom _action;
73EAPI int 73EAPI int
74e_dnd_init(void) 74e_dnd_init(void)
75{ 75{
76 _drop_win_hash = eina_hash_string_superfast_new(NULL);
77 _drop_handlers_responsives = eina_hash_string_superfast_new(NULL);
78
76 _event_handlers = eina_list_append(_event_handlers, 79 _event_handlers = eina_list_append(_event_handlers,
77 ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, 80 ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP,
78 _e_dnd_cb_mouse_up, NULL)); 81 _e_dnd_cb_mouse_up, NULL));
@@ -138,11 +141,11 @@ e_dnd_shutdown(void)
138 eina_list_free(_event_handlers); 141 eina_list_free(_event_handlers);
139 _event_handlers = NULL; 142 _event_handlers = NULL;
140 143
141 evas_hash_free(_drop_win_hash); 144 eina_hash_free(_drop_win_hash);
142 eina_list_free(_drop_handlers); 145 eina_list_free(_drop_handlers);
143 _drop_handlers = NULL; 146 _drop_handlers = NULL;
144 147
145 evas_hash_free(_drop_handlers_responsives); 148 eina_hash_free(_drop_handlers_responsives);
146 149
147 return 1; 150 return 1;
148} 151}
@@ -425,16 +428,16 @@ e_drop_xdnd_register_set(Ecore_X_Window win, int reg)
425 id = e_util_winid_str_get(win); 428 id = e_util_winid_str_get(win);
426 if (reg) 429 if (reg)
427 { 430 {
428 if (!evas_hash_find(_drop_win_hash, id)) 431 if (!eina_hash_find(_drop_win_hash, id))
429 { 432 {
430 ecore_x_dnd_aware_set(win, 1); 433 ecore_x_dnd_aware_set(win, 1);
431 _drop_win_hash = evas_hash_add(_drop_win_hash, id, (void *)1); 434 eina_hash_add(_drop_win_hash, id, (void *)1);
432 } 435 }
433 } 436 }
434 else 437 else
435 { 438 {
436 ecore_x_dnd_aware_set(win, 0); 439 ecore_x_dnd_aware_set(win, 0);
437 _drop_win_hash = evas_hash_del(_drop_win_hash, id, (void *) 1); 440 eina_hash_del(_drop_win_hash, id, (void *) 1);
438 } 441 }
439 return 1; 442 return 1;
440} 443}
@@ -514,7 +517,7 @@ e_drop_handler_responsive_set(E_Drop_Handler *handler)
514 Ecore_X_Window hwin = _e_drag_win_get(handler, 1); 517 Ecore_X_Window hwin = _e_drag_win_get(handler, 1);
515 const char *wid = e_util_winid_str_get(hwin); 518 const char *wid = e_util_winid_str_get(hwin);
516 519
517 _drop_handlers_responsives = evas_hash_add(_drop_handlers_responsives, wid, (void *)handler); 520 eina_hash_add(_drop_handlers_responsives, wid, (void *)handler);
518} 521}
519 522
520EAPI int 523EAPI int
@@ -523,7 +526,7 @@ e_drop_handler_responsive_get(E_Drop_Handler *handler)
523 Ecore_X_Window hwin = _e_drag_win_get(handler, 1); 526 Ecore_X_Window hwin = _e_drag_win_get(handler, 1);
524 const char *wid = e_util_winid_str_get(hwin); 527 const char *wid = e_util_winid_str_get(hwin);
525 528
526 return evas_hash_find(_drop_handlers_responsives, wid) == (void *)handler; 529 return eina_hash_find(_drop_handlers_responsives, wid) == (void *)handler;
527} 530}
528 531
529EAPI void 532EAPI void
@@ -1186,7 +1189,7 @@ _e_dnd_cb_event_dnd_enter(void *data, int type, void *event)
1186 1189
1187 ev = event; 1190 ev = event;
1188 id = e_util_winid_str_get(ev->win); 1191 id = e_util_winid_str_get(ev->win);
1189 if (!evas_hash_find(_drop_win_hash, id)) return 1; 1192 if (!eina_hash_find(_drop_win_hash, id)) return 1;
1190 for (l = _drop_handlers; l; l = l->next) 1193 for (l = _drop_handlers; l; l = l->next)
1191 { 1194 {
1192 E_Drop_Handler *h; 1195 E_Drop_Handler *h;
@@ -1258,7 +1261,7 @@ _e_dnd_cb_event_dnd_leave(void *data, int type, void *event)
1258 ev = event; 1261 ev = event;
1259 1262
1260 id = e_util_winid_str_get(ev->win); 1263 id = e_util_winid_str_get(ev->win);
1261 if (!evas_hash_find(_drop_win_hash, id)) return 1; 1264 if (!eina_hash_find(_drop_win_hash, id)) return 1;
1262 1265
1263 leave_ev.x = 0; 1266 leave_ev.x = 0;
1264 leave_ev.y = 0; 1267 leave_ev.y = 0;
@@ -1304,7 +1307,7 @@ _e_dnd_cb_event_dnd_position(void *data, int type, void *event)
1304 ev = event; 1307 ev = event;
1305// double t1 = ecore_time_get(); //// 1308// double t1 = ecore_time_get(); ////
1306 id = e_util_winid_str_get(ev->win); 1309 id = e_util_winid_str_get(ev->win);
1307 if (!evas_hash_find(_drop_win_hash, id)) 1310 if (!eina_hash_find(_drop_win_hash, id))
1308 { 1311 {
1309// double t2 = ecore_time_get() - t1; //// 1312// double t2 = ecore_time_get() - t1; ////
1310// printf("DND POS EV 1 %3.7f\n", t2); //// 1313// printf("DND POS EV 1 %3.7f\n", t2); ////
@@ -1396,7 +1399,7 @@ _e_dnd_cb_event_dnd_drop(void *data, int type, void *event)
1396 1399
1397 ev = event; 1400 ev = event;
1398 id = e_util_winid_str_get(ev->win); 1401 id = e_util_winid_str_get(ev->win);
1399 if (!evas_hash_find(_drop_win_hash, id)) return 1; 1402 if (!eina_hash_find(_drop_win_hash, id)) return 1;
1400 1403
1401 ecore_x_selection_xdnd_request(ev->win, _xdnd->type); 1404 ecore_x_selection_xdnd_request(ev->win, _xdnd->type);
1402 1405
@@ -1415,7 +1418,7 @@ _e_dnd_cb_event_dnd_selection(void *data, int type, void *event)
1415 1418
1416 ev = event; 1419 ev = event;
1417 id = e_util_winid_str_get(ev->win); 1420 id = e_util_winid_str_get(ev->win);
1418 if (!evas_hash_find(_drop_win_hash, id)) return 1; 1421 if (!eina_hash_find(_drop_win_hash, id)) return 1;
1419 if (ev->selection != ECORE_X_SELECTION_XDND) return 1; 1422 if (ev->selection != ECORE_X_SELECTION_XDND) return 1;
1420 1423
1421 if (!strcmp("text/uri-list", _xdnd->type)) 1424 if (!strcmp("text/uri-list", _xdnd->type))
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 6bcacc1b8..ac34878d9 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -47,7 +47,7 @@ static E_Exec_Instance *_e_exec_cb_exec(void *data, Efreet_Desktop *desktop, cha
47static int _e_exec_cb_expire_timer(void *data); 47static int _e_exec_cb_expire_timer(void *data);
48static int _e_exec_cb_exit(void *data, int type, void *event); 48static int _e_exec_cb_exit(void *data, int type, void *event);
49 49
50static Evas_Bool _e_exec_startup_id_pid_find(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *value, void *data); 50static Evas_Bool _e_exec_startup_id_pid_find(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *value, void *data);
51 51
52static void _e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_Del *event, Ecore_Exe_Event_Data *error, Ecore_Exe_Event_Data *read); 52static void _e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_Del *event, Ecore_Exe_Event_Data *error, Ecore_Exe_Event_Data *read);
53static void _fill_data(E_Config_Dialog_Data *cfdata); 53static void _fill_data(E_Config_Dialog_Data *cfdata);
@@ -60,7 +60,7 @@ static void _dialog_save_cb(void *data, void *data2);
60 60
61/* local subsystem globals */ 61/* local subsystem globals */
62static Eina_List *e_exec_start_pending = NULL; 62static Eina_List *e_exec_start_pending = NULL;
63static Evas_Hash *e_exec_instances = NULL; 63static Eina_Hash *e_exec_instances = NULL;
64static int startup_id = 0; 64static int startup_id = 0;
65 65
66static Ecore_Event_Handler *_e_exec_exit_handler = NULL; 66static Ecore_Event_Handler *_e_exec_exit_handler = NULL;
@@ -70,6 +70,8 @@ static Ecore_Event_Handler *_e_exec_border_add_handler = NULL;
70EAPI int 70EAPI int
71e_exec_init(void) 71e_exec_init(void)
72{ 72{
73 e_exec_instances = eina_hash_string_superfast_new(NULL);
74
73 _e_exec_exit_handler = 75 _e_exec_exit_handler =
74 ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _e_exec_cb_exit, NULL); 76 ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _e_exec_cb_exit, NULL);
75#if 0 77#if 0
@@ -89,7 +91,7 @@ e_exec_shutdown(void)
89 91
90 if (_e_exec_exit_handler) ecore_event_handler_del(_e_exec_exit_handler); 92 if (_e_exec_exit_handler) ecore_event_handler_del(_e_exec_exit_handler);
91 if (_e_exec_border_add_handler) ecore_event_handler_del(_e_exec_border_add_handler); 93 if (_e_exec_border_add_handler) ecore_event_handler_del(_e_exec_border_add_handler);
92 evas_hash_free(e_exec_instances); 94 eina_hash_free(e_exec_instances);
93 eina_list_free(e_exec_start_pending); 95 eina_list_free(e_exec_start_pending);
94 return 1; 96 return 1;
95} 97}
@@ -132,7 +134,7 @@ e_exec_startup_id_pid_find(int startup_id, pid_t pid)
132 search.desktop = NULL; 134 search.desktop = NULL;
133 search.startup_id = startup_id; 135 search.startup_id = startup_id;
134 search.pid = pid; 136 search.pid = pid;
135 evas_hash_foreach(e_exec_instances, _e_exec_startup_id_pid_find, &search); 137 eina_hash_foreach(e_exec_instances, _e_exec_startup_id_pid_find, &search);
136 return search.desktop; 138 return search.desktop;
137} 139}
138 140
@@ -242,16 +244,16 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
242 inst->launch_time = ecore_time_get(); 244 inst->launch_time = ecore_time_get();
243 inst->expire_timer = ecore_timer_add(10.0, _e_exec_cb_expire_timer, inst); 245 inst->expire_timer = ecore_timer_add(10.0, _e_exec_cb_expire_timer, inst);
244 246
245 l = evas_hash_find(e_exec_instances, desktop->orig_path); 247 l = eina_hash_find(e_exec_instances, desktop->orig_path);
246 if (l) 248 if (l)
247 { 249 {
248 l = eina_list_append(l, inst); 250 l = eina_list_append(l, inst);
249 evas_hash_modify(e_exec_instances, desktop->orig_path, l); 251 eina_hash_modify(e_exec_instances, desktop->orig_path, l);
250 } 252 }
251 else 253 else
252 { 254 {
253 l = eina_list_append(l, inst); 255 l = eina_list_append(l, inst);
254 e_exec_instances = evas_hash_add(e_exec_instances, desktop->orig_path, l); 256 eina_hash_add(e_exec_instances, desktop->orig_path, l);
255 } 257 }
256 e_exec_start_pending = eina_list_append(e_exec_start_pending, desktop); 258 e_exec_start_pending = eina_list_append(e_exec_start_pending, desktop);
257 } 259 }
@@ -344,14 +346,14 @@ _e_exec_cb_exit(void *data, int type, void *event)
344 } 346 }
345 if (inst->desktop) 347 if (inst->desktop)
346 { 348 {
347 instances = evas_hash_find(e_exec_instances, inst->desktop->orig_path); 349 instances = eina_hash_find(e_exec_instances, inst->desktop->orig_path);
348 if (instances) 350 if (instances)
349 { 351 {
350 instances = eina_list_remove(instances, inst); 352 instances = eina_list_remove(instances, inst);
351 if (instances) 353 if (instances)
352 evas_hash_modify(e_exec_instances, inst->desktop->orig_path, instances); 354 eina_hash_modify(e_exec_instances, inst->desktop->orig_path, instances);
353 else 355 else
354 e_exec_instances = evas_hash_del(e_exec_instances, inst->desktop->orig_path, NULL); 356 eina_hash_del(e_exec_instances, inst->desktop->orig_path, NULL);
355 } 357 }
356 } 358 }
357 e_exec_start_pending = eina_list_remove(e_exec_start_pending, inst->desktop); 359 e_exec_start_pending = eina_list_remove(e_exec_start_pending, inst->desktop);
@@ -362,7 +364,7 @@ _e_exec_cb_exit(void *data, int type, void *event)
362} 364}
363 365
364static Evas_Bool 366static Evas_Bool
365_e_exec_startup_id_pid_find(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *value, void *data) 367_e_exec_startup_id_pid_find(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *value, void *data)
366{ 368{
367 E_Exec_Search *search; 369 E_Exec_Search *search;
368 Eina_List *instances, *l; 370 Eina_List *instances, *l;
diff --git a/src/bin/e_filereg.c b/src/bin/e_filereg.c
index 2a93d5957..ef342e943 100644
--- a/src/bin/e_filereg.c
+++ b/src/bin/e_filereg.c
@@ -8,7 +8,7 @@
8 * currently being used by E in core components should be registered 8 * currently being used by E in core components should be registered
9 * here and will be protected as best as E can. :) 9 * here and will be protected as best as E can. :)
10 */ 10 */
11static Evas_Hash *_e_filereg = NULL; 11static Eina_Hash *_e_filereg = NULL;
12 12
13typedef struct _Filereg_Item Filereg_Item; 13typedef struct _Filereg_Item Filereg_Item;
14struct _Filereg_Item 14struct _Filereg_Item
@@ -17,33 +17,35 @@ struct _Filereg_Item
17 int ref_count; 17 int ref_count;
18}; 18};
19 19
20static Evas_Bool _filereg_hash_cb_free(const Evas_Hash *hash __UNUSED__, 20static Eina_Bool _filereg_hash_cb_free(const Eina_Hash *hash __UNUSED__,
21 const void *key __UNUSED__, 21 const void *key __UNUSED__,
22 void *data, void *fdata __UNUSED__); 22 void *data, void *fdata __UNUSED__);
23 23
24/* Externally accessible functions */ 24/* Externally accessible functions */
25EAPI int 25EAPI int
26e_filereg_init(void) 26e_filereg_init(void)
27{ 27{
28 _e_filereg = eina_hash_string_superfast_new(NULL);
29
28 return 1; 30 return 1;
29} 31}
30 32
31EAPI int 33EAPI int
32e_filereg_shutdown(void) 34e_filereg_shutdown(void)
33{ 35{
34 evas_hash_foreach(_e_filereg, _filereg_hash_cb_free, NULL); 36 eina_hash_foreach(_e_filereg, _filereg_hash_cb_free, NULL);
35 evas_hash_free(_e_filereg); 37 eina_hash_free(_e_filereg);
36 _e_filereg = NULL; 38 _e_filereg = NULL;
37 return 1; 39 return 1;
38} 40}
39 41
40EAPI int 42EAPI int
41e_filereg_register(const char *path) 43e_filereg_register(const char *path)
42{ 44{
43 Filereg_Item *fi = NULL; 45 Filereg_Item *fi = NULL;
44 46
45 fi = evas_hash_find(_e_filereg, path); 47 fi = eina_hash_find(_e_filereg, path);
46 if (fi) 48 if (fi)
47 { 49 {
48 fi->ref_count++; 50 fi->ref_count++;
49 return 1; 51 return 1;
@@ -52,22 +54,22 @@ e_filereg_register(const char *path)
52 if (!fi) return 0; 54 if (!fi) return 0;
53 fi->path = eina_stringshare_add(path); 55 fi->path = eina_stringshare_add(path);
54 fi->ref_count = 1; 56 fi->ref_count = 1;
55 _e_filereg = evas_hash_add(_e_filereg, path, fi); 57 eina_hash_add(_e_filereg, path, fi);
56 return 1; 58 return 1;
57} 59}
58 60
59EAPI void 61EAPI void
60e_filereg_deregister(const char *path) 62e_filereg_deregister(const char *path)
61{ 63{
62 Filereg_Item *fi = NULL; 64 Filereg_Item *fi = NULL;
63 65
64 fi = evas_hash_find(_e_filereg, path); 66 fi = eina_hash_find(_e_filereg, path);
65 if (fi) 67 if (fi)
66 { 68 {
67 fi->ref_count--; 69 fi->ref_count--;
68 if (fi->ref_count == 0) 70 if (fi->ref_count == 0)
69 { 71 {
70 _e_filereg = evas_hash_del(_e_filereg, path, fi); 72 eina_hash_del(_e_filereg, path, fi);
71 if (fi->path) eina_stringshare_del(fi->path); 73 if (fi->path) eina_stringshare_del(fi->path);
72 E_FREE(fi); 74 E_FREE(fi);
73 } 75 }
@@ -75,22 +77,22 @@ e_filereg_deregister(const char *path)
75} 77}
76 78
77EAPI Evas_Bool 79EAPI Evas_Bool
78e_filereg_file_protected(const char *path) 80e_filereg_file_protected(const char *path)
79{ 81{
80 Filereg_Item *fi = NULL; 82 Filereg_Item *fi = NULL;
81 83
82 fi = evas_hash_find(_e_filereg, path); 84 fi = eina_hash_find(_e_filereg, path);
83 if (!fi) return 0; 85 if (!fi) return 0;
84 else return 1; 86 else return 1;
85} 87}
86 88
87/* Private Functions */ 89/* Private Functions */
88static Evas_Bool 90static Evas_Bool
89_filereg_hash_cb_free(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 91_filereg_hash_cb_free(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
90 void *data, void *fdata __UNUSED__) 92 void *data, void *fdata __UNUSED__)
91{ 93{
92 Filereg_Item *fi; 94 Filereg_Item *fi;
93 95
94 fi = data; 96 fi = data;
95 if (!fi) return 1; 97 if (!fi) return 1;
96 if (fi->path) eina_stringshare_del(fi->path); 98 if (fi->path) eina_stringshare_del(fi->path);
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 5173aae5e..e227ffb0b 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -3922,7 +3922,7 @@ _e_fm2_icon_desktop_load(E_Fm2_Icon *ic)
3922 { 3922 {
3923 const char *type; 3923 const char *type;
3924 3924
3925 type = ecore_hash_get(desktop->x, "X-Enlightenment-Type"); 3925 type = eina_hash_find(desktop->x, "X-Enlightenment-Type");
3926 if (type) 3926 if (type)
3927 { 3927 {
3928 if (!strcmp(type, "Mount")) ic->info.mount = 1; 3928 if (!strcmp(type, "Mount")) ic->info.mount = 1;
@@ -3937,7 +3937,7 @@ _e_fm2_icon_desktop_load(E_Fm2_Icon *ic)
3937 goto error; 3937 goto error;
3938 } 3938 }
3939 } 3939 }
3940 type = ecore_hash_get(desktop->x, "X-Enlightenment-Removable-State"); 3940 type = eina_hash_find(desktop->x, "X-Enlightenment-Removable-State");
3941 if (type) 3941 if (type)
3942 { 3942 {
3943 if (!strcmp(type, "Full")) 3943 if (!strcmp(type, "Full"))
diff --git a/src/bin/e_fm_custom.c b/src/bin/e_fm_custom.c
index 677c4ada6..c4005da45 100644
--- a/src/bin/e_fm_custom.c
+++ b/src/bin/e_fm_custom.c
@@ -3,12 +3,12 @@
3 */ 3 */
4#include "e.h" 4#include "e.h"
5 5
6static Evas_Bool _e_fm2_custom_file_hash_foreach_list(const Evas_Hash *hash, const void *key, void *data, void *fdata); 6static Eina_Bool _e_fm2_custom_file_hash_foreach_list(const Eina_Hash *hash, const void *key, void *data, void *fdata);
7static Eina_List *_e_fm2_custom_hash_key_base_list(Evas_Hash *hash, const char *str); 7static Eina_List *_e_fm2_custom_hash_key_base_list(Eina_Hash *hash, const char *str);
8//static Evas_Bool _e_fm2_custom_file_hash_foreach_sub_list(Evas_Hash *hash, const char *key, void *data, void *fdata); 8//static Eina_Bool _e_fm2_custom_file_hash_foreach_sub_list(Eina_Hash *hash, const char *key, void *data, void *fdata);
9//static Eina_List *_e_fm2_custom_hash_key_sub_list(Evas_Hash *hash, const char *str); 9//static Eina_List *_e_fm2_custom_hash_key_sub_list(Eina_Hash *hash, const char *str);
10static Evas_Bool _e_fm2_custom_file_hash_foreach(const Evas_Hash *hash, const void *key, void *data, void *fdata); 10static Eina_Bool _e_fm2_custom_file_hash_foreach(const Eina_Hash *hash, const void *key, void *data, void *fdata);
11static Evas_Bool _e_fm2_custom_file_hash_foreach_save(const Evas_Hash *hash, const void *key, void *data, void *fdata); 11static Eina_Bool _e_fm2_custom_file_hash_foreach_save(const Eina_Hash *hash, const void *key, void *data, void *fdata);
12static void _e_fm2_custom_file_info_load(void); 12static void _e_fm2_custom_file_info_load(void);
13static void _e_fm2_custom_file_info_save(void); 13static void _e_fm2_custom_file_info_save(void);
14static void _e_fm2_custom_file_info_free(void); 14static void _e_fm2_custom_file_info_free(void);
@@ -17,10 +17,9 @@ static void _e_fm2_custom_file_cb_defer_save(void *data);
17static E_Powersave_Deferred_Action*_e_fm2_flush_defer = NULL; 17static E_Powersave_Deferred_Action*_e_fm2_flush_defer = NULL;
18static Eet_File *_e_fm2_custom_file = NULL; 18static Eet_File *_e_fm2_custom_file = NULL;
19static Eet_Data_Descriptor *_e_fm2_custom_file_edd = NULL; 19static Eet_Data_Descriptor *_e_fm2_custom_file_edd = NULL;
20static Evas_Hash *_e_fm2_custom_hash = NULL; 20static Eina_Hash *_e_fm2_custom_hash = NULL;
21static int _e_fm2_custom_writes = 0; 21static int _e_fm2_custom_writes = 0;
22 22
23
24/* FIXME: this uses a flat path key for custom file info. this is fine as 23/* FIXME: this uses a flat path key for custom file info. this is fine as
25 * long as we only expect a limited number of custom info nodes. if we 24 * long as we only expect a limited number of custom info nodes. if we
26 * start to see whole dire trees stored this way things will suck. we need 25 * start to see whole dire trees stored this way things will suck. we need
@@ -44,14 +43,14 @@ e_fm2_custom_file_init(void)
44 eddc.func.list_free = (void *(*)(void *)) eina_list_free; 43 eddc.func.list_free = (void *(*)(void *)) eina_list_free;
45 eddc.func.hash_foreach = 44 eddc.func.hash_foreach =
46 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *)) 45 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))
47 evas_hash_foreach; 46 eina_hash_foreach;
48 eddc.func.hash_add = (void *(*) (void *, const char *, void *)) evas_hash_add; 47 eddc.func.hash_add = (void* (*) (void *, const char *, void *)) eet_eina_hash_add_alloc;
49 eddc.func.hash_free = (void (*) (void *)) evas_hash_free; 48 eddc.func.hash_free = (void (*) (Eina_Hash *)) eina_hash_free;
50 eddc.name = "e_fm_custom_file"; 49 eddc.name = "e_fm_custom_file";
51 eddc.size = sizeof(E_Fm2_Custom_File); 50 eddc.size = sizeof(E_Fm2_Custom_File);
52 51
53 _e_fm2_custom_file_edd = eet_data_descriptor2_new(&eddc); 52 _e_fm2_custom_file_edd = eet_data_descriptor2_new(&eddc);
54#define DAT(x, y, z) EET_DATA_DESCRIPTOR_ADD_BASIC(_e_fm2_custom_file_edd, E_Fm2_Custom_File, x, y, z) 53#define DAT(x, y, z) EET_DATA_DESCRIPTOR_ADD_BASIC(_e_fm2_custom_file_edd, E_Fm2_Custom_File, x, y, z)
55 DAT("g.x", geom.x, EET_T_INT); 54 DAT("g.x", geom.x, EET_T_INT);
56 DAT("g.y", geom.y, EET_T_INT); 55 DAT("g.y", geom.y, EET_T_INT);
57 DAT("g.w", geom.w, EET_T_INT); 56 DAT("g.w", geom.w, EET_T_INT);
@@ -85,11 +84,11 @@ EAPI E_Fm2_Custom_File *
85e_fm2_custom_file_get(const char *path) 84e_fm2_custom_file_get(const char *path)
86{ 85{
87 E_Fm2_Custom_File *cf; 86 E_Fm2_Custom_File *cf;
88 87
89 _e_fm2_custom_file_info_load(); 88 _e_fm2_custom_file_info_load();
90 if (!_e_fm2_custom_file) return NULL; 89 if (!_e_fm2_custom_file) return NULL;
91 if (_e_fm2_flush_defer) e_fm2_custom_file_flush(); 90 if (_e_fm2_flush_defer) e_fm2_custom_file_flush();
92 cf = evas_hash_find(_e_fm2_custom_hash, path); 91 cf = eina_hash_find(_e_fm2_custom_hash, path);
93 return cf; 92 return cf;
94} 93}
95 94
@@ -99,10 +98,10 @@ e_fm2_custom_file_set(const char *path, E_Fm2_Custom_File *cf)
99 _e_fm2_custom_file_info_load(); 98 _e_fm2_custom_file_info_load();
100 if (!_e_fm2_custom_file) return; 99 if (!_e_fm2_custom_file) return;
101 if (_e_fm2_flush_defer) e_fm2_custom_file_flush(); 100 if (_e_fm2_flush_defer) e_fm2_custom_file_flush();
102 if (evas_hash_find(_e_fm2_custom_hash, path) != cf) 101 if (eina_hash_find(_e_fm2_custom_hash, path) != cf)
103 { 102 {
104 E_Fm2_Custom_File *cf2; 103 E_Fm2_Custom_File *cf2;
105 104
106 cf2 = calloc(1, sizeof(E_Fm2_Custom_File)); 105 cf2 = calloc(1, sizeof(E_Fm2_Custom_File));
107 if (cf2) 106 if (cf2)
108 { 107 {
@@ -111,7 +110,9 @@ e_fm2_custom_file_set(const char *path, E_Fm2_Custom_File *cf)
111 cf2->icon.icon = eina_stringshare_add(cf->icon.icon); 110 cf2->icon.icon = eina_stringshare_add(cf->icon.icon);
112 if (cf->label) 111 if (cf->label)
113 cf2->label = eina_stringshare_add(cf->label); 112 cf2->label = eina_stringshare_add(cf->label);
114 _e_fm2_custom_hash = evas_hash_add(_e_fm2_custom_hash, path, cf2); 113 if (!_e_fm2_custom_hash)
114 _e_fm2_custom_hash = eina_hash_string_superfast_new(NULL);
115 eina_hash_add(_e_fm2_custom_hash, path, cf2);
115 } 116 }
116 } 117 }
117 _e_fm2_custom_writes = 1; 118 _e_fm2_custom_writes = 1;
@@ -122,21 +123,20 @@ e_fm2_custom_file_del(const char *path)
122{ 123{
123 Eina_List *list, *l; 124 Eina_List *list, *l;
124 E_Fm2_Custom_File *cf2; 125 E_Fm2_Custom_File *cf2;
125 126
126 _e_fm2_custom_file_info_load(); 127 _e_fm2_custom_file_info_load();
127 if (!_e_fm2_custom_file) return; 128 if (!_e_fm2_custom_file) return;
128 if (_e_fm2_flush_defer) e_fm2_custom_file_flush(); 129 if (_e_fm2_flush_defer) e_fm2_custom_file_flush();
129 130
130 list = _e_fm2_custom_hash_key_base_list(_e_fm2_custom_hash, path); 131 list = _e_fm2_custom_hash_key_base_list(_e_fm2_custom_hash, path);
131 if (list) 132 if (list)
132 { 133 {
133 for (l = list; l; l = l->next) 134 for (l = list; l; l = l->next)
134 { 135 {
135 cf2 = evas_hash_find(_e_fm2_custom_hash, l->data); 136 cf2 = eina_hash_find(_e_fm2_custom_hash, l->data);
136 if (cf2) 137 if (cf2)
137 { 138 {
138 _e_fm2_custom_hash = evas_hash_del(_e_fm2_custom_hash, 139 eina_hash_del(_e_fm2_custom_hash, l->data, cf2);
139 l->data, cf2);
140 if (cf2->icon.icon) eina_stringshare_del(cf2->icon.icon); 140 if (cf2->icon.icon) eina_stringshare_del(cf2->icon.icon);
141 if (cf2->label) eina_stringshare_del(cf2->label); 141 if (cf2->label) eina_stringshare_del(cf2->label);
142 free(cf2); 142 free(cf2);
@@ -156,42 +156,40 @@ e_fm2_custom_file_rename(const char *path, const char *new_path)
156 _e_fm2_custom_file_info_load(); 156 _e_fm2_custom_file_info_load();
157 if (!_e_fm2_custom_file) return; 157 if (!_e_fm2_custom_file) return;
158 if (_e_fm2_flush_defer) e_fm2_custom_file_flush(); 158 if (_e_fm2_flush_defer) e_fm2_custom_file_flush();
159 cf2 = evas_hash_find(_e_fm2_custom_hash, path); 159 cf2 = eina_hash_find(_e_fm2_custom_hash, path);
160 if (cf2) 160 if (cf2)
161 { 161 {
162 _e_fm2_custom_hash = evas_hash_del(_e_fm2_custom_hash, path, cf2); 162 eina_hash_del(_e_fm2_custom_hash, path, cf2);
163 cf = evas_hash_find(_e_fm2_custom_hash, new_path); 163 cf = eina_hash_find(_e_fm2_custom_hash, new_path);
164 if (cf) 164 if (cf)
165 { 165 {
166 if (cf->icon.icon) eina_stringshare_del(cf->icon.icon); 166 if (cf->icon.icon) eina_stringshare_del(cf->icon.icon);
167 if (cf->label) eina_stringshare_del(cf->label); 167 if (cf->label) eina_stringshare_del(cf->label);
168 free(cf); 168 free(cf);
169 } 169 }
170 _e_fm2_custom_hash = evas_hash_add(_e_fm2_custom_hash, new_path, cf2); 170 eina_hash_add(_e_fm2_custom_hash, new_path, cf2);
171 } 171 }
172 list = _e_fm2_custom_hash_key_base_list(_e_fm2_custom_hash, path); 172 list = _e_fm2_custom_hash_key_base_list(_e_fm2_custom_hash, path);
173 if (list) 173 if (list)
174 { 174 {
175 for (l = list; l; l = l->next) 175 for (l = list; l; l = l->next)
176 { 176 {
177 cf2 = evas_hash_find(_e_fm2_custom_hash, l->data); 177 cf2 = eina_hash_find(_e_fm2_custom_hash, l->data);
178 if (cf2) 178 if (cf2)
179 { 179 {
180 char buf[PATH_MAX]; 180 char buf[PATH_MAX];
181 181
182 strcpy(buf, new_path); 182 strcpy(buf, new_path);
183 strcat(buf, (char *)l->data + strlen(path)); 183 strcat(buf, (char *)l->data + strlen(path));
184 _e_fm2_custom_hash = evas_hash_del(_e_fm2_custom_hash, 184 eina_hash_del(_e_fm2_custom_hash, l->data, cf2);
185 l->data, cf2); 185 cf = eina_hash_find(_e_fm2_custom_hash, buf);
186 cf = evas_hash_find(_e_fm2_custom_hash, buf);
187 if (cf) 186 if (cf)
188 { 187 {
189 if (cf->icon.icon) eina_stringshare_del(cf->icon.icon); 188 if (cf->icon.icon) eina_stringshare_del(cf->icon.icon);
190 if (cf->label) eina_stringshare_del(cf->label); 189 if (cf->label) eina_stringshare_del(cf->label);
191 free(cf); 190 free(cf);
192 } 191 }
193 _e_fm2_custom_hash = evas_hash_add(_e_fm2_custom_hash, 192 eina_hash_add(_e_fm2_custom_hash, buf, cf2);
194 buf, cf2);
195 } 193 }
196 } 194 }
197 eina_list_free(list); 195 eina_list_free(list);
@@ -219,36 +217,35 @@ struct _E_Custom_List
219 int base_len; 217 int base_len;
220}; 218};
221 219
222static Evas_Bool 220static Eina_Bool
223_e_fm2_custom_file_hash_foreach_list(const Evas_Hash *hash, const void *key, void *data, void *fdata) 221_e_fm2_custom_file_hash_foreach_list(const Eina_Hash *hash, const void *key, void *data, void *fdata)
224{ 222{
225 struct _E_Custom_List *cl; 223 struct _E_Custom_List *cl;
226 224
227 cl = fdata; 225 cl = fdata;
228 if (!strncmp(cl->base, key, cl->base_len)) 226 if (!strncmp(cl->base, key, cl->base_len))
229 cl->l = eina_list_append(cl->l, key); 227 cl->l = eina_list_append(cl->l, key);
230 return 1; 228 return 1;
231} 229}
232 230
233static Eina_List * 231static Eina_List *
234_e_fm2_custom_hash_key_base_list(Evas_Hash *hash, const char *str) 232_e_fm2_custom_hash_key_base_list(Eina_Hash *hash, const char *str)
235{ 233{
236 struct _E_Custom_List cl; 234 struct _E_Custom_List cl;
237 235
238 cl.l = NULL; 236 cl.l = NULL;
239 cl.base = str; 237 cl.base = str;
240 cl.base_len = strlen(cl.base); 238 cl.base_len = strlen(cl.base);
241 evas_hash_foreach(hash, 239 eina_hash_foreach(hash, _e_fm2_custom_file_hash_foreach_list, &cl);
242 _e_fm2_custom_file_hash_foreach_list, &cl);
243 return cl.l; 240 return cl.l;
244} 241}
245 242
246/* 243/*
247static Evas_Bool 244static Eina_Bool
248_e_fm2_custom_file_hash_foreach_sub_list(const Evas_Hash *hash, const void *key, void *data, void *fdata) 245_e_fm2_custom_file_hash_foreach_sub_list(const Eina_Hash *hash, const void *key, void *data, void *fdata)
249{ 246{
250 struct _E_Custom_List *cl; 247 struct _E_Custom_List *cl;
251 248
252 cl = fdata; 249 cl = fdata;
253 if (!strncmp(cl->base, key, strlen(key))) 250 if (!strncmp(cl->base, key, strlen(key)))
254 cl->l = eina_list_append(cl->l, key); 251 cl->l = eina_list_append(cl->l, key);
@@ -258,23 +255,23 @@ _e_fm2_custom_file_hash_foreach_sub_list(const Evas_Hash *hash, const void *key,
258 255
259/* 256/*
260static Eina_List * 257static Eina_List *
261_e_fm2_custom_hash_key_sub_list(const Evas_Hash *hash, const void *str) 258_e_fm2_custom_hash_key_sub_list(const Eina_Hash *hash, const void *str)
262{ 259{
263 struct _E_Custom_List cl; 260 struct _E_Custom_List cl;
264 261
265 cl.l = NULL; 262 cl.l = NULL;
266 cl.base = str; 263 cl.base = str;
267 evas_hash_foreach(hash, 264 eina_hash_foreach(hash,
268 _e_fm2_custom_file_hash_foreach_sub_list, &cl); 265 _e_fm2_custom_file_hash_foreach_sub_list, &cl);
269 return cl.l; 266 return cl.l;
270} 267}
271*/ 268*/
272 269
273static Evas_Bool 270static Eina_Bool
274_e_fm2_custom_file_hash_foreach(const Evas_Hash *hash, const void *key, void *data, void *fdata) 271_e_fm2_custom_file_hash_foreach(const Eina_Hash *hash, const void *key, void *data, void *fdata)
275{ 272{
276 E_Fm2_Custom_File *cf; 273 E_Fm2_Custom_File *cf;
277 274
278 cf = data; 275 cf = data;
279 if (cf->icon.icon) eina_stringshare_del(cf->icon.icon); 276 if (cf->icon.icon) eina_stringshare_del(cf->icon.icon);
280 if (cf->label) eina_stringshare_del(cf->label); 277 if (cf->label) eina_stringshare_del(cf->label);
@@ -282,12 +279,12 @@ _e_fm2_custom_file_hash_foreach(const Evas_Hash *hash, const void *key, void *da
282 return 1; 279 return 1;
283} 280}
284 281
285static Evas_Bool 282static Eina_Bool
286_e_fm2_custom_file_hash_foreach_save(const Evas_Hash *hash, const void *key, void *data, void *fdata) 283_e_fm2_custom_file_hash_foreach_save(const Eina_Hash *hash, const void *key, void *data, void *fdata)
287{ 284{
288 Eet_File *ef; 285 Eet_File *ef;
289 E_Fm2_Custom_File *cf; 286 E_Fm2_Custom_File *cf;
290 287
291 ef = fdata; 288 ef = fdata;
292 cf = data; 289 cf = data;
293 eet_data_write(ef, _e_fm2_custom_file_edd, key, cf, 1); 290 eet_data_write(ef, _e_fm2_custom_file_edd, key, cf, 1);
@@ -320,8 +317,12 @@ _e_fm2_custom_file_info_load(void)
320 cf = eet_data_read(_e_fm2_custom_file, 317 cf = eet_data_read(_e_fm2_custom_file,
321 _e_fm2_custom_file_edd, list[i]); 318 _e_fm2_custom_file_edd, list[i]);
322 if (cf) 319 if (cf)
323 _e_fm2_custom_hash = evas_hash_add(_e_fm2_custom_hash, 320 {
324 list[i], cf); 321 if (!_e_fm2_custom_hash)
322 _e_fm2_custom_hash =
323 eina_hash_string_superfast_new(NULL);
324 eina_hash_add(_e_fm2_custom_hash, list[i], cf);
325 }
325 } 326 }
326 free(list); 327 free(list);
327 } 328 }
@@ -341,7 +342,7 @@ _e_fm2_custom_file_info_save(void)
341 e_user_homedir_get()); 342 e_user_homedir_get());
342 ef = eet_open(buf, EET_FILE_MODE_WRITE); 343 ef = eet_open(buf, EET_FILE_MODE_WRITE);
343 if (!ef) return; 344 if (!ef) return;
344 evas_hash_foreach(_e_fm2_custom_hash, 345 eina_hash_foreach(_e_fm2_custom_hash,
345 _e_fm2_custom_file_hash_foreach_save, ef); 346 _e_fm2_custom_file_hash_foreach_save, ef);
346 eet_close(ef); 347 eet_close(ef);
347 snprintf(buf2, sizeof(buf2), "%s/.e/e/fileman/custom.cfg", 348 snprintf(buf2, sizeof(buf2), "%s/.e/e/fileman/custom.cfg",
@@ -368,9 +369,9 @@ _e_fm2_custom_file_info_free(void)
368 } 369 }
369 if (_e_fm2_custom_hash) 370 if (_e_fm2_custom_hash)
370 { 371 {
371 evas_hash_foreach(_e_fm2_custom_hash, 372 eina_hash_foreach(_e_fm2_custom_hash,
372 _e_fm2_custom_file_hash_foreach, NULL); 373 _e_fm2_custom_file_hash_foreach, NULL);
373 evas_hash_free(_e_fm2_custom_hash); 374 eina_hash_free(_e_fm2_custom_hash);
374 _e_fm2_custom_hash = NULL; 375 _e_fm2_custom_hash = NULL;
375 } 376 }
376} 377}
diff --git a/src/bin/e_fm_main.c b/src/bin/e_fm_main.c
index 234321318..7cdcdcad8 100644
--- a/src/bin/e_fm_main.c
+++ b/src/bin/e_fm_main.c
@@ -39,9 +39,11 @@
39#include "config.h" 39#include "config.h"
40 40
41#define E_TYPEDEFS 41#define E_TYPEDEFS
42#include "e_config_data.h"
42#include "e_fm_op.h" 43#include "e_fm_op.h"
43#include "e_prefix.h" 44#include "e_prefix.h"
44#undef E_TYPEDEFS 45#undef E_TYPEDEFS
46#include "e_config_data.h"
45#include "e_fm_op.h" 47#include "e_fm_op.h"
46#include "e_prefix.h" 48#include "e_prefix.h"
47 49
diff --git a/src/bin/e_fm_mime.c b/src/bin/e_fm_mime.c
index 3a98dfaeb..4ad9e2428 100644
--- a/src/bin/e_fm_mime.c
+++ b/src/bin/e_fm_mime.c
@@ -12,12 +12,12 @@ struct _E_Fm2_Mime_Handler_Tuple
12}; 12};
13 13
14/* local subsystem functions */ 14/* local subsystem functions */
15static Evas_Bool _e_fm2_mime_handler_glob_match_foreach(const Evas_Hash *hash __UNUSED__, const void *key, void *data, void *fdata); 15static Eina_Bool _e_fm2_mime_handler_glob_match_foreach(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata);
16static Evas_Bool _e_fm_mime_icon_foreach(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata); 16static Eina_Bool _e_fm_mime_icon_foreach(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata);
17 17
18static Evas_Hash *icon_map = NULL; 18static Eina_Hash *icon_map = NULL;
19static Evas_Hash *_mime_handlers = NULL; 19static Eina_Hash *_mime_handlers = NULL;
20static Evas_Hash *_glob_handlers = NULL; 20static Eina_Hash *_glob_handlers = NULL;
21 21
22/* externally accessible functions */ 22/* externally accessible functions */
23EAPI const char * 23EAPI const char *
@@ -40,18 +40,18 @@ e_fm_mime_icon_get(const char *mime)
40 const char *homedir = NULL; 40 const char *homedir = NULL;
41 Eina_List *l = NULL; 41 Eina_List *l = NULL;
42 E_Config_Mime_Icon *mi; 42 E_Config_Mime_Icon *mi;
43 43
44 /* 0.0 clean out hash cache once it has mroe than 512 entries in it */ 44 /* 0.0 clean out hash cache once it has mroe than 512 entries in it */
45 if (evas_hash_size(icon_map) > 512) e_fm_mime_icon_cache_flush(); 45 if (eina_hash_population(icon_map) > 512) e_fm_mime_icon_cache_flush();
46 46
47 /* 0. look in mapping cache */ 47 /* 0. look in mapping cache */
48 val = evas_hash_find(icon_map, mime); 48 val = eina_hash_find(icon_map, mime);
49 if (val) return val; 49 if (val) return val;
50 50
51 ecore_strlcpy(buf2, mime, sizeof(buf2)); 51 ecore_strlcpy(buf2, mime, sizeof(buf2));
52 val = strchr(buf2, '/'); 52 val = strchr(buf2, '/');
53 if (val) *val = 0; 53 if (val) *val = 0;
54 54
55 /* 1. look up in mapping to file or thumb (thumb has flag)*/ 55 /* 1. look up in mapping to file or thumb (thumb has flag)*/
56 for (l = e_config->mime_icons; l; l = l->next) 56 for (l = e_config->mime_icons; l; l = l->next)
57 { 57 {
@@ -100,12 +100,13 @@ e_fm_mime_icon_get(const char *mime)
100 if (ecore_file_exists(buf)) goto ok; 100 if (ecore_file_exists(buf)) goto ok;
101 snprintf(buf, sizeof(buf), "%s/data/icons/%s.png", e_prefix_data_get(), buf2); 101 snprintf(buf, sizeof(buf), "%s/data/icons/%s.png", e_prefix_data_get(), buf2);
102 if (ecore_file_exists(buf)) goto ok; 102 if (ecore_file_exists(buf)) goto ok;
103 103
104 return NULL; 104 return NULL;
105 105
106 ok: 106 ok:
107 val = (char *)eina_stringshare_add(buf); 107 val = (char *)eina_stringshare_add(buf);
108 icon_map = evas_hash_add(icon_map, mime, val); 108 if (!icon_map) icon_map = eina_hash_string_superfast_new(NULL);
109 eina_hash_add(icon_map, mime, val);
109 return val; 110 return val;
110} 111}
111 112
@@ -113,20 +114,20 @@ EAPI void
113e_fm_mime_icon_cache_flush(void) 114e_fm_mime_icon_cache_flush(void)
114{ 115{
115 Eina_List *freelist = NULL; 116 Eina_List *freelist = NULL;
116 117
117 evas_hash_foreach(icon_map, _e_fm_mime_icon_foreach, &freelist); 118 eina_hash_foreach(icon_map, _e_fm_mime_icon_foreach, &freelist);
118 while (freelist) 119 while (freelist)
119 { 120 {
120 eina_stringshare_del(freelist->data); 121 eina_stringshare_del(freelist->data);
121 freelist = eina_list_remove_list(freelist, freelist); 122 freelist = eina_list_remove_list(freelist, freelist);
122 } 123 }
123 evas_hash_free(icon_map); 124 eina_hash_free(icon_map);
124 icon_map = NULL; 125 icon_map = NULL;
125} 126}
126 127
127/* create (allocate), set properties, and return a new mime handler */ 128/* create (allocate), set properties, and return a new mime handler */
128EAPI E_Fm2_Mime_Handler * 129EAPI E_Fm2_Mime_Handler *
129e_fm2_mime_handler_new(const char *label, const char *icon_group, 130e_fm2_mime_handler_new(const char *label, const char *icon_group,
130 void (*action_func) (Evas_Object *obj, const char *path, void *data), 131 void (*action_func) (Evas_Object *obj, const char *path, void *data),
131 void *action_data, 132 void *action_data,
132 int (test_func) (Evas_Object *obj, const char *path, void *data), 133 int (test_func) (Evas_Object *obj, const char *path, void *data),
@@ -145,22 +146,22 @@ e_fm2_mime_handler_new(const char *label, const char *icon_group,
145 handler->action_data = action_data; 146 handler->action_data = action_data;
146 handler->test_func = test_func; 147 handler->test_func = test_func;
147 handler->test_data = test_data; 148 handler->test_data = test_data;
148 149
149 return handler; 150 return handler;
150} 151}
151 152
152EAPI void 153EAPI void
153e_fm2_mime_handler_free(E_Fm2_Mime_Handler *handler) 154e_fm2_mime_handler_free(E_Fm2_Mime_Handler *handler)
154{ 155{
155 if (!handler) return; 156 if (!handler) return;
156 157
157 eina_stringshare_del(handler->label); 158 eina_stringshare_del(handler->label);
158 if (handler->icon_group) eina_stringshare_del(handler->icon_group); 159 if (handler->icon_group) eina_stringshare_del(handler->icon_group);
159 E_FREE(handler); 160 E_FREE(handler);
160} 161}
161 162
162/* associate a certain mime type with a handler */ 163/* associate a certain mime type with a handler */
163EAPI Evas_Bool 164EAPI Eina_Bool
164e_fm2_mime_handler_mime_add(E_Fm2_Mime_Handler *handler, const char *mime) 165e_fm2_mime_handler_mime_add(E_Fm2_Mime_Handler *handler, const char *mime)
165{ 166{
166 Eina_List *handlers = NULL; 167 Eina_List *handlers = NULL;
@@ -168,23 +169,24 @@ e_fm2_mime_handler_mime_add(E_Fm2_Mime_Handler *handler, const char *mime)
168 if ((!handler) || (!mime)) return 0; 169 if ((!handler) || (!mime)) return 0;
169 170
170 /* if there's an entry for this mime already, then append to its list */ 171 /* if there's an entry for this mime already, then append to its list */
171 if ((handlers = evas_hash_find(_mime_handlers, mime))) 172 if ((handlers = eina_hash_find(_mime_handlers, mime)))
172 { 173 {
173 handlers = eina_list_append(handlers, handler); 174 handlers = eina_list_append(handlers, handler);
174 evas_hash_modify(_mime_handlers, mime, handlers); 175 eina_hash_modify(_mime_handlers, mime, handlers);
175 } 176 }
176 else 177 else
177 { 178 {
178 /* no previous entry for this mime, lets add one */ 179 /* no previous entry for this mime, lets add one */
179 handlers = eina_list_append(handlers, handler); 180 handlers = eina_list_append(handlers, handler);
180 _mime_handlers = evas_hash_add(_mime_handlers, mime, handlers); 181 if (!_mime_handlers) _mime_handlers = eina_hash_string_superfast_new(NULL);
182 eina_hash_add(_mime_handlers, mime, handlers);
181 } 183 }
182 184
183 return 1; 185 return 1;
184} 186}
185 187
186/* associate a certain glob with a handler */ 188/* associate a certain glob with a handler */
187EAPI Evas_Bool 189EAPI Eina_Bool
188e_fm2_mime_handler_glob_add(E_Fm2_Mime_Handler *handler, const char *glob) 190e_fm2_mime_handler_glob_add(E_Fm2_Mime_Handler *handler, const char *glob)
189{ 191{
190 Eina_List *handlers = NULL; 192 Eina_List *handlers = NULL;
@@ -192,16 +194,17 @@ e_fm2_mime_handler_glob_add(E_Fm2_Mime_Handler *handler, const char *glob)
192 if ((!handler) || (!glob)) return 0; 194 if ((!handler) || (!glob)) return 0;
193 195
194 /* if there's an entry for this glob already, then append to its list */ 196 /* if there's an entry for this glob already, then append to its list */
195 if ((handlers = evas_hash_find(_glob_handlers, glob))) 197 if ((handlers = eina_hash_find(_glob_handlers, glob)))
196 { 198 {
197 handlers = eina_list_append(handlers, handler); 199 handlers = eina_list_append(handlers, handler);
198 evas_hash_modify(_glob_handlers, glob, handlers); 200 eina_hash_modify(_glob_handlers, glob, handlers);
199 } 201 }
200 else 202 else
201 { 203 {
202 /* no previous entry for this glob, lets add one */ 204 /* no previous entry for this glob, lets add one */
203 handlers = eina_list_append(handlers, handler); 205 handlers = eina_list_append(handlers, handler);
204 _glob_handlers = evas_hash_add(_glob_handlers, glob, handlers); 206 if (!_glob_handlers) _glob_handlers = eina_hash_string_superfast_new(NULL);
207 eina_hash_add(_glob_handlers, glob, handlers);
205 } 208 }
206 209
207 return 1; 210 return 1;
@@ -209,52 +212,66 @@ e_fm2_mime_handler_glob_add(E_Fm2_Mime_Handler *handler, const char *glob)
209 212
210/* delete a certain handler for a certian mime */ 213/* delete a certain handler for a certian mime */
211EAPI void 214EAPI void
212e_fm2_mime_handler_mime_del(E_Fm2_Mime_Handler *handler, const char *mime) 215e_fm2_mime_handler_mime_del(E_Fm2_Mime_Handler *handler, const char *mime)
213{ 216{
214 Eina_List *handlers = NULL; 217 Eina_List *handlers = NULL;
215 218
216 if ((!handler) || (!mime)) return; 219 if ((!handler) || (!mime)) return;
217 220
218 /* if there's an entry for this mime already, then remove from list */ 221 /* if there's an entry for this mime already, then remove from list */
219 if ((handlers = evas_hash_find(_mime_handlers, mime))) 222 if ((handlers = eina_hash_find(_mime_handlers, mime)))
220 { 223 {
221 handlers = eina_list_remove(handlers, handler); 224 handlers = eina_list_remove(handlers, handler);
222 if (handlers) 225 if (handlers)
223 evas_hash_modify(_mime_handlers, mime, handlers); 226 eina_hash_modify(_mime_handlers, mime, handlers);
224 else 227 else
225 _mime_handlers = evas_hash_del(_mime_handlers, mime, handlers); 228 {
229 eina_hash_del(_mime_handlers, mime, handlers);
230 if (!eina_hash_population(_mime_handlers))
231 {
232 eina_hash_free(_mime_handlers);
233 _mime_handlers = NULL;
234 }
235 }
226 } 236 }
227} 237}
228 238
229/* delete a certain handler for a certain glob */ 239/* delete a certain handler for a certain glob */
230EAPI void 240EAPI void
231e_fm2_mime_handler_glob_del(E_Fm2_Mime_Handler *handler, const char *glob) 241e_fm2_mime_handler_glob_del(E_Fm2_Mime_Handler *handler, const char *glob)
232{ 242{
233 Eina_List *handlers = NULL; 243 Eina_List *handlers = NULL;
234 244
235 if ((!handler) || (!glob)) return; 245 if ((!handler) || (!glob)) return;
236 246
237 /* if there's an entry for this glob already, then remove from list */ 247 /* if there's an entry for this glob already, then remove from list */
238 if ((handlers = evas_hash_find(_glob_handlers, glob))) 248 if ((handlers = eina_hash_find(_glob_handlers, glob)))
239 { 249 {
240 handlers = eina_list_remove(handlers, handler); 250 handlers = eina_list_remove(handlers, handler);
241 if (handlers) 251 if (handlers)
242 evas_hash_modify(_glob_handlers, glob, handlers); 252 eina_hash_modify(_glob_handlers, glob, handlers);
243 else 253 else
244 _glob_handlers = evas_hash_del(_glob_handlers, glob, handlers); 254 {
255 eina_hash_del(_glob_handlers, glob, handlers);
256 if (!eina_hash_population(_glob_handlers))
257 {
258 eina_hash_free(_glob_handlers);
259 _glob_handlers = NULL;
260 }
261 }
245 } 262 }
246} 263}
247 264
248/* get the list of mime handlers for a mime. 265/* get the list of mime handlers for a mime.
249 NOTE: the list should be free()'ed */ 266 NOTE: the list should be free()'ed */
250EAPI Eina_List * 267EAPI Eina_List *
251e_fm2_mime_handler_mime_handlers_get(const char *mime) 268e_fm2_mime_handler_mime_handlers_get(const char *mime)
252{ 269{
253 if ((!mime) || (!_mime_handlers)) return NULL; 270 if ((!mime) || (!_mime_handlers)) return NULL;
254 return evas_hash_find(_mime_handlers, mime); 271 return eina_hash_find(_mime_handlers, mime);
255} 272}
256 273
257/* get the list of glob handlers for a glob. 274/* get the list of glob handlers for a glob.
258 NOTE: the list should be free()'ed */ 275 NOTE: the list should be free()'ed */
259EAPI Eina_List * 276EAPI Eina_List *
260e_fm2_mime_handler_glob_handlers_get(const char *glob) 277e_fm2_mime_handler_glob_handlers_get(const char *glob)
@@ -267,14 +284,14 @@ e_fm2_mime_handler_glob_handlers_get(const char *glob)
267 tuple = E_NEW(E_Fm2_Mime_Handler_Tuple, 1); 284 tuple = E_NEW(E_Fm2_Mime_Handler_Tuple, 1);
268 tuple->list = NULL; 285 tuple->list = NULL;
269 tuple->str = glob; 286 tuple->str = glob;
270 evas_hash_foreach(_glob_handlers, _e_fm2_mime_handler_glob_match_foreach, tuple); 287 eina_hash_foreach(_glob_handlers, _e_fm2_mime_handler_glob_match_foreach, tuple);
271 handlers = tuple->list; 288 handlers = tuple->list;
272 E_FREE(tuple); 289 E_FREE(tuple);
273 return handlers; 290 return handlers;
274} 291}
275 292
276/* call a certain handler */ 293/* call a certain handler */
277EAPI Evas_Bool 294EAPI Eina_Bool
278e_fm2_mime_handler_call(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const char *path) 295e_fm2_mime_handler_call(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const char *path)
279{ 296{
280 if ((!handler) || (!obj) || (!path) || (!handler->action_func)) 297 if ((!handler) || (!obj) || (!path) || (!handler->action_func))
@@ -353,15 +370,15 @@ e_fm2_mime_handler_test(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const cha
353 370
354/* local subsystem functions */ 371/* local subsystem functions */
355/* used to loop a glob hash and determine if the glob handler matches the filename */ 372/* used to loop a glob hash and determine if the glob handler matches the filename */
356static Evas_Bool 373static Eina_Bool
357_e_fm2_mime_handler_glob_match_foreach(const Evas_Hash *hash __UNUSED__, const void *key, void *data, void *fdata) 374_e_fm2_mime_handler_glob_match_foreach(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata)
358{ 375{
359 E_Fm2_Mime_Handler_Tuple *tuple; 376 E_Fm2_Mime_Handler_Tuple *tuple;
360 Eina_List *handlers = NULL; 377 Eina_List *handlers = NULL;
361 Eina_List *l = NULL; 378 Eina_List *l = NULL;
362 379
363 tuple = fdata; 380 tuple = fdata;
364 if (e_util_glob_match(tuple->str, key)) 381 if (e_util_glob_match(tuple->str, key))
365 { 382 {
366 handlers = data; 383 handlers = data;
367 for (l = handlers; l; l = l->next) 384 for (l = handlers; l; l = l->next)
@@ -370,15 +387,15 @@ _e_fm2_mime_handler_glob_match_foreach(const Evas_Hash *hash __UNUSED__, const v
370 tuple->list = eina_list_append(tuple->list, l->data); 387 tuple->list = eina_list_append(tuple->list, l->data);
371 } 388 }
372 } 389 }
373 390
374 return 1; 391 return 1;
375} 392}
376 393
377static Evas_Bool 394static Eina_Bool
378_e_fm_mime_icon_foreach(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) 395_e_fm_mime_icon_foreach(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata)
379{ 396{
380 Eina_List **freelist; 397 Eina_List **freelist;
381 398
382 freelist = fdata; 399 freelist = fdata;
383 *freelist = eina_list_append(*freelist, data); 400 *freelist = eina_list_append(*freelist, data);
384 return 1; 401 return 1;
diff --git a/src/bin/e_fm_shared.h b/src/bin/e_fm_shared.h
index 9731cb078..bb8667926 100644
--- a/src/bin/e_fm_shared.h
+++ b/src/bin/e_fm_shared.h
@@ -139,12 +139,12 @@ _e_volume_edd_new(void)
139 eddc.func.list_data = (void *(*)(void *)) eina_list_data_get; 139 eddc.func.list_data = (void *(*)(void *)) eina_list_data_get;
140 eddc.func.hash_foreach = 140 eddc.func.hash_foreach =
141 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *)) 141 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))
142 evas_hash_foreach; 142 eina_hash_foreach;
143 eddc.func.hash_add = (void *(*) (void *, const char *, void *)) evas_hash_add; 143 eddc.func.hash_add = (void* (*) (void *, const char *, void *)) eet_eina_hash_add_alloc;
144 eddc.func.hash_free = (void (*) (void *)) evas_hash_free; 144 eddc.func.hash_free = (void (*) (void *)) eina_hash_free;
145 eddc.name = "e_volume"; 145 eddc.name = "e_volume";
146 eddc.size = sizeof(E_Volume); 146 eddc.size = sizeof(E_Volume);
147 147
148 edd = eet_data_descriptor2_new(&eddc); 148 edd = eet_data_descriptor2_new(&eddc);
149#define DAT(x, y, z) EET_DATA_DESCRIPTOR_ADD_BASIC(edd, E_Volume, x, y, z) 149#define DAT(x, y, z) EET_DATA_DESCRIPTOR_ADD_BASIC(edd, E_Volume, x, y, z)
150 DAT("type", type, EET_T_INT); 150 DAT("type", type, EET_T_INT);
@@ -179,12 +179,12 @@ _e_storage_edd_new(void)
179 eddc.func.list_data = (void *(*)(void *)) eina_list_data_get; 179 eddc.func.list_data = (void *(*)(void *)) eina_list_data_get;
180 eddc.func.hash_foreach = 180 eddc.func.hash_foreach =
181 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *)) 181 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))
182 evas_hash_foreach; 182 eina_hash_foreach;
183 eddc.func.hash_add = (void *(*) (void *, const char *, void *)) evas_hash_add; 183 eddc.func.hash_add = (void* (*) (void *, const char *, void *)) eet_eina_hash_add_alloc;
184 eddc.func.hash_free = (void (*) (void *)) evas_hash_free; 184 eddc.func.hash_free = (void (*) (Eina_Hash *)) eina_hash_free;
185 eddc.name = "e_storage"; 185 eddc.name = "e_storage";
186 eddc.size = sizeof(E_Storage); 186 eddc.size = sizeof(E_Storage);
187 187
188 edd = eet_data_descriptor2_new(&eddc); 188 edd = eet_data_descriptor2_new(&eddc);
189#define DAT(x, y, z) EET_DATA_DESCRIPTOR_ADD_BASIC(edd, E_Storage, x, y, z) 189#define DAT(x, y, z) EET_DATA_DESCRIPTOR_ADD_BASIC(edd, E_Storage, x, y, z)
190 DAT("type", type, EET_T_INT); 190 DAT("type", type, EET_T_INT);
diff --git a/src/bin/e_font.c b/src/bin/e_font.c
index 668551812..68cc996dd 100644
--- a/src/bin/e_font.c
+++ b/src/bin/e_font.c
@@ -5,9 +5,9 @@
5 5
6#define E_TOK_STYLE ":style=" 6#define E_TOK_STYLE ":style="
7 7
8static Evas_Bool _font_hash_free_cb(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__); 8static Eina_Bool _font_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
9static Evas_Hash *_e_font_available_hash_add(Evas_Hash *font_hash, const char *full_name); 9static Eina_Hash *_e_font_available_hash_add(Eina_Hash *font_hash, const char *full_name);
10static E_Font_Properties *_e_font_fontconfig_name_parse(Evas_Hash **font_hash, E_Font_Properties *efp, const char *font); 10static E_Font_Properties *_e_font_fontconfig_name_parse(Eina_Hash **font_hash, E_Font_Properties *efp, const char *font);
11static char _fn_buf[1024]; 11static char _fn_buf[1024];
12 12
13EAPI int 13EAPI int
@@ -150,8 +150,8 @@ e_font_properties_free(E_Font_Properties *efp)
150 free(efp); 150 free(efp);
151} 151}
152 152
153static Evas_Bool 153static Eina_Bool
154_font_hash_free_cb(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) 154_font_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
155{ 155{
156 E_Font_Properties *efp; 156 E_Font_Properties *efp;
157 157
@@ -161,10 +161,10 @@ _font_hash_free_cb(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__,
161} 161}
162 162
163EAPI void 163EAPI void
164e_font_available_hash_free(Evas_Hash *hash) 164e_font_available_hash_free(Eina_Hash *hash)
165{ 165{
166 evas_hash_foreach(hash, _font_hash_free_cb, NULL); 166 eina_hash_foreach(hash, _font_hash_free_cb, NULL);
167 evas_hash_free(hash); 167 eina_hash_free(hash);
168} 168}
169 169
170EAPI E_Font_Properties * 170EAPI E_Font_Properties *
@@ -175,7 +175,7 @@ e_font_fontconfig_name_parse(const char *font)
175} 175}
176 176
177static E_Font_Properties * 177static E_Font_Properties *
178_e_font_fontconfig_name_parse(Evas_Hash **font_hash, E_Font_Properties *efp, const char *font) 178_e_font_fontconfig_name_parse(Eina_Hash **font_hash, E_Font_Properties *efp, const char *font)
179{ 179{
180 char *s1; 180 char *s1;
181 181
@@ -203,12 +203,16 @@ _e_font_fontconfig_name_parse(Evas_Hash **font_hash, E_Font_Properties *efp, con
203 { 203 {
204 style = s1 + strlen(E_TOK_STYLE); 204 style = s1 + strlen(E_TOK_STYLE);
205 205
206 if (font_hash) efp = evas_hash_find(*font_hash, name); 206 if (font_hash) efp = eina_hash_find(*font_hash, name);
207 if (efp == NULL) 207 if (efp == NULL)
208 { 208 {
209 efp = calloc(1, sizeof(E_Font_Properties)); 209 efp = calloc(1, sizeof(E_Font_Properties));
210 efp->name = eina_stringshare_add(name); 210 efp->name = eina_stringshare_add(name);
211 if (font_hash) *font_hash = evas_hash_add(*font_hash, name, efp); 211 if (font_hash)
212 {
213 if (!*font_hash) *font_hash = eina_hash_string_superfast_new(NULL);
214 eina_hash_add(*font_hash, name, efp);
215 }
212 } 216 }
213 s2 = strchr(style, ','); 217 s2 = strchr(style, ',');
214 if (s2) 218 if (s2)
@@ -229,29 +233,33 @@ _e_font_fontconfig_name_parse(Evas_Hash **font_hash, E_Font_Properties *efp, con
229 } 233 }
230 else 234 else
231 { 235 {
232 if (font_hash) efp = evas_hash_find(*font_hash, font); 236 if (font_hash) efp = eina_hash_find(*font_hash, font);
233 if (efp == NULL) 237 if (efp == NULL)
234 { 238 {
235 efp = calloc(1, sizeof(E_Font_Properties)); 239 efp = calloc(1, sizeof(E_Font_Properties));
236 efp->name = eina_stringshare_add(font); 240 efp->name = eina_stringshare_add(font);
237 if (font_hash) *font_hash = evas_hash_add(*font_hash, font, efp); 241 if (font_hash)
242 {
243 if (!*font_hash) *font_hash = eina_hash_string_superfast_new(NULL);
244 eina_hash_add(*font_hash, font, efp);
245 }
238 } 246 }
239 } 247 }
240 return efp; 248 return efp;
241} 249}
242 250
243 251
244static Evas_Hash * 252static Eina_Hash *
245_e_font_available_hash_add(Evas_Hash *font_hash, const char *full_name) 253_e_font_available_hash_add(Eina_Hash *font_hash, const char *full_name)
246{ 254{
247 _e_font_fontconfig_name_parse(&font_hash, NULL, full_name); 255 _e_font_fontconfig_name_parse(&font_hash, NULL, full_name);
248 return font_hash; 256 return font_hash;
249} 257}
250 258
251EAPI Evas_Hash * 259EAPI Eina_Hash *
252e_font_available_list_parse(Eina_List *list) 260e_font_available_list_parse(Eina_List *list)
253{ 261{
254 Evas_Hash *font_hash; 262 Eina_Hash *font_hash;
255 Eina_List *next; 263 Eina_List *next;
256 264
257 font_hash = NULL; 265 font_hash = NULL;
diff --git a/src/bin/e_font.h b/src/bin/e_font.h
index 3c0fd973d..a41035c2e 100644
--- a/src/bin/e_font.h
+++ b/src/bin/e_font.h
@@ -40,8 +40,8 @@ EAPI int e_font_shutdown(void);
40EAPI void e_font_apply(void); 40EAPI void e_font_apply(void);
41EAPI Eina_List *e_font_available_list(void); 41EAPI Eina_List *e_font_available_list(void);
42EAPI void e_font_available_list_free(Eina_List *available); 42EAPI void e_font_available_list_free(Eina_List *available);
43EAPI Evas_Hash *e_font_available_list_parse(Eina_List *list); 43EAPI Eina_Hash *e_font_available_list_parse(Eina_List *list);
44EAPI void e_font_available_hash_free(Evas_Hash *hash); 44EAPI void e_font_available_hash_free(Eina_Hash *hash);
45EAPI E_Font_Properties *e_font_fontconfig_name_parse(const char *font); 45EAPI E_Font_Properties *e_font_fontconfig_name_parse(const char *font);
46EAPI const char *e_font_fontconfig_name_get(const char *name, const char *style); 46EAPI const char *e_font_fontconfig_name_get(const char *name, const char *style);
47EAPI void e_font_properties_free(E_Font_Properties *efp); 47EAPI void e_font_properties_free(E_Font_Properties *efp);
diff --git a/src/bin/e_gadcon.c b/src/bin/e_gadcon.c
index 07aa1ff12..8f693d27d 100644
--- a/src/bin/e_gadcon.c
+++ b/src/bin/e_gadcon.c
@@ -182,7 +182,7 @@ struct _E_Layout_Item_Container
182 } 182 }
183/********************/ 183/********************/
184 184
185static Evas_Hash *providers = NULL; 185static Eina_Hash *providers = NULL;
186static Eina_List *providers_list = NULL; 186static Eina_List *providers_list = NULL;
187static Eina_List *gadcons = NULL; 187static Eina_List *gadcons = NULL;
188 188
@@ -209,8 +209,9 @@ e_gadcon_provider_register(const E_Gadcon_Client_Class *cc)
209{ 209{
210 Eina_List *l; 210 Eina_List *l;
211 E_Gadcon *gc; 211 E_Gadcon *gc;
212 212
213 providers = evas_hash_direct_add(providers, cc->name, cc); 213 if (!providers) providers = eina_hash_string_superfast_new(NULL);
214 eina_hash_direct_add(providers, cc->name, cc);
214 providers_list = eina_list_append(providers_list, cc); 215 providers_list = eina_list_append(providers_list, cc);
215 for (l = gadcons; l; l = l->next) 216 for (l = gadcons; l; l = l->next)
216 { 217 {
@@ -245,7 +246,7 @@ e_gadcon_provider_unregister(const E_Gadcon_Client_Class *cc)
245 dlist = eina_list_remove_list(dlist, dlist); 246 dlist = eina_list_remove_list(dlist, dlist);
246 e_object_del(E_OBJECT(gcc)); 247 e_object_del(E_OBJECT(gcc));
247 } 248 }
248 providers = evas_hash_del(providers, cc->name, cc); 249 eina_hash_del(providers, cc->name, cc);
249 providers_list = eina_list_remove(providers_list, cc); 250 providers_list = eina_list_remove(providers_list, cc);
250} 251}
251 252
@@ -408,7 +409,7 @@ e_gadcon_populate(E_Gadcon *gc)
408 409
409 cf_gcc = l->data; 410 cf_gcc = l->data;
410 if (!cf_gcc->name) continue; 411 if (!cf_gcc->name) continue;
411 cc = evas_hash_find(providers, cf_gcc->name); 412 cc = eina_hash_find(providers, cf_gcc->name);
412 if (cc) 413 if (cc)
413 { 414 {
414 E_Gadcon_Client *gcc; 415 E_Gadcon_Client *gcc;
@@ -768,7 +769,7 @@ e_gadcon_client_config_new(E_Gadcon *gc, const char *name)
768 E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL); 769 E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL);
769 if (!name) return NULL; 770 if (!name) return NULL;
770 771
771 cc = evas_hash_find(providers, name); 772 cc = eina_hash_find(providers, name);
772 if (!cc) return NULL; 773 if (!cc) return NULL;
773 if (!_e_gadcon_client_class_feature_check(cc, "id_new", cc->func.id_new)) return NULL; 774 if (!_e_gadcon_client_class_feature_check(cc, "id_new", cc->func.id_new)) return NULL;
774 775
@@ -2140,7 +2141,7 @@ _e_gadcon_cb_dnd_enter(void *data, const char *type, void *event)
2140 E_Gadcon_Client_Class *cc; 2141 E_Gadcon_Client_Class *cc;
2141 2142
2142 gcc = ev->data; 2143 gcc = ev->data;
2143 cc = evas_hash_find(providers, gcc->name); 2144 cc = eina_hash_find(providers, gcc->name);
2144 if (cc) 2145 if (cc)
2145 { 2146 {
2146 if (!gcc->style) 2147 if (!gcc->style)
diff --git a/src/bin/e_int_config_modules.c b/src/bin/e_int_config_modules.c
index 70aee1865..ccc53f728 100644
--- a/src/bin/e_int_config_modules.c
+++ b/src/bin/e_int_config_modules.c
@@ -49,63 +49,63 @@ const CFTypes _types[] =
49/* local function protos */ 49/* local function protos */
50static void *_create_data (E_Config_Dialog *cfd); 50static void *_create_data (E_Config_Dialog *cfd);
51static void _fill_data (E_Config_Dialog_Data *cfdata); 51static void _fill_data (E_Config_Dialog_Data *cfdata);
52static void _free_data (E_Config_Dialog *cfd, 52static void _free_data (E_Config_Dialog *cfd,
53 E_Config_Dialog_Data *cfdata); 53 E_Config_Dialog_Data *cfdata);
54static Evas_Object *_basic_create (E_Config_Dialog *cfd, Evas *evas, 54static Evas_Object *_basic_create (E_Config_Dialog *cfd, Evas *evas,
55 E_Config_Dialog_Data *cfdata); 55 E_Config_Dialog_Data *cfdata);
56static void _fill_type_hash (void); 56static void _fill_type_hash (void);
57static void _load_modules (const char *dir); 57static void _load_modules (const char *dir);
58static void _fill_list (Evas_Object *obj, int enabled); 58static void _fill_list (Evas_Object *obj, int enabled);
59static Evas_Bool _fill_list_types_avail(const Evas_Hash *hash __UNUSED__, 59static Eina_Bool _fill_list_types_avail(const Eina_Hash *hash __UNUSED__,
60 const void *key __UNUSED__, 60 const void *key __UNUSED__,
61 void *data, void *fdata); 61 void *data, void *fdata);
62static Evas_Bool _fill_list_types_load (const Evas_Hash *hash __UNUSED__, 62static Eina_Bool _fill_list_types_load (const Eina_Hash *hash __UNUSED__,
63 const void *key __UNUSED__, 63 const void *key __UNUSED__,
64 void *data, void *fdata); 64 void *data, void *fdata);
65static Evas_Bool _fill_list_types (Evas_Object *obj, CFType *cft, 65static Eina_Bool _fill_list_types (Evas_Object *obj, CFType *cft,
66 int enabled); 66 int enabled);
67static Evas_Bool _types_hash_cb_free (const Evas_Hash *hash __UNUSED__, 67static Eina_Bool _types_hash_cb_free (const Eina_Hash *hash __UNUSED__,
68 const void *key __UNUSED__, 68 const void *key __UNUSED__,
69 void *data, void *fdata __UNUSED__); 69 void *data, void *fdata __UNUSED__);
70static Evas_Bool _mod_hash_cb_free (const Evas_Hash *hash __UNUSED__, 70static Eina_Bool _mod_hash_cb_free (const Eina_Hash *hash __UNUSED__,
71 const void *key __UNUSED__, 71 const void *key __UNUSED__,
72 void *data, void *fdata __UNUSED__); 72 void *data, void *fdata __UNUSED__);
73static Evas_Bool _mod_hash_avail_list (const Evas_Hash *hash __UNUSED__, 73static Eina_Bool _mod_hash_avail_list (const Eina_Hash *hash __UNUSED__,
74 const void *key __UNUSED__, 74 const void *key __UNUSED__,
75 void *data, void *fdata); 75 void *data, void *fdata);
76static Evas_Bool _mod_hash_load_list (const Evas_Hash *hash __UNUSED__, 76static Eina_Bool _mod_hash_load_list (const Eina_Hash *hash __UNUSED__,
77 const void *key __UNUSED__, 77 const void *key __UNUSED__,
78 void *data, void *fdata); 78 void *data, void *fdata);
79static int _mod_list_sort (const void *data1, const void *data2); 79static int _mod_list_sort (const void *data1, const void *data2);
80static void _list_widget_load (Evas_Object *obj, Eina_List *list); 80static void _list_widget_load (Evas_Object *obj, Eina_List *list);
81static void _avail_list_cb_change (void *data, Evas_Object *obj); 81static void _avail_list_cb_change (void *data, Evas_Object *obj);
82static void _load_list_cb_change (void *data, Evas_Object *obj); 82static void _load_list_cb_change (void *data, Evas_Object *obj);
83static void _unselect_all_modules (void); 83static void _unselect_all_modules (void);
84static Evas_Bool _mod_hash_unselect (const Evas_Hash *hash __UNUSED__, 84static Eina_Bool _mod_hash_unselect (const Eina_Hash *hash __UNUSED__,
85 const void *key __UNUSED__, 85 const void *key __UNUSED__,
86 void *data, void *fdata __UNUSED__); 86 void *data, void *fdata __UNUSED__);
87static void _select_all_modules (Evas_Object *obj, void *data); 87static void _select_all_modules (Evas_Object *obj, void *data);
88static void _btn_cb_unload (void *data, void *data2); 88static void _btn_cb_unload (void *data, void *data2);
89static void _btn_cb_load (void *data, void *data2); 89static void _btn_cb_load (void *data, void *data2);
90static Evas_Bool _mod_hash_load (const Evas_Hash *hash __UNUSED__, 90static Eina_Bool _mod_hash_load (const Eina_Hash *hash __UNUSED__,
91 const void *key __UNUSED__, 91 const void *key __UNUSED__,
92 void *data, void *fdata __UNUSED__); 92 void *data, void *fdata __UNUSED__);
93static Evas_Bool _mod_hash_unload (const Evas_Hash *hash __UNUSED__, 93static Eina_Bool _mod_hash_unload (const Eina_Hash *hash __UNUSED__,
94 const void *key __UNUSED__, 94 const void *key __UNUSED__,
95 void *data, void *fdata __UNUSED__); 95 void *data, void *fdata __UNUSED__);
96static void _enable_modules (int enable); 96static void _enable_modules (int enable);
97static Evas_Bool _enable_modules_types_enable (const Evas_Hash *hash __UNUSED__, 97static Eina_Bool _enable_modules_types_enable (const Eina_Hash *hash __UNUSED__,
98 const void *key __UNUSED__, 98 const void *key __UNUSED__,
99 void *data, void *fdata); 99 void *data, void *fdata);
100static Evas_Bool _enable_modules_types_disable (const Evas_Hash *hash __UNUSED__, 100static Eina_Bool _enable_modules_types_disable (const Eina_Hash *hash __UNUSED__,
101 const void *key __UNUSED__, 101 const void *key __UNUSED__,
102 void *data, void *fdata); 102 void *data, void *fdata);
103 103
104/* local variables */ 104/* local variables */
105static Evas_Hash *types_hash = NULL; 105static Eina_Hash *types_hash = NULL;
106 106
107EAPI E_Config_Dialog * 107EAPI E_Config_Dialog *
108e_int_config_modules(E_Container *con, const char *params __UNUSED__) 108e_int_config_modules(E_Container *con, const char *params __UNUSED__)
109{ 109{
110 E_Config_Dialog *cfd = NULL; 110 E_Config_Dialog *cfd = NULL;
111 E_Config_Dialog_View *v = NULL; 111 E_Config_Dialog_View *v = NULL;
@@ -159,20 +159,20 @@ _fill_data(E_Config_Dialog_Data *cfdata)
159 if (mdirs) e_path_dir_list_free(mdirs); 159 if (mdirs) e_path_dir_list_free(mdirs);
160} 160}
161 161
162static void 162static void
163_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) 163_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
164{ 164{
165 if (types_hash) 165 if (types_hash)
166 { 166 {
167 evas_hash_foreach(types_hash, _types_hash_cb_free, NULL); 167 eina_hash_foreach(types_hash, _types_hash_cb_free, NULL);
168 evas_hash_free(types_hash); 168 eina_hash_free(types_hash);
169 types_hash = NULL; 169 types_hash = NULL;
170 } 170 }
171 E_FREE(cfdata); 171 E_FREE(cfdata);
172} 172}
173 173
174static Evas_Object * 174static Evas_Object *
175_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) 175_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
176{ 176{
177 Evas_Object *o, *of, *ol; 177 Evas_Object *o, *of, *ol;
178 178
@@ -215,30 +215,31 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
215 return o; 215 return o;
216} 216}
217 217
218static void 218static void
219_fill_type_hash(void) 219_fill_type_hash(void)
220{ 220{
221 int i = 0; 221 int i = 0;
222 222
223 /* create the inital hash based on predefined list of types */ 223 /* create the inital hash based on predefined list of types */
224 for (i = 0; _types[i].name; i++) 224 for (i = 0; _types[i].name; i++)
225 { 225 {
226 CFType *cft = NULL; 226 CFType *cft = NULL;
227 227
228 if (!_types[i].key) continue; 228 if (!_types[i].key) continue;
229 if (evas_hash_find(types_hash, _types[i].key)) continue; 229 if (eina_hash_find(types_hash, _types[i].key)) continue;
230 230
231 cft = E_NEW(CFType, 1); 231 cft = E_NEW(CFType, 1);
232 if (!cft) continue; 232 if (!cft) continue;
233 cft->key = eina_stringshare_add(_types[i].key); 233 cft->key = eina_stringshare_add(_types[i].key);
234 cft->name = eina_stringshare_add(_types[i].name); 234 cft->name = eina_stringshare_add(_types[i].name);
235 cft->icon = eina_stringshare_add(_types[i].icon); 235 cft->icon = eina_stringshare_add(_types[i].icon);
236 types_hash = evas_hash_direct_add(types_hash, cft->key, cft); 236 if (!types_hash) types_hash = eina_hash_string_superfast_new(NULL);
237 eina_hash_direct_add(types_hash, cft->key, cft);
237 } 238 }
238} 239}
239 240
240static void 241static void
241_load_modules(const char *dir) 242_load_modules(const char *dir)
242{ 243{
243 Ecore_List *files = NULL; 244 Ecore_List *files = NULL;
244 char *mod = NULL; 245 char *mod = NULL;
@@ -262,15 +263,15 @@ _load_modules(const char *dir)
262 if (!(desk = efreet_desktop_get(buf))) continue; 263 if (!(desk = efreet_desktop_get(buf))) continue;
263 264
264 /* does the ModuleType exist in desktop? */ 265 /* does the ModuleType exist in desktop? */
265 if (desk->x) 266 if (desk->x)
266 type = ecore_hash_get(desk->x, "X-Enlightenment-ModuleType"); 267 type = eina_hash_find(desk->x, "X-Enlightenment-ModuleType");
267 if (!type) type = eina_stringshare_add("shelf"); 268 if (!type) type = eina_stringshare_add("shelf");
268 269
269 /* do we have this module already in it's type hash ? */ 270 /* do we have this module already in it's type hash ? */
270 cft = evas_hash_find(types_hash, type); 271 cft = eina_hash_find(types_hash, type);
271 if (cft) 272 if (cft)
272 { 273 {
273 if (cft->modules && evas_hash_find(cft->modules, mod)) 274 if (cft->modules && eina_hash_find(cft->modules, mod))
274 { 275 {
275 if ((!desk->x) && (type)) eina_stringshare_del(type); 276 if ((!desk->x) && (type)) eina_stringshare_del(type);
276 if (desk) efreet_desktop_free(desk); 277 if (desk) efreet_desktop_free(desk);
@@ -290,7 +291,8 @@ _load_modules(const char *dir)
290 snprintf(buf, sizeof(buf), "enlightenment/%s", type); 291 snprintf(buf, sizeof(buf), "enlightenment/%s", type);
291 if (e_util_edje_icon_check(buf)) 292 if (e_util_edje_icon_check(buf))
292 cft->icon = eina_stringshare_add(buf); 293 cft->icon = eina_stringshare_add(buf);
293 types_hash = evas_hash_direct_add(types_hash, cft->key, cft); 294 if (!types_hash) types_hash = eina_hash_string_superfast_new(NULL);
295 eina_hash_direct_add(types_hash, cft->key, cft);
294 } 296 }
295 297
296 /* module not in it's type hash, add */ 298 /* module not in it's type hash, add */
@@ -300,20 +302,21 @@ _load_modules(const char *dir)
300 if (desk->name) cfm->name = eina_stringshare_add(desk->name); 302 if (desk->name) cfm->name = eina_stringshare_add(desk->name);
301 if (desk->icon) cfm->icon = eina_stringshare_add(desk->icon); 303 if (desk->icon) cfm->icon = eina_stringshare_add(desk->icon);
302 if (desk->comment) cfm->comment = eina_stringshare_add(desk->comment); 304 if (desk->comment) cfm->comment = eina_stringshare_add(desk->comment);
303 if (desk->orig_path) 305 if (desk->orig_path)
304 cfm->orig_path = eina_stringshare_add(desk->orig_path); 306 cfm->orig_path = eina_stringshare_add(desk->orig_path);
305 if ((!desk->x) && (type)) eina_stringshare_del(type); 307 if ((!desk->x) && (type)) eina_stringshare_del(type);
306 efreet_desktop_free(desk); 308 efreet_desktop_free(desk);
307 309
308 if (e_module_find(mod)) cfm->enabled = 1; 310 if (e_module_find(mod)) cfm->enabled = 1;
309 cft->modules = evas_hash_direct_add(cft->modules, cfm->short_name, cfm); 311 if (!cft->modules) cft->modules = eina_hash_string_superfast_new(NULL);
312 eina_hash_direct_add(cft->modules, cfm->short_name, cfm);
310 } 313 }
311 free(mod); 314 free(mod);
312 if (files) ecore_list_destroy(files); 315 if (files) ecore_list_destroy(files);
313} 316}
314 317
315static void 318static void
316_fill_list(Evas_Object *obj, int enabled) 319_fill_list(Evas_Object *obj, int enabled)
317{ 320{
318 Evas *evas; 321 Evas *evas;
319 Evas_Coord w; 322 Evas_Coord w;
@@ -325,12 +328,12 @@ _fill_list(Evas_Object *obj, int enabled)
325 e_widget_ilist_freeze(obj); 328 e_widget_ilist_freeze(obj);
326 e_widget_ilist_clear(obj); 329 e_widget_ilist_clear(obj);
327 330
328 if (types_hash) 331 if (types_hash)
329 { 332 {
330 if (!enabled) 333 if (!enabled)
331 evas_hash_foreach(types_hash, _fill_list_types_avail, obj); 334 eina_hash_foreach(types_hash, _fill_list_types_avail, obj);
332 else 335 else
333 evas_hash_foreach(types_hash, _fill_list_types_load, obj); 336 eina_hash_foreach(types_hash, _fill_list_types_load, obj);
334 } 337 }
335 338
336 e_widget_ilist_go(obj); 339 e_widget_ilist_go(obj);
@@ -341,8 +344,8 @@ _fill_list(Evas_Object *obj, int enabled)
341 evas_event_thaw(evas); 344 evas_event_thaw(evas);
342} 345}
343 346
344static Evas_Bool 347static Eina_Bool
345_fill_list_types_avail(const Evas_Hash *hash __UNUSED__, 348_fill_list_types_avail(const Eina_Hash *hash __UNUSED__,
346 const void *key __UNUSED__, void *data, void *fdata) 349 const void *key __UNUSED__, void *data, void *fdata)
347{ 350{
348 CFType *cft; 351 CFType *cft;
@@ -354,8 +357,8 @@ _fill_list_types_avail(const Evas_Hash *hash __UNUSED__,
354 return _fill_list_types(obj, cft, 0); 357 return _fill_list_types(obj, cft, 0);
355} 358}
356 359
357static Evas_Bool 360static Eina_Bool
358_fill_list_types_load(const Evas_Hash *hash __UNUSED__, 361_fill_list_types_load(const Eina_Hash *hash __UNUSED__,
359 const void *key __UNUSED__, void *data, void *fdata) 362 const void *key __UNUSED__, void *data, void *fdata)
360{ 363{
361 CFType *cft; 364 CFType *cft;
@@ -367,7 +370,7 @@ _fill_list_types_load(const Evas_Hash *hash __UNUSED__,
367 return _fill_list_types(obj, cft, 1); 370 return _fill_list_types(obj, cft, 1);
368} 371}
369 372
370static Evas_Bool 373static Eina_Bool
371_fill_list_types(Evas_Object *obj, CFType *cft, int enabled) 374_fill_list_types(Evas_Object *obj, CFType *cft, int enabled)
372{ 375{
373 Evas *evas; 376 Evas *evas;
@@ -380,13 +383,13 @@ _fill_list_types(Evas_Object *obj, CFType *cft, int enabled)
380 if (cft->modules) 383 if (cft->modules)
381 { 384 {
382 if (!enabled) 385 if (!enabled)
383 evas_hash_foreach(cft->modules, _mod_hash_avail_list, &l); 386 eina_hash_foreach(cft->modules, _mod_hash_avail_list, &l);
384 else 387 else
385 evas_hash_foreach(cft->modules, _mod_hash_load_list, &l); 388 eina_hash_foreach(cft->modules, _mod_hash_load_list, &l);
386 } 389 }
387 390
388 if (l) count = eina_list_count(l); 391 if (l) count = eina_list_count(l);
389 else return 1; 392 else return EINA_TRUE;
390 393
391 /* We have at least one, append header */ 394 /* We have at least one, append header */
392 if (cft->icon) 395 if (cft->icon)
@@ -408,12 +411,12 @@ _fill_list_types(Evas_Object *obj, CFType *cft, int enabled)
408 l = NULL; 411 l = NULL;
409 } 412 }
410 413
411 return 1; 414 return EINA_TRUE;
412} 415}
413 416
414static Evas_Bool 417static Eina_Bool
415_types_hash_cb_free(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 418_types_hash_cb_free(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
416 void *data, void *fdata __UNUSED__) 419 void *data, void *fdata __UNUSED__)
417{ 420{
418 CFType *type = NULL; 421 CFType *type = NULL;
419 422
@@ -421,19 +424,19 @@ _types_hash_cb_free(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__
421 if (type->key) eina_stringshare_del(type->key); 424 if (type->key) eina_stringshare_del(type->key);
422 if (type->name) eina_stringshare_del(type->name); 425 if (type->name) eina_stringshare_del(type->name);
423 if (type->icon) eina_stringshare_del(type->icon); 426 if (type->icon) eina_stringshare_del(type->icon);
424 if (type->modules) 427 if (type->modules)
425 { 428 {
426 evas_hash_foreach(type->modules, _mod_hash_cb_free, NULL); 429 eina_hash_foreach(type->modules, _mod_hash_cb_free, NULL);
427 evas_hash_free(type->modules); 430 eina_hash_free(type->modules);
428 type->modules = NULL; 431 type->modules = NULL;
429 } 432 }
430 E_FREE(type); 433 E_FREE(type);
431 return 1; 434 return EINA_TRUE;
432} 435}
433 436
434static Evas_Bool 437static Eina_Bool
435_mod_hash_cb_free(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 438_mod_hash_cb_free(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
436 void *data, void *fdata __UNUSED__) 439 void *data, void *fdata __UNUSED__)
437{ 440{
438 CFModule *mod = NULL; 441 CFModule *mod = NULL;
439 442
@@ -444,12 +447,12 @@ _mod_hash_cb_free(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__,
444 if (mod->comment) eina_stringshare_del(mod->comment); 447 if (mod->comment) eina_stringshare_del(mod->comment);
445 if (mod->orig_path) eina_stringshare_del(mod->orig_path); 448 if (mod->orig_path) eina_stringshare_del(mod->orig_path);
446 E_FREE(mod); 449 E_FREE(mod);
447 return 1; 450 return EINA_TRUE;
448} 451}
449 452
450static Evas_Bool 453static Eina_Bool
451_mod_hash_avail_list(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 454_mod_hash_avail_list(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
452 void *data, void *fdata) 455 void *data, void *fdata)
453{ 456{
454 Eina_List **l; 457 Eina_List **l;
455 CFModule *mod = NULL; 458 CFModule *mod = NULL;
@@ -458,12 +461,12 @@ _mod_hash_avail_list(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED_
458 if ((!mod) || (mod->enabled)) return 1; 461 if ((!mod) || (mod->enabled)) return 1;
459 l = fdata; 462 l = fdata;
460 *l = eina_list_append(*l, mod); 463 *l = eina_list_append(*l, mod);
461 return 1; 464 return EINA_TRUE;
462} 465}
463 466
464static Evas_Bool 467static Eina_Bool
465_mod_hash_load_list(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 468_mod_hash_load_list(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
466 void *data, void *fdata) 469 void *data, void *fdata)
467{ 470{
468 Eina_List **l; 471 Eina_List **l;
469 CFModule *mod = NULL; 472 CFModule *mod = NULL;
@@ -472,11 +475,11 @@ _mod_hash_load_list(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__
472 if ((!mod) || (!mod->enabled)) return 1; 475 if ((!mod) || (!mod->enabled)) return 1;
473 l = fdata; 476 l = fdata;
474 *l = eina_list_append(*l, mod); 477 *l = eina_list_append(*l, mod);
475 return 1; 478 return EINA_TRUE;
476} 479}
477 480
478static int 481static int
479_mod_list_sort(const void *data1, const void *data2) 482_mod_list_sort(const void *data1, const void *data2)
480{ 483{
481 const CFModule *m1, *m2; 484 const CFModule *m1, *m2;
482 485
@@ -486,15 +489,15 @@ _mod_list_sort(const void *data1, const void *data2)
486} 489}
487 490
488/* nice generic function to load an ilist with items */ 491/* nice generic function to load an ilist with items */
489static void 492static void
490_list_widget_load(Evas_Object *obj, Eina_List *list) 493_list_widget_load(Evas_Object *obj, Eina_List *list)
491{ 494{
492 Evas *evas; 495 Evas *evas;
493 Eina_List *ml = NULL; 496 Eina_List *ml = NULL;
494 497
495 if ((!obj) || (!list)) return; 498 if ((!obj) || (!list)) return;
496 evas = evas_object_evas_get(obj); 499 evas = evas_object_evas_get(obj);
497 for (ml = list; ml; ml = ml->next) 500 for (ml = list; ml; ml = ml->next)
498 { 501 {
499 CFModule *mod = NULL; 502 CFModule *mod = NULL;
500 Evas_Object *ic = NULL; 503 Evas_Object *ic = NULL;
@@ -502,7 +505,7 @@ _list_widget_load(Evas_Object *obj, Eina_List *list)
502 char buf[4096]; 505 char buf[4096];
503 506
504 if (!(mod = ml->data)) continue; 507 if (!(mod = ml->data)) continue;
505 if (mod->orig_path) 508 if (mod->orig_path)
506 { 509 {
507 path = ecore_file_dir_get(mod->orig_path); 510 path = ecore_file_dir_get(mod->orig_path);
508 snprintf(buf, sizeof(buf), "%s/%s.edj", path, mod->icon); 511 snprintf(buf, sizeof(buf), "%s/%s.edj", path, mod->icon);
@@ -516,8 +519,8 @@ _list_widget_load(Evas_Object *obj, Eina_List *list)
516 } 519 }
517} 520}
518 521
519static void 522static void
520_avail_list_cb_change(void *data, Evas_Object *obj) 523_avail_list_cb_change(void *data, Evas_Object *obj)
521{ 524{
522 E_Config_Dialog_Data *cfdata = NULL; 525 E_Config_Dialog_Data *cfdata = NULL;
523 526
@@ -541,8 +544,8 @@ _avail_list_cb_change(void *data, Evas_Object *obj)
541 e_widget_disabled_set(cfdata->b_load, 0); 544 e_widget_disabled_set(cfdata->b_load, 0);
542} 545}
543 546
544static void 547static void
545_load_list_cb_change(void *data, Evas_Object *obj) 548_load_list_cb_change(void *data, Evas_Object *obj)
546{ 549{
547 E_Config_Dialog_Data *cfdata = NULL; 550 E_Config_Dialog_Data *cfdata = NULL;
548 551
@@ -566,28 +569,28 @@ _load_list_cb_change(void *data, Evas_Object *obj)
566 e_widget_disabled_set(cfdata->b_unload, 0); 569 e_widget_disabled_set(cfdata->b_unload, 0);
567} 570}
568 571
569static void 572static void
570_unselect_all_modules(void) 573_unselect_all_modules(void)
571{ 574{
572 int i = 0; 575 int i = 0;
573 576
574 if (!types_hash) return; 577 if (!types_hash) return;
575 578
576 /* loop types, getting all modules */ 579 /* loop types, getting all modules */
577 for (i = 0; _types[i].name; i++) 580 for (i = 0; _types[i].name; i++)
578 { 581 {
579 CFType *cft = NULL; 582 CFType *cft = NULL;
580 583
581 if (!_types[i].key) continue; 584 if (!_types[i].key) continue;
582 cft = evas_hash_find(types_hash, _types[i].key); 585 cft = eina_hash_find(types_hash, _types[i].key);
583 if ((!cft) || (!cft->modules)) continue; 586 if ((!cft) || (!cft->modules)) continue;
584 evas_hash_foreach(cft->modules, _mod_hash_unselect, NULL); 587 eina_hash_foreach(cft->modules, _mod_hash_unselect, NULL);
585 } 588 }
586} 589}
587 590
588static Evas_Bool 591static Eina_Bool
589_mod_hash_unselect(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 592_mod_hash_unselect(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
590 void *data, void *fdata __UNUSED__) 593 void *data, void *fdata __UNUSED__)
591{ 594{
592 CFModule *mod = NULL; 595 CFModule *mod = NULL;
593 596
@@ -596,15 +599,15 @@ _mod_hash_unselect(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__,
596 return 1; 599 return 1;
597} 600}
598 601
599static void 602static void
600_select_all_modules(Evas_Object *obj, void *data) 603_select_all_modules(Evas_Object *obj, void *data)
601{ 604{
602 Eina_List *l = NULL; 605 Eina_List *l = NULL;
603 E_Config_Dialog_Data *cfdata = NULL; 606 E_Config_Dialog_Data *cfdata = NULL;
604 int i = 0; 607 int i = 0;
605 608
606 if (!(cfdata = data)) return; 609 if (!(cfdata = data)) return;
607 for (i = 0, l = e_widget_ilist_items_get(obj); l; l = l->next, i++) 610 for (i = 0, l = e_widget_ilist_items_get(obj); l; l = l->next, i++)
608 { 611 {
609 E_Ilist_Item *item = NULL; 612 E_Ilist_Item *item = NULL;
610 CFModule *mod = NULL; 613 CFModule *mod = NULL;
@@ -616,13 +619,13 @@ _select_all_modules(Evas_Object *obj, void *data)
616 if (mod->comment) 619 if (mod->comment)
617 e_widget_textblock_markup_set(cfdata->o_desc, mod->comment); 620 e_widget_textblock_markup_set(cfdata->o_desc, mod->comment);
618 else 621 else
619 e_widget_textblock_markup_set(cfdata->o_desc, 622 e_widget_textblock_markup_set(cfdata->o_desc,
620 _("Description: Unavailable")); 623 _("Description: Unavailable"));
621 } 624 }
622} 625}
623 626
624static void 627static void
625_btn_cb_unload(void *data, void *data2) 628_btn_cb_unload(void *data, void *data2)
626{ 629{
627 E_Config_Dialog_Data *cfdata = NULL; 630 E_Config_Dialog_Data *cfdata = NULL;
628 int sel = -1; 631 int sel = -1;
@@ -636,18 +639,18 @@ _btn_cb_unload(void *data, void *data2)
636 e_widget_disabled_set(cfdata->b_unload, 1); 639 e_widget_disabled_set(cfdata->b_unload, 1);
637 e_widget_textblock_markup_set(cfdata->o_desc, _("Description: Unavailable")); 640 e_widget_textblock_markup_set(cfdata->o_desc, _("Description: Unavailable"));
638 641
639 /* using a total reload here as it's simpler than parsing the list(s), 642 /* using a total reload here as it's simpler than parsing the list(s),
640 * finding what was selected, removing it, checking for headers, etc */ 643 * finding what was selected, removing it, checking for headers, etc */
641 _fill_list(cfdata->l_avail, 0); 644 _fill_list(cfdata->l_avail, 0);
642 _fill_list(cfdata->l_loaded, 1); 645 _fill_list(cfdata->l_loaded, 1);
643 646
644 /* move the selection down one if possible. Ilist itself will check 647 /* move the selection down one if possible. Ilist itself will check
645 * for headers, etc, etc */ 648 * for headers, etc, etc */
646 e_widget_ilist_selected_set(cfdata->l_loaded, sel); 649 e_widget_ilist_selected_set(cfdata->l_loaded, sel);
647} 650}
648 651
649static void 652static void
650_btn_cb_load(void *data, void *data2) 653_btn_cb_load(void *data, void *data2)
651{ 654{
652 E_Config_Dialog_Data *cfdata = NULL; 655 E_Config_Dialog_Data *cfdata = NULL;
653 int sel = -1; 656 int sel = -1;
@@ -661,29 +664,29 @@ _btn_cb_load(void *data, void *data2)
661 e_widget_disabled_set(cfdata->b_load, 1); 664 e_widget_disabled_set(cfdata->b_load, 1);
662 e_widget_textblock_markup_set(cfdata->o_desc, _("Description: Unavailable")); 665 e_widget_textblock_markup_set(cfdata->o_desc, _("Description: Unavailable"));
663 666
664 /* using a total reload here as it's simpler than parsing the list(s), 667 /* using a total reload here as it's simpler than parsing the list(s),
665 * finding what was selected, removing it, checking for headers, etc */ 668 * finding what was selected, removing it, checking for headers, etc */
666 _fill_list(cfdata->l_avail, 0); 669 _fill_list(cfdata->l_avail, 0);
667 _fill_list(cfdata->l_loaded, 1); 670 _fill_list(cfdata->l_loaded, 1);
668 671
669 /* move the selection down one if possible. Ilist itself will check 672 /* move the selection down one if possible. Ilist itself will check
670 * for headers, etc, etc */ 673 * for headers, etc, etc */
671 e_widget_ilist_selected_set(cfdata->l_avail, sel); 674 e_widget_ilist_selected_set(cfdata->l_avail, sel);
672} 675}
673 676
674static void 677static void
675_enable_modules(int enable) 678_enable_modules(int enable)
676{ 679{
677 if (!types_hash) return; 680 if (!types_hash) return;
678 681
679 if (enable) 682 if (enable)
680 evas_hash_foreach(types_hash, _enable_modules_types_enable, NULL); 683 eina_hash_foreach(types_hash, _enable_modules_types_enable, NULL);
681 else 684 else
682 evas_hash_foreach(types_hash, _enable_modules_types_disable, NULL); 685 eina_hash_foreach(types_hash, _enable_modules_types_disable, NULL);
683} 686}
684 687
685static Evas_Bool 688static Eina_Bool
686_enable_modules_types_enable(const Evas_Hash *hash __UNUSED__, 689_enable_modules_types_enable(const Eina_Hash *hash __UNUSED__,
687 const void *key __UNUSED__, void *data, 690 const void *key __UNUSED__, void *data,
688 void *fdata) 691 void *fdata)
689{ 692{
@@ -691,12 +694,12 @@ _enable_modules_types_enable(const Evas_Hash *hash __UNUSED__,
691 694
692 cft = data; 695 cft = data;
693 if (cft && cft->modules) 696 if (cft && cft->modules)
694 evas_hash_foreach(cft->modules, _mod_hash_load, NULL); 697 eina_hash_foreach(cft->modules, _mod_hash_load, NULL);
695 return 1; 698 return 1;
696} 699}
697 700
698static Evas_Bool 701static Eina_Bool
699_enable_modules_types_disable(const Evas_Hash *hash __UNUSED__, 702_enable_modules_types_disable(const Eina_Hash *hash __UNUSED__,
700 const void *key __UNUSED__, void *data, 703 const void *key __UNUSED__, void *data,
701 void *fdata) 704 void *fdata)
702{ 705{
@@ -704,13 +707,13 @@ _enable_modules_types_disable(const Evas_Hash *hash __UNUSED__,
704 707
705 cft = data; 708 cft = data;
706 if (cft && cft->modules) 709 if (cft && cft->modules)
707 evas_hash_foreach(cft->modules, _mod_hash_unload, NULL); 710 eina_hash_foreach(cft->modules, _mod_hash_unload, NULL);
708 return 1; 711 return 1;
709} 712}
710 713
711static Evas_Bool 714static Eina_Bool
712_mod_hash_load(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 715_mod_hash_load(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
713 void *data, void *fdata __UNUSED__) 716 void *data, void *fdata __UNUSED__)
714{ 717{
715 CFModule *mod = NULL; 718 CFModule *mod = NULL;
716 E_Module *module = NULL; 719 E_Module *module = NULL;
@@ -725,9 +728,9 @@ _mod_hash_load(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__,
725 return 1; 728 return 1;
726} 729}
727 730
728static Evas_Bool 731static Eina_Bool
729_mod_hash_unload(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 732_mod_hash_unload(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
730 void *data, void *fdata __UNUSED__) 733 void *data, void *fdata __UNUSED__)
731{ 734{
732 CFModule *mod = NULL; 735 CFModule *mod = NULL;
733 E_Module *module = NULL; 736 E_Module *module = NULL;
diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c
index f19b37823..d349fb20f 100644
--- a/src/bin/e_int_menus.c
+++ b/src/bin/e_int_menus.c
@@ -65,7 +65,7 @@ static void _e_int_menus_items_del_hook (void *obj);
65static void _e_int_menus_item_label_set (Efreet_Menu *entry, E_Menu_Item *mi); 65static void _e_int_menus_item_label_set (Efreet_Menu *entry, E_Menu_Item *mi);
66 66
67/* local subsystem globals */ 67/* local subsystem globals */
68static Evas_Hash *_e_int_menus_augmentation = NULL; 68static Eina_Hash *_e_int_menus_augmentation = NULL;
69 69
70/* externally accessible functions */ 70/* externally accessible functions */
71EAPI E_Menu * 71EAPI E_Menu *
@@ -81,20 +81,20 @@ e_int_menus_main_new(void)
81 m = e_menu_new(); 81 m = e_menu_new();
82 e_menu_title_set(m, _("Main")); 82 e_menu_title_set(m, _("Main"));
83 dat->menu = m; 83 dat->menu = m;
84 e_object_data_set(E_OBJECT(m), dat); 84 e_object_data_set(E_OBJECT(m), dat);
85 e_object_del_attach_func_set(E_OBJECT(m), _e_int_menus_main_del_hook); 85 e_object_del_attach_func_set(E_OBJECT(m), _e_int_menus_main_del_hook);
86 86
87 e_menu_category_set(m, "main"); 87 e_menu_category_set(m, "main");
88 88
89 l = evas_hash_find(_e_int_menus_augmentation, "main/0"); 89 l = eina_hash_find(_e_int_menus_augmentation, "main/0");
90 if (l) _e_int_menus_augmentation_add(m, l); 90 if (l) _e_int_menus_augmentation_add(m, l);
91 91
92 if (e_config->menu_favorites_show) 92 if (e_config->menu_favorites_show)
93 { 93 {
94 subm = e_int_menus_favorite_apps_new(); 94 subm = e_int_menus_favorite_apps_new();
95 if (subm) 95 if (subm)
96 { 96 {
97 dat->apps = subm; 97 dat->apps = subm;
98 mi = e_menu_item_new(m); 98 mi = e_menu_item_new(m);
99 e_menu_item_label_set(mi, _("Favorite Applications")); 99 e_menu_item_label_set(mi, _("Favorite Applications"));
100 e_util_menu_item_edje_icon_set(mi, "enlightenment/favorites"); 100 e_util_menu_item_edje_icon_set(mi, "enlightenment/favorites");
@@ -112,13 +112,13 @@ e_int_menus_main_new(void)
112 e_menu_item_submenu_set(mi, subm); 112 e_menu_item_submenu_set(mi, subm);
113 } 113 }
114 114
115 l = evas_hash_find(_e_int_menus_augmentation, "main/1"); 115 l = eina_hash_find(_e_int_menus_augmentation, "main/1");
116 if (l) _e_int_menus_augmentation_add(m, l); 116 if (l) _e_int_menus_augmentation_add(m, l);
117 117
118 mi = e_menu_item_new(m); 118 mi = e_menu_item_new(m);
119 e_menu_item_separator_set(mi, 1); 119 e_menu_item_separator_set(mi, 1);
120 120
121 l = evas_hash_find(_e_int_menus_augmentation, "main/2"); 121 l = eina_hash_find(_e_int_menus_augmentation, "main/2");
122 if (l) _e_int_menus_augmentation_add(m, l); 122 if (l) _e_int_menus_augmentation_add(m, l);
123 123
124 subm = e_int_menus_desktops_new(); 124 subm = e_int_menus_desktops_new();
@@ -145,13 +145,13 @@ e_int_menus_main_new(void)
145 e_menu_item_submenu_set(mi, subm); 145 e_menu_item_submenu_set(mi, subm);
146 */ 146 */
147 147
148 l = evas_hash_find(_e_int_menus_augmentation, "main/3"); 148 l = eina_hash_find(_e_int_menus_augmentation, "main/3");
149 if (l) _e_int_menus_augmentation_add(m, l); 149 if (l) _e_int_menus_augmentation_add(m, l);
150 150
151 mi = e_menu_item_new(m); 151 mi = e_menu_item_new(m);
152 e_menu_item_separator_set(mi, 1); 152 e_menu_item_separator_set(mi, 1);
153 153
154 l = evas_hash_find(_e_int_menus_augmentation, "main/4"); 154 l = eina_hash_find(_e_int_menus_augmentation, "main/4");
155 if (l) _e_int_menus_augmentation_add(m, l); 155 if (l) _e_int_menus_augmentation_add(m, l);
156 156
157 subm = e_menu_new(); 157 subm = e_menu_new();
@@ -172,13 +172,13 @@ e_int_menus_main_new(void)
172 e_util_menu_item_edje_icon_set(mi, "enlightenment/themes"); 172 e_util_menu_item_edje_icon_set(mi, "enlightenment/themes");
173 e_menu_item_callback_set(mi, _e_int_menus_themes_about, NULL); 173 e_menu_item_callback_set(mi, _e_int_menus_themes_about, NULL);
174 174
175 l = evas_hash_find(_e_int_menus_augmentation, "main/5"); 175 l = eina_hash_find(_e_int_menus_augmentation, "main/5");
176 if (l) _e_int_menus_augmentation_add(m, l); 176 if (l) _e_int_menus_augmentation_add(m, l);
177 177
178 mi = e_menu_item_new(subm); 178 mi = e_menu_item_new(subm);
179 e_menu_item_separator_set(mi, 1); 179 e_menu_item_separator_set(mi, 1);
180 180
181 l = evas_hash_find(_e_int_menus_augmentation, "main/6"); 181 l = eina_hash_find(_e_int_menus_augmentation, "main/6");
182 if (l) _e_int_menus_augmentation_add(m, l); 182 if (l) _e_int_menus_augmentation_add(m, l);
183 183
184 mi = e_menu_item_new(subm); 184 mi = e_menu_item_new(subm);
@@ -191,13 +191,13 @@ e_int_menus_main_new(void)
191 e_util_menu_item_edje_icon_set(mi, "enlightenment/exit"); 191 e_util_menu_item_edje_icon_set(mi, "enlightenment/exit");
192 e_menu_item_callback_set(mi, _e_int_menus_main_exit, NULL); 192 e_menu_item_callback_set(mi, _e_int_menus_main_exit, NULL);
193 193
194 l = evas_hash_find(_e_int_menus_augmentation, "main/7"); 194 l = eina_hash_find(_e_int_menus_augmentation, "main/7");
195 if (l) _e_int_menus_augmentation_add(m, l); 195 if (l) _e_int_menus_augmentation_add(m, l);
196 196
197 mi = e_menu_item_new(m); 197 mi = e_menu_item_new(m);
198 e_menu_item_separator_set(mi, 1); 198 e_menu_item_separator_set(mi, 1);
199 199
200 l = evas_hash_find(_e_int_menus_augmentation, "main/8"); 200 l = eina_hash_find(_e_int_menus_augmentation, "main/8");
201 if (l) _e_int_menus_augmentation_add(m, l); 201 if (l) _e_int_menus_augmentation_add(m, l);
202 202
203 subm = e_int_menus_config_new(); 203 subm = e_int_menus_config_new();
@@ -207,7 +207,7 @@ e_int_menus_main_new(void)
207 e_util_menu_item_edje_icon_set(mi, "enlightenment/configuration"); 207 e_util_menu_item_edje_icon_set(mi, "enlightenment/configuration");
208 e_menu_item_submenu_set(mi, subm); 208 e_menu_item_submenu_set(mi, subm);
209 209
210 l = evas_hash_find(_e_int_menus_augmentation, "main/9"); 210 l = eina_hash_find(_e_int_menus_augmentation, "main/9");
211 if (l) _e_int_menus_augmentation_add(m, l); 211 if (l) _e_int_menus_augmentation_add(m, l);
212 212
213 l = evas_hash_find(_e_int_menus_augmentation, "main/10"); 213 l = evas_hash_find(_e_int_menus_augmentation, "main/10");
@@ -290,7 +290,7 @@ e_int_menus_favorite_apps_new(void)
290 const char *homedir; 290 const char *homedir;
291 291
292 homedir = e_user_homedir_get(); 292 homedir = e_user_homedir_get();
293 snprintf(buf, sizeof(buf), 293 snprintf(buf, sizeof(buf),
294 "%s/.e/e/applications/menu/favorite.menu", homedir); 294 "%s/.e/e/applications/menu/favorite.menu", homedir);
295 295
296 if (ecore_file_exists(buf)) m = e_int_menus_apps_new(buf); 296 if (ecore_file_exists(buf)) m = e_int_menus_apps_new(buf);
@@ -355,16 +355,14 @@ e_int_menus_menu_augmentation_add(const char *menu,
355 maug->del.func = func_del; 355 maug->del.func = func_del;
356 maug->del.data = data_del; 356 maug->del.data = data_del;
357 357
358 l = evas_hash_find(_e_int_menus_augmentation, menu); 358 l = eina_hash_find(_e_int_menus_augmentation, menu);
359 if (l) 359 if (l)
360 { 360 eina_hash_del(_e_int_menus_augmentation, menu, l);
361 _e_int_menus_augmentation =
362 evas_hash_del(_e_int_menus_augmentation, menu, l);
363 }
364 361
365 l = eina_list_append(l, maug); 362 l = eina_list_append(l, maug);
366 _e_int_menus_augmentation = 363 if (!_e_int_menus_augmentation)
367 evas_hash_add(_e_int_menus_augmentation, menu, l); 364 _e_int_menus_augmentation = eina_hash_string_superfast_new(NULL);
365 eina_hash_add(_e_int_menus_augmentation, menu, l);
368 366
369 return maug; 367 return maug;
370} 368}
@@ -374,22 +372,28 @@ e_int_menus_menu_augmentation_del(const char *menu, E_Int_Menu_Augmentation *mau
374{ 372{
375 Eina_List *l = NULL; 373 Eina_List *l = NULL;
376 374
377 l = evas_hash_find(_e_int_menus_augmentation, menu); 375 l = eina_hash_find(_e_int_menus_augmentation, menu);
378 if (l) 376 if (l)
379 { 377 {
380 /* 378 /*
381 * We should always add the list to the hash, in case the list 379 * We should always add the list to the hash, in case the list
382 * becomes empty, or the first element is removed. 380 * becomes empty, or the first element is removed.
383 */ 381 */
384 _e_int_menus_augmentation = 382 eina_hash_del(_e_int_menus_augmentation, menu, l);
385 evas_hash_del(_e_int_menus_augmentation, menu, l);
386 383
387 l = eina_list_remove(l, maug); 384 l = eina_list_remove(l, maug);
388 if (l) 385 if (l)
389 { 386 {
390 _e_int_menus_augmentation = 387 eina_hash_add(_e_int_menus_augmentation, menu, l);
391 evas_hash_add(_e_int_menus_augmentation, menu, l); 388 }
392 } 389 else
390 {
391 if (!eina_hash_population(_e_int_menus_augmentation))
392 {
393 eina_hash_free(_e_int_menus_augmentation);
394 _e_int_menus_augmentation = NULL;
395 }
396 }
393 } 397 }
394 free(maug); 398 free(maug);
395} 399}
@@ -414,18 +418,18 @@ _e_int_menus_main_del_hook(void *obj)
414 if (dat->lost_clients) e_object_del(E_OBJECT(dat->lost_clients)); 418 if (dat->lost_clients) e_object_del(E_OBJECT(dat->lost_clients));
415 free(dat); 419 free(dat);
416 } 420 }
417 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/0")); 421 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/0"));
418 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/1")); 422 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/1"));
419 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/2")); 423 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/2"));
420 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/3")); 424 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/3"));
421 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/4")); 425 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/4"));
422 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/5")); 426 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/5"));
423 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/6")); 427 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/6"));
424 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/7")); 428 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/7"));
425 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/8")); 429 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/8"));
426 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/9")); 430 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/9"));
427 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/10")); 431 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/10"));
428 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "main/11")); 432 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "main/11"));
429} 433}
430 434
431static void 435static void
@@ -737,14 +741,14 @@ _e_int_menus_config_pre_cb(void *data, E_Menu *m)
737 741
738 e_menu_pre_activate_callback_set(m, NULL, NULL); 742 e_menu_pre_activate_callback_set(m, NULL, NULL);
739 743
740 l = evas_hash_find(_e_int_menus_augmentation, "config/0"); 744 l = eina_hash_find(_e_int_menus_augmentation, "config/0");
741 if (l) 745 if (l)
742 { 746 {
743 _e_int_menus_augmentation_add(m, l); 747 _e_int_menus_augmentation_add(m, l);
744 mi = e_menu_item_new(m); 748 mi = e_menu_item_new(m);
745 e_menu_item_separator_set(mi, 1); 749 e_menu_item_separator_set(mi, 1);
746 } 750 }
747 751
748 if (e_configure_registry_exists("extensions/modules")) 752 if (e_configure_registry_exists("extensions/modules"))
749 { 753 {
750 mi = e_menu_item_new(m); 754 mi = e_menu_item_new(m);
@@ -753,14 +757,15 @@ _e_int_menus_config_pre_cb(void *data, E_Menu *m)
753 e_menu_item_callback_set(mi, _e_int_menus_module_item_cb, NULL); 757 e_menu_item_callback_set(mi, _e_int_menus_module_item_cb, NULL);
754 } 758 }
755 759
756 l = evas_hash_find(_e_int_menus_augmentation, "config/1"); 760 l = eina_hash_find(_e_int_menus_augmentation, "config/1");
757 if (l) _e_int_menus_augmentation_add(m, l); 761 if (l) _e_int_menus_augmentation_add(m, l);
758 762
759 l = evas_hash_find(_e_int_menus_augmentation, "config/2"); 763 l = eina_hash_find(_e_int_menus_augmentation, "config/2");
760 if (l) 764 if (l)
761 { 765 {
762 mi = e_menu_item_new(m); 766 mi = e_menu_item_new(m);
763 e_menu_item_separator_set(mi, 1); 767 e_menu_item_separator_set(mi, 1);
768
764 _e_int_menus_augmentation_add(m, l); 769 _e_int_menus_augmentation_add(m, l);
765 } 770 }
766 771
@@ -773,9 +778,9 @@ _e_int_menus_config_free_hook(void *obj)
773 E_Menu *m; 778 E_Menu *m;
774 779
775 m = obj; 780 m = obj;
776 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "config/0")); 781 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "config/0"));
777 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "config/1")); 782 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "config/1"));
778 _e_int_menus_augmentation_del(m, evas_hash_find(_e_int_menus_augmentation, "config/2")); 783 _e_int_menus_augmentation_del(m, eina_hash_find(_e_int_menus_augmentation, "config/2"));
779} 784}
780 785
781static int 786static int
diff --git a/src/bin/e_intl.c b/src/bin/e_intl.c
index ee6b889df..53a8b268a 100644
--- a/src/bin/e_intl.c
+++ b/src/bin/e_intl.c
@@ -41,13 +41,13 @@ static Eina_List *_e_intl_language_dir_scan(const char *dir);
41static int _e_intl_language_list_find(Eina_List *language_list, char *language); 41static int _e_intl_language_list_find(Eina_List *language_list, char *language);
42 42
43/* Locale Validation and Discovery */ 43/* Locale Validation and Discovery */
44static Evas_Hash *_e_intl_locale_alias_hash_get(void); 44static Eina_Hash *_e_intl_locale_alias_hash_get(void);
45static char *_e_intl_locale_alias_get(const char *language); 45static char *_e_intl_locale_alias_get(const char *language);
46static Eina_List *_e_intl_locale_system_locales_get(void); 46static Eina_List *_e_intl_locale_system_locales_get(void);
47static Eina_List *_e_intl_locale_search_order_get(const char *locale); 47static Eina_List *_e_intl_locale_search_order_get(const char *locale);
48static int _e_intl_locale_validate(const char *locale); 48static int _e_intl_locale_validate(const char *locale);
49static void _e_intl_locale_hash_free(Evas_Hash *language_hash); 49static void _e_intl_locale_hash_free(Eina_Hash *language_hash);
50static Evas_Bool _e_intl_locale_hash_free_cb(const Evas_Hash *hash, const void *key, void *data, void *fdata); 50static Evas_Bool _e_intl_locale_hash_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata);
51 51
52/* Input Method Configuration and Management */ 52/* Input Method Configuration and Management */
53static int _e_intl_cb_exit(void *data, int type, void *event); 53static int _e_intl_cb_exit(void *data, int type, void *event);
@@ -459,15 +459,15 @@ _e_intl_cb_exit(void *data, int type, void *event)
459} 459}
460 460
461static void 461static void
462_e_intl_locale_hash_free(Evas_Hash *locale_hash) 462_e_intl_locale_hash_free(Eina_Hash *locale_hash)
463{ 463{
464 if (!locale_hash) return; 464 if (!locale_hash) return;
465 evas_hash_foreach(locale_hash, _e_intl_locale_hash_free_cb, NULL); 465 eina_hash_foreach(locale_hash, _e_intl_locale_hash_free_cb, NULL);
466 evas_hash_free(locale_hash); 466 eina_hash_free(locale_hash);
467} 467}
468 468
469static Evas_Bool 469static Eina_Bool
470_e_intl_locale_hash_free_cb(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) 470_e_intl_locale_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
471{ 471{
472 free(data); 472 free(data);
473 return 1; 473 return 1;
@@ -576,7 +576,7 @@ _e_intl_language_dir_scan(const char *dir)
576static char * 576static char *
577_e_intl_locale_alias_get(const char *language) 577_e_intl_locale_alias_get(const char *language)
578{ 578{
579 Evas_Hash *alias_hash; 579 Eina_Hash *alias_hash;
580 char *alias; 580 char *alias;
581 char *lower_language; 581 char *lower_language;
582 char *noenc_language; 582 char *noenc_language;
@@ -594,7 +594,7 @@ _e_intl_locale_alias_get(const char *language)
594 lower_language[i] = tolower(language[i]); 594 lower_language[i] = tolower(language[i]);
595 lower_language[i] = 0; 595 lower_language[i] = 0;
596 596
597 alias = evas_hash_find(alias_hash, lower_language); 597 alias = eina_hash_find(alias_hash, lower_language);
598 free(lower_language); 598 free(lower_language);
599 599
600 if (alias) 600 if (alias)
@@ -607,12 +607,12 @@ _e_intl_locale_alias_get(const char *language)
607 return alias; 607 return alias;
608} 608}
609 609
610static Evas_Hash * 610static Eina_Hash *
611_e_intl_locale_alias_hash_get(void) 611_e_intl_locale_alias_hash_get(void)
612{ 612{
613 Eina_List *next; 613 Eina_List *next;
614 Eina_List *dir_list; 614 Eina_List *dir_list;
615 Evas_Hash *alias_hash; 615 Eina_Hash *alias_hash;
616 616
617 dir_list = e_path_dir_list_get(path_messages); 617 dir_list = e_path_dir_list_get(path_messages);
618 alias_hash = NULL; 618 alias_hash = NULL;
@@ -639,10 +639,11 @@ _e_intl_locale_alias_hash_get(void)
639 continue; 639 continue;
640 640
641 /* skip dupes */ 641 /* skip dupes */
642 if (evas_hash_find(alias_hash, alias)) 642 if (eina_hash_find(alias_hash, alias))
643 continue; 643 continue;
644 644
645 alias_hash = evas_hash_add(alias_hash, alias, strdup(locale)); 645 if (!alias_hash) alias_hash = eina_hash_string_superfast_new(NULL);
646 eina_hash_add(alias_hash, alias, strdup(locale));
646 } 647 }
647 fclose (f); 648 fclose (f);
648 } 649 }
diff --git a/src/bin/e_ipc_codec.c b/src/bin/e_ipc_codec.c
index 209b44fa7..b25eccf69 100644
--- a/src/bin/e_ipc_codec.c
+++ b/src/bin/e_ipc_codec.c
@@ -28,15 +28,27 @@ static Eet_Data_Descriptor *_e_ipc_3int_3str_list_edd = NULL;
28static Eet_Data_Descriptor *_e_ipc_str_4int_edd = NULL; 28static Eet_Data_Descriptor *_e_ipc_str_4int_edd = NULL;
29static Eet_Data_Descriptor *_e_ipc_str_4int_list_edd = NULL; 29static Eet_Data_Descriptor *_e_ipc_str_4int_list_edd = NULL;
30 30
31static void *
32_e_ipc_codec_eina_hash_add(void *hash, const void *key, void *data)
33{
34 Eina_Hash *result = hash;
35
36 if (!result) result = eina_hash_string_superfast_new(NULL);
37 if (!result) return NULL;
38
39 eina_hash_add(result, key, data);
40 return result;
41}
42
31#define E_IPC_DD_NEW(str, typ) \ 43#define E_IPC_DD_NEW(str, typ) \
32 eet_data_descriptor_new(str, sizeof(typ), \ 44 eet_data_descriptor_new(str, sizeof(typ), \
33 (void *(*) (void *))eina_list_next, \ 45 (void *(*) (void *))eina_list_next, \
34 (void *(*) (void *, void *))eina_list_append, \ 46 (void *(*) (void *, void *))eina_list_append, \
35 (void *(*) (void *))eina_list_data_get, \ 47 (void *(*) (void *))eina_list_data_get, \
36 (void *(*) (void *))eina_list_free, \ 48 (void *(*) (void *))eina_list_free, \
37 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))evas_hash_foreach, \ 49 (void (*) (void *, int (*) (void *, const char *, void *, void *), void *))eina_hash_foreach, \
38 (void *(*) (void *, const char *, void *))evas_hash_add, \ 50 (void *(*) (void *, const char *, void *))_e_ipc_codec_eina_hash_add, \
39 (void (*) (void *))evas_hash_free) 51 (void (*) (void *))eina_hash_free)
40 52
41/* externally accessible functions */ 53/* externally accessible functions */
42EAPI int 54EAPI int
diff --git a/src/bin/e_manager.c b/src/bin/e_manager.c
index 8b16bfe33..6b5ad9a74 100644
--- a/src/bin/e_manager.c
+++ b/src/bin/e_manager.c
@@ -15,7 +15,7 @@ static int _e_manager_cb_ping(void *data, int ev_type, void *ev);
15static int _e_manager_cb_screensaver_notify(void *data, int ev_type, void *ev); 15static int _e_manager_cb_screensaver_notify(void *data, int ev_type, void *ev);
16static int _e_manager_cb_client_message(void *data, int ev_type, void *ev); 16static int _e_manager_cb_client_message(void *data, int ev_type, void *ev);
17 17
18static Evas_Bool _e_manager_frame_extents_free_cb(const Evas_Hash *hash __UNUSED__, 18static Eina_Bool _e_manager_frame_extents_free_cb(const Eina_Hash *hash __UNUSED__,
19 const void *key __UNUSED__, 19 const void *key __UNUSED__,
20 void *data, void *fdata __UNUSED__); 20 void *data, void *fdata __UNUSED__);
21static E_Manager *_e_manager_get_for_root(Ecore_X_Window root); 21static E_Manager *_e_manager_get_for_root(Ecore_X_Window root);
@@ -44,13 +44,14 @@ struct _Frame_Extents
44}; 44};
45 45
46static Eina_List *managers = NULL; 46static Eina_List *managers = NULL;
47static Evas_Hash *frame_extents = NULL; 47static Eina_Hash *frame_extents = NULL;
48 48
49/* externally accessible functions */ 49/* externally accessible functions */
50EAPI int 50EAPI int
51e_manager_init(void) 51e_manager_init(void)
52{ 52{
53 ecore_x_screensaver_event_listen_set(1); 53 ecore_x_screensaver_event_listen_set(1);
54 frame_extents = eina_hash_string_superfast_new(NULL);
54 return 1; 55 return 1;
55} 56}
56 57
@@ -68,8 +69,8 @@ e_manager_shutdown(void)
68 } 69 }
69 if (frame_extents) 70 if (frame_extents)
70 { 71 {
71 evas_hash_foreach(frame_extents, _e_manager_frame_extents_free_cb, NULL); 72 eina_hash_foreach(frame_extents, _e_manager_frame_extents_free_cb, NULL);
72 evas_hash_free(frame_extents); 73 eina_hash_free(frame_extents);
73 frame_extents = NULL; 74 frame_extents = NULL;
74 } 75 }
75 return 1; 76 return 1;
@@ -712,7 +713,7 @@ _e_manager_cb_frame_extents_request(void *data, int ev_type __UNUSED__, void *ev
712 free(state); 713 free(state);
713 } 714 }
714 715
715 extents = evas_hash_find(frame_extents, key); 716 extents = eina_hash_find(frame_extents, key);
716 if (!extents) 717 if (!extents)
717 { 718 {
718 extents = E_NEW(Frame_Extents, 1); 719 extents = E_NEW(Frame_Extents, 1);
@@ -751,7 +752,7 @@ _e_manager_cb_frame_extents_request(void *data, int ev_type __UNUSED__, void *ev
751 extents->b = 0; 752 extents->b = 0;
752 } 753 }
753 evas_object_del(o); 754 evas_object_del(o);
754 frame_extents = evas_hash_add(frame_extents, key, extents); 755 eina_hash_add(frame_extents, key, extents);
755 } 756 }
756 } 757 }
757 758
@@ -852,12 +853,12 @@ _e_manager_cb_client_message(void *data, int ev_type, void *ev)
852 } 853 }
853 } 854 }
854 } 855 }
855 856
856 return 1; 857 return 1;
857} 858}
858 859
859static Evas_Bool 860static Eina_Bool
860_e_manager_frame_extents_free_cb(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, 861_e_manager_frame_extents_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
861 void *data, void *fdata __UNUSED__) 862 void *data, void *fdata __UNUSED__)
862{ 863{
863 free(data); 864 free(data);
diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c
index 74c8e2df4..c3c07be3a 100644
--- a/src/bin/e_menu.c
+++ b/src/bin/e_menu.c
@@ -86,14 +86,14 @@ static int _e_menu_cb_scroll_animator (void *data);
86static int _e_menu_cb_window_shape (void *data, int ev_type, void *ev); 86static int _e_menu_cb_window_shape (void *data, int ev_type, void *ev);
87 87
88static void _e_menu_cb_item_submenu_post_default (void *data, E_Menu *m, E_Menu_Item *mi); 88static void _e_menu_cb_item_submenu_post_default (void *data, E_Menu *m, E_Menu_Item *mi);
89static Evas_Bool _e_menu_categories_free_cb(const Evas_Hash *hash, const void *key, void *data, void *fdata); 89static Evas_Bool _e_menu_categories_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata);
90 90
91/* local subsystem globals */ 91/* local subsystem globals */
92static Ecore_X_Window _e_menu_win = 0; 92static Ecore_X_Window _e_menu_win = 0;
93static Eina_List *_e_active_menus = NULL; 93static Eina_List *_e_active_menus = NULL;
94static E_Menu_Item *_e_active_menu_item = NULL; 94static E_Menu_Item *_e_active_menu_item = NULL;
95/*static Evas_Hash *_e_menu_category_items = NULL;*/ 95/*static Eina_Hash *_e_menu_category_items = NULL;*/
96static Evas_Hash *_e_menu_categories = NULL; 96static Eina_Hash *_e_menu_categories = NULL;
97static Ecore_X_Time _e_menu_activate_time = 0; 97static Ecore_X_Time _e_menu_activate_time = 0;
98static int _e_menu_activate_floating = 0; 98static int _e_menu_activate_floating = 0;
99static int _e_menu_activate_maybe_drag = 0; 99static int _e_menu_activate_maybe_drag = 0;
@@ -124,6 +124,7 @@ e_menu_init(void)
124 _e_menu_mouse_move_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _e_menu_cb_mouse_move, NULL); 124 _e_menu_mouse_move_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _e_menu_cb_mouse_move, NULL);
125 _e_menu_mouse_wheel_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, _e_menu_cb_mouse_wheel, NULL); 125 _e_menu_mouse_wheel_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, _e_menu_cb_mouse_wheel, NULL);
126 _e_menu_window_shape_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE, _e_menu_cb_window_shape, NULL); 126 _e_menu_window_shape_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE, _e_menu_cb_window_shape, NULL);
127 _e_menu_categories = eina_hash_string_superfast_new(NULL);
127 return 1; 128 return 1;
128} 129}
129 130
@@ -153,11 +154,11 @@ e_menu_shutdown(void)
153 _e_active_menus = NULL; 154 _e_active_menus = NULL;
154 if (_e_menu_categories) 155 if (_e_menu_categories)
155 { 156 {
156 evas_hash_foreach(_e_menu_categories, _e_menu_categories_free_cb, NULL); 157 eina_hash_foreach(_e_menu_categories, _e_menu_categories_free_cb, NULL);
157 evas_hash_free(_e_menu_categories); 158 eina_hash_free(_e_menu_categories);
158 _e_menu_categories = NULL; 159 _e_menu_categories = NULL;
159 } 160 }
160 161
161 return 1; 162 return 1;
162} 163}
163 164
@@ -438,15 +439,15 @@ EAPI void
438e_menu_category_data_set(char *category, void *data) 439e_menu_category_data_set(char *category, void *data)
439{ 440{
440 E_Menu_Category *cat; 441 E_Menu_Category *cat;
441 442
442 cat = evas_hash_find(_e_menu_categories, category); 443 cat = eina_hash_find(_e_menu_categories, category);
443 if (cat) 444 if (cat)
444 cat->data = data; 445 cat->data = data;
445 else /* if it isnt found create the new hash */ 446 else /* if it isnt found create the new hash */
446 { 447 {
447 cat = calloc(1, sizeof(E_Menu_Category)); 448 cat = calloc(1, sizeof(E_Menu_Category));
448 cat->data = data; 449 cat->data = data;
449 _e_menu_categories = evas_hash_add(_e_menu_categories, category, cat); 450 eina_hash_add(_e_menu_categories, category, cat);
450 } 451 }
451} 452}
452 453
@@ -455,12 +456,12 @@ e_menu_category_callback_add(char *category, void (*create) (E_Menu *m, void *ca
455{ 456{
456 E_Menu_Category *cat; 457 E_Menu_Category *cat;
457 E_Menu_Category_Callback *cb = NULL; 458 E_Menu_Category_Callback *cb = NULL;
458 459
459 cat = evas_hash_find(_e_menu_categories, category); 460 cat = eina_hash_find(_e_menu_categories, category);
460 if (!cat) /* if it isnt found create the new hash */ 461 if (!cat) /* if it isnt found create the new hash */
461 { 462 {
462 cat = calloc(1, sizeof(E_Menu_Category)); 463 cat = calloc(1, sizeof(E_Menu_Category));
463 _e_menu_categories = evas_hash_add(_e_menu_categories, category, cat); 464 eina_hash_add(_e_menu_categories, category, cat);
464 } 465 }
465 if (cat) 466 if (cat)
466 { 467 {
@@ -484,7 +485,7 @@ e_menu_category_callback_del(E_Menu_Category_Callback *cb)
484 485
485 if (cb) 486 if (cb)
486 { 487 {
487 cat = evas_hash_find(_e_menu_categories, cb->category); 488 cat = eina_hash_find(_e_menu_categories, cb->category);
488 if (cat) 489 if (cat)
489 cat->callbacks = eina_list_remove(cat->callbacks, cb); 490 cat->callbacks = eina_list_remove(cat->callbacks, cb);
490 eina_stringshare_del(cb->category); 491 eina_stringshare_del(cb->category);
@@ -1021,9 +1022,9 @@ _e_menu_free(E_Menu *m)
1021{ 1022{
1022 Eina_List *l, *tmp; 1023 Eina_List *l, *tmp;
1023 E_Menu_Category *cat; 1024 E_Menu_Category *cat;
1024 1025
1025 /* the foreign menu items */ 1026 /* the foreign menu items */
1026 cat = evas_hash_find(_e_menu_categories, m->category); 1027 cat = eina_hash_find(_e_menu_categories, m->category);
1027 if (cat) 1028 if (cat)
1028 { 1029 {
1029 for (l = cat->callbacks; l; l = l->next) 1030 for (l = cat->callbacks; l; l = l->next)
@@ -2875,11 +2876,11 @@ _e_menu_cb_item_submenu_post_default(void *data, E_Menu *m, E_Menu_Item *mi)
2875 2876
2876 2877
2877static Evas_Bool 2878static Evas_Bool
2878_e_menu_categories_free_cb(const Evas_Hash *hash, const void *key, void *data, void *fdata) 2879_e_menu_categories_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata)
2879{ 2880{
2880 Eina_List *l; 2881 Eina_List *l;
2881 E_Menu_Category *cat; 2882 E_Menu_Category *cat;
2882 2883
2883 cat = (E_Menu_Category *) data; 2884 cat = (E_Menu_Category *) data;
2884 l = (Eina_List *) cat->callbacks; 2885 l = (Eina_List *) cat->callbacks;
2885 while (l) 2886 while (l)
diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index ed24ffc0b..5ef7982c3 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -72,15 +72,15 @@ EAPI void
72e_module_all_load(void) 72e_module_all_load(void)
73{ 73{
74 Eina_List *l; 74 Eina_List *l;
75 E_Config_Module *em;
76
75 e_config->modules = eina_list_sort(e_config->modules, 77 e_config->modules = eina_list_sort(e_config->modules,
76 eina_list_count(e_config->modules), 78 eina_list_count(e_config->modules),
77 _e_module_sort_priority); 79 _e_module_sort_priority);
78 for (l = e_config->modules; l; l = l->next) 80 EINA_LIST_FOREACH(e_config->modules, l, em)
79 { 81 {
80 E_Config_Module *em;
81 E_Module *m; 82 E_Module *m;
82 83
83 em = l->data;
84 if (!em) continue; 84 if (!em) continue;
85 if ((em->delayed) && (em->enabled)) 85 if ((em->delayed) && (em->enabled))
86 { 86 {
@@ -258,7 +258,8 @@ e_module_enable(E_Module *m)
258{ 258{
259 Eina_List *l; 259 Eina_List *l;
260 E_Event_Module_Update *ev; 260 E_Event_Module_Update *ev;
261 261 E_Config_Module *em;
262
262 E_OBJECT_CHECK_RETURN(m, 0); 263 E_OBJECT_CHECK_RETURN(m, 0);
263 E_OBJECT_TYPE_CHECK_RETURN(m, E_MODULE_TYPE, 0); 264 E_OBJECT_TYPE_CHECK_RETURN(m, E_MODULE_TYPE, 0);
264 if ((m->enabled) || (m->error)) return 0; 265 if ((m->enabled) || (m->error)) return 0;
@@ -266,21 +267,18 @@ e_module_enable(E_Module *m)
266 if (m->data) 267 if (m->data)
267 { 268 {
268 m->enabled = 1; 269 m->enabled = 1;
269 for (l = e_config->modules; l; l = l->next) 270 EINA_LIST_FOREACH(e_config->modules, l, em)
270 { 271 {
271 E_Config_Module *em;
272
273 em = l->data;
274 if (!em) continue; 272 if (!em) continue;
275 if (!e_util_strcmp(em->name, m->name)) 273 if (!e_util_strcmp(em->name, m->name))
276 { 274 {
277 em->enabled = 1; 275 em->enabled = 1;
278 e_config_save_queue(); 276 e_config_save_queue();
279 277
280 ev = E_NEW(E_Event_Module_Update, 1); 278 ev = E_NEW(E_Event_Module_Update, 1);
281 ev->name = strdup(em->name); 279 ev->name = strdup(em->name);
282 ev->enabled = 1; 280 ev->enabled = 1;
283 ecore_event_add(E_EVENT_MODULE_UPDATE, ev, 281 ecore_event_add(E_EVENT_MODULE_UPDATE, ev,
284 _e_module_event_update_free, NULL); 282 _e_module_event_update_free, NULL);
285 break; 283 break;
286 } 284 }
@@ -295,29 +293,27 @@ e_module_disable(E_Module *m)
295{ 293{
296 E_Event_Module_Update *ev; 294 E_Event_Module_Update *ev;
297 Eina_List *l; 295 Eina_List *l;
296 E_Config_Module *em;
298 int ret; 297 int ret;
299 298
300 E_OBJECT_CHECK_RETURN(m, 0); 299 E_OBJECT_CHECK_RETURN(m, 0);
301 E_OBJECT_TYPE_CHECK_RETURN(m, E_MODULE_TYPE, 0); 300 E_OBJECT_TYPE_CHECK_RETURN(m, E_MODULE_TYPE, 0);
302 if ((!m->enabled) || (m->error)) return 0; 301 if ((!m->enabled) || (m->error)) return 0;
303 ret = m->func.shutdown(m); 302 ret = m->func.shutdown(m);
304 m->data = NULL; 303 m->data = NULL;
305 m->enabled = 0; 304 m->enabled = 0;
306 for (l = e_config->modules; l; l = l->next) 305 EINA_LIST_FOREACH(e_config->modules, l, em)
307 { 306 {
308 E_Config_Module *em;
309
310 em = l->data;
311 if (!em) continue; 307 if (!em) continue;
312 if (!e_util_strcmp(em->name, m->name)) 308 if (!e_util_strcmp(em->name, m->name))
313 { 309 {
314 em->enabled = 0; 310 em->enabled = 0;
315 e_config_save_queue(); 311 e_config_save_queue();
316 312
317 ev = E_NEW(E_Event_Module_Update, 1); 313 ev = E_NEW(E_Event_Module_Update, 1);
318 ev->name = strdup(em->name); 314 ev->name = strdup(em->name);
319 ev->enabled = 0; 315 ev->enabled = 0;
320 ecore_event_add(E_EVENT_MODULE_UPDATE, ev, 316 ecore_event_add(E_EVENT_MODULE_UPDATE, ev,
321 _e_module_event_update_free, NULL); 317 _e_module_event_update_free, NULL);
322 break; 318 break;
323 } 319 }
@@ -337,20 +333,18 @@ EAPI int
337e_module_save_all(void) 333e_module_save_all(void)
338{ 334{
339 Eina_List *l; 335 Eina_List *l;
336 E_Module *m;
340 int ret = 1; 337 int ret = 1;
341 338
342 for (l = _e_modules; l; l = l->next) e_object_ref(E_OBJECT(l->data)); 339 EINA_LIST_FOREACH(_e_modules, l, m)
343 for (l = _e_modules; l; l = l->next) 340 e_object_ref(E_OBJECT(m));
344 { 341 EINA_LIST_FOREACH(_e_modules, l, m)
345 E_Module *m;
346
347 m = l->data;
348 if ((m->enabled) && (!m->error)) 342 if ((m->enabled) && (!m->error))
349 { 343 {
350 if (!m->func.save(m)) ret = 0; 344 if (!m->func.save(m)) ret = 0;
351 } 345 }
352 } 346 EINA_LIST_FOREACH(_e_modules, l, m)
353 for (l = _e_modules; l; l = l->next) e_object_unref(E_OBJECT(l->data)); 347 e_object_unref(E_OBJECT(m));
354 return ret; 348 return ret;
355} 349}
356 350
@@ -358,15 +352,11 @@ EAPI E_Module *
358e_module_find(const char *name) 352e_module_find(const char *name)
359{ 353{
360 Eina_List *l; 354 Eina_List *l;
361 355 E_Module *m;
356
362 if (!name) return NULL; 357 if (!name) return NULL;
363 for (l = _e_modules; l; l = l->next) 358 EINA_LIST_FOREACH(_e_modules, l, m)
364 { 359 if (!e_util_strcmp(name, m->name)) return m;
365 E_Module *m;
366
367 m = l->data;
368 if (!e_util_strcmp(name, m->name)) return m;
369 }
370 return NULL; 360 return NULL;
371} 361}
372 362
diff --git a/src/bin/e_path.c b/src/bin/e_path.c
index 7fa6e4734..6d1b832ee 100644
--- a/src/bin/e_path.c
+++ b/src/bin/e_path.c
@@ -6,14 +6,14 @@
6/* local subsystem functions */ 6/* local subsystem functions */
7static void _e_path_free(E_Path *ep); 7static void _e_path_free(E_Path *ep);
8static void _e_path_cache_free(E_Path *ep); 8static void _e_path_cache_free(E_Path *ep);
9static Evas_Bool _e_path_cache_free_cb(const Evas_Hash *hash, const void *key, void *data, void *fdata); 9static Eina_Bool _e_path_cache_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata);
10 10
11/* externally accessible functions */ 11/* externally accessible functions */
12EAPI E_Path * 12EAPI E_Path *
13e_path_new(void) 13e_path_new(void)
14{ 14{
15 E_Path *ep; 15 E_Path *ep;
16 16
17 ep = E_OBJECT_ALLOC(E_Path, E_PATH_TYPE, _e_path_free); 17 ep = E_OBJECT_ALLOC(E_Path, E_PATH_TYPE, _e_path_free);
18 return ep; 18 return ep;
19} 19}
@@ -239,30 +239,30 @@ EAPI const char *
239e_path_find(E_Path *ep, const char *file) 239e_path_find(E_Path *ep, const char *file)
240{ 240{
241 Eina_List *l; 241 Eina_List *l;
242 E_Path_Dir *epd;
242 char *str; 243 char *str;
243 char buf[PATH_MAX] = ""; 244 char buf[PATH_MAX] = "";
244 245
245 E_OBJECT_CHECK_RETURN(ep, NULL); 246 E_OBJECT_CHECK_RETURN(ep, NULL);
246 E_OBJECT_TYPE_CHECK_RETURN(ep, E_PATH_TYPE, NULL); 247 E_OBJECT_TYPE_CHECK_RETURN(ep, E_PATH_TYPE, NULL);
247 248
248 if (!file) return NULL; 249 if (!file) return NULL;
249 str = evas_hash_find(ep->hash, file); 250 str = eina_hash_find(ep->hash, file);
250 if (str) return eina_stringshare_add(str); 251 if (str) return eina_stringshare_add(str);
251 /* Look in the default dir list */ 252 /* Look in the default dir list */
252 for (l = ep->default_dir_list; l; l = l->next) 253 EINA_LIST_FOREACH(ep->default_dir_list, l, epd)
253 { 254 {
254 E_Path_Dir *epd;
255
256 epd = l->data;
257 if (epd->dir) 255 if (epd->dir)
258 { 256 {
259 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file); 257 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
260 if (ecore_file_exists(buf)) 258 if (ecore_file_exists(buf))
261 { 259 {
262 if (evas_hash_size(ep->hash) >= 512) 260 if (eina_hash_population(ep->hash) >= 512)
263 _e_path_cache_free(ep); 261 _e_path_cache_free(ep);
264 ep->hash = evas_hash_add(ep->hash, file, 262 if (!ep->hash)
265 eina_stringshare_add(buf)); 263 ep->hash = eina_hash_string_superfast_new(NULL);
264 eina_hash_add(ep->hash, file,
265 eina_stringshare_add(buf));
266 return eina_stringshare_add(buf); 266 return eina_stringshare_add(buf);
267 } 267 }
268 } 268 }
@@ -271,17 +271,19 @@ e_path_find(E_Path *ep, const char *file)
271 for (l = *(ep->user_dir_list); l; l = l->next) 271 for (l = *(ep->user_dir_list); l; l = l->next)
272 { 272 {
273 E_Path_Dir *epd; 273 E_Path_Dir *epd;
274 274
275 epd = l->data; 275 epd = l->data;
276 if (epd->dir) 276 if (epd->dir)
277 { 277 {
278 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file); 278 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
279 if (ecore_file_exists(buf)) 279 if (ecore_file_exists(buf))
280 { 280 {
281 if (evas_hash_size(ep->hash) >= 512) 281 if (eina_hash_population(ep->hash) >= 512)
282 _e_path_cache_free(ep); 282 _e_path_cache_free(ep);
283 ep->hash = evas_hash_add(ep->hash, file, 283 if (!ep->hash)
284 eina_stringshare_add(buf)); 284 ep->hash = eina_hash_string_superfast_new(NULL);
285 eina_hash_add(ep->hash, file,
286 eina_stringshare_add(buf));
285 return eina_stringshare_add(buf); 287 return eina_stringshare_add(buf);
286 } 288 }
287 } 289 }
@@ -381,13 +383,13 @@ static void
381_e_path_cache_free(E_Path *ep) 383_e_path_cache_free(E_Path *ep)
382{ 384{
383 if (!ep->hash) return; 385 if (!ep->hash) return;
384 evas_hash_foreach(ep->hash, _e_path_cache_free_cb, NULL); 386 eina_hash_foreach(ep->hash, _e_path_cache_free_cb, NULL);
385 evas_hash_free(ep->hash); 387 eina_hash_free(ep->hash);
386 ep->hash = NULL; 388 ep->hash = NULL;
387} 389}
388 390
389static Evas_Bool 391static Eina_Bool
390_e_path_cache_free_cb(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) 392_e_path_cache_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
391{ 393{
392 eina_stringshare_del(data); 394 eina_stringshare_del(data);
393 return 1; 395 return 1;
diff --git a/src/bin/e_path.h b/src/bin/e_path.h
index c66b74a10..426336414 100644
--- a/src/bin/e_path.h
+++ b/src/bin/e_path.h
@@ -20,9 +20,9 @@ struct _E_Path_Dir
20struct _E_Path 20struct _E_Path
21{ 21{
22 E_Object e_obj_inherit; 22 E_Object e_obj_inherit;
23 23
24 Evas_Hash *hash; 24 Eina_Hash *hash;
25 25
26 Eina_List *default_dir_list; 26 Eina_List *default_dir_list;
27 /* keep track of the associated e_config path */ 27 /* keep track of the associated e_config path */
28 Eina_List **user_dir_list; 28 Eina_List **user_dir_list;
@@ -39,7 +39,7 @@ EAPI void e_path_user_path_append(E_Path *ep, const char *path);
39EAPI void e_path_user_path_prepend(E_Path *ep, const char *path); 39EAPI void e_path_user_path_prepend(E_Path *ep, const char *path);
40EAPI void e_path_user_path_remove(E_Path *ep, const char *path); 40EAPI void e_path_user_path_remove(E_Path *ep, const char *path);
41EAPI void e_path_user_path_clear(E_Path *ep); 41EAPI void e_path_user_path_clear(E_Path *ep);
42EAPI const char *e_path_find(E_Path *ep, const char *file); 42EAPI const char *e_path_find(E_Path *ep, const char *file);
43EAPI void e_path_evas_append(E_Path *ep, Evas *evas); 43EAPI void e_path_evas_append(E_Path *ep, Evas *evas);
44EAPI Eina_List *e_path_dir_list_get(E_Path *ep); 44EAPI Eina_List *e_path_dir_list_get(E_Path *ep);
45EAPI void e_path_dir_list_free(Eina_List *dir_list); 45EAPI void e_path_dir_list_free(Eina_List *dir_list);
diff --git a/src/bin/e_remote_main.c b/src/bin/e_remote_main.c
index 5f8ec744d..0fc3fe189 100644
--- a/src/bin/e_remote_main.c
+++ b/src/bin/e_remote_main.c
@@ -9,11 +9,11 @@ typedef struct _Opt Opt;
9 9
10struct _Opt 10struct _Opt
11{ 11{
12 const char *opt; 12 char *opt;
13 int num_param; 13 int num_param;
14 const char *desc; 14 char *desc;
15 int num_reply; 15 int num_reply;
16 E_Ipc_Op opcode; 16 E_Ipc_Op opcode;
17}; 17};
18 18
19Opt opts[] = { 19Opt opts[] = {
diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 1164613c6..52b177f0d 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -29,7 +29,7 @@ static void _e_shelf_menu_pre_cb(void *data, E_Menu *m);
29static void _e_shelf_edge_event_register(E_Shelf *es, int reg); 29static void _e_shelf_edge_event_register(E_Shelf *es, int reg);
30 30
31static Eina_List *shelves = NULL; 31static Eina_List *shelves = NULL;
32static Evas_Hash *winid_shelves = NULL; 32static Eina_Hash *winid_shelves = NULL;
33 33
34/* externally accessible functions */ 34/* externally accessible functions */
35EAPI int 35EAPI int
@@ -177,7 +177,8 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
177 e_gadcon_shelf_set(es->gadcon, es); 177 e_gadcon_shelf_set(es->gadcon, es);
178 if (popup) 178 if (popup)
179 { 179 {
180 winid_shelves = evas_hash_add(winid_shelves, e_util_winid_str_get(es->popup->evas_win), es); 180 if (!winid_shelves) winid_shelves = eina_hash_string_superfast_new(NULL);
181 eina_hash_add(winid_shelves, e_util_winid_str_get(es->popup->evas_win), es);
181 e_drop_xdnd_register_set(es->popup->evas_win, 1); 182 e_drop_xdnd_register_set(es->popup->evas_win, 1);
182 e_gadcon_xdnd_window_set(es->gadcon, es->popup->evas_win); 183 e_gadcon_xdnd_window_set(es->gadcon, es->popup->evas_win);
183 e_gadcon_dnd_window_set(es->gadcon, es->popup->evas_win); 184 e_gadcon_dnd_window_set(es->gadcon, es->popup->evas_win);
@@ -733,7 +734,12 @@ _e_shelf_free(E_Shelf *es)
733 { 734 {
734 _e_shelf_edge_event_register(es, 0); 735 _e_shelf_edge_event_register(es, 0);
735 e_drop_xdnd_register_set(es->popup->evas_win, 0); 736 e_drop_xdnd_register_set(es->popup->evas_win, 0);
736 winid_shelves = evas_hash_del(winid_shelves, e_util_winid_str_get(es->popup->evas_win), es); 737 eina_hash_del(winid_shelves, e_util_winid_str_get(es->popup->evas_win), es);
738 if (!eina_hash_population(winid_shelves))
739 {
740 eina_hash_free(winid_shelves);
741 winid_shelves = NULL;
742 }
737 e_object_del(E_OBJECT(es->popup)); 743 e_object_del(E_OBJECT(es->popup));
738 } 744 }
739 free(es); 745 free(es);
diff --git a/src/bin/e_stolen.c b/src/bin/e_stolen.c
index 7b6614e11..e7740df22 100644
--- a/src/bin/e_stolen.c
+++ b/src/bin/e_stolen.c
@@ -11,15 +11,15 @@ struct _E_Stolen_Window
11 int refcount; 11 int refcount;
12}; 12};
13 13
14static Evas_Hash *_e_stolen_windows = NULL; 14static Eina_Hash *_e_stolen_windows = NULL;
15 15
16/* externally accessible functions */ 16/* externally accessible functions */
17EAPI int 17EAPI int
18e_stolen_win_get(Ecore_X_Window win) 18e_stolen_win_get(Ecore_X_Window win)
19{ 19{
20 E_Stolen_Window *esw; 20 E_Stolen_Window *esw;
21 21
22 esw = evas_hash_find(_e_stolen_windows, e_util_winid_str_get(win)); 22 esw = eina_hash_find(_e_stolen_windows, e_util_winid_str_get(win));
23 if (esw) return 1; 23 if (esw) return 1;
24 return 0; 24 return 0;
25} 25}
@@ -28,8 +28,8 @@ EAPI void
28e_stolen_win_add(Ecore_X_Window win) 28e_stolen_win_add(Ecore_X_Window win)
29{ 29{
30 E_Stolen_Window *esw; 30 E_Stolen_Window *esw;
31 31
32 esw = evas_hash_find(_e_stolen_windows, e_util_winid_str_get(win)); 32 esw = eina_hash_find(_e_stolen_windows, e_util_winid_str_get(win));
33 if (esw) 33 if (esw)
34 { 34 {
35 esw->refcount++; 35 esw->refcount++;
@@ -39,7 +39,8 @@ e_stolen_win_add(Ecore_X_Window win)
39 esw = E_NEW(E_Stolen_Window, 1); 39 esw = E_NEW(E_Stolen_Window, 1);
40 esw->win = win; 40 esw->win = win;
41 esw->refcount = 1; 41 esw->refcount = 1;
42 _e_stolen_windows = evas_hash_add(_e_stolen_windows, e_util_winid_str_get(win), esw); 42 if (!_e_stolen_windows) _e_stolen_windows = eina_hash_string_superfast_new(NULL);
43 eina_hash_add(_e_stolen_windows, e_util_winid_str_get(win), esw);
43 } 44 }
44 return; 45 return;
45} 46}
@@ -48,14 +49,19 @@ EAPI void
48e_stolen_win_del(Ecore_X_Window win) 49e_stolen_win_del(Ecore_X_Window win)
49{ 50{
50 E_Stolen_Window *esw; 51 E_Stolen_Window *esw;
51 52
52 esw = evas_hash_find(_e_stolen_windows, e_util_winid_str_get(win)); 53 esw = eina_hash_find(_e_stolen_windows, e_util_winid_str_get(win));
53 if (esw) 54 if (esw)
54 { 55 {
55 esw->refcount--; 56 esw->refcount--;
56 if (esw->refcount == 0) 57 if (esw->refcount == 0)
57 { 58 {
58 _e_stolen_windows = evas_hash_del(_e_stolen_windows, e_util_winid_str_get(win), esw); 59 eina_hash_del(_e_stolen_windows, e_util_winid_str_get(win), esw);
60 if (!eina_hash_population(_e_stolen_windows))
61 {
62 eina_hash_free(_e_stolen_windows);
63 _e_stolen_windows = NULL;
64 }
59 free(esw); 65 free(esw);
60 } 66 }
61 } 67 }
diff --git a/src/bin/e_sys_main.c b/src/bin/e_sys_main.c
index f195ec3b8..41ad5bfda 100644
--- a/src/bin/e_sys_main.c
+++ b/src/bin/e_sys_main.c
@@ -23,7 +23,7 @@ static int auth_etc_enlightenment_sysactions(char *a, char *u, char **g);
23static char *get_word(char *s, char *d); 23static char *get_word(char *s, char *d);