* e: Cleanup use of Eina data structure.

Patch from Peter van de Werken <pwerken-e@a-eskwadraat.nl>.


SVN revision: 41916
devs/princeamd/enlightenment-0.17-elive
Cedric BAIL 14 years ago
parent b1225d5251
commit f8c05999e4
  1. 10
      src/bin/e.h
  2. 60
      src/bin/e_actions.c
  3. 45
      src/bin/e_bg.c
  4. 25
      src/bin/e_bindings.c
  5. 209
      src/bin/e_border.c
  6. 40
      src/bin/e_box.c
  7. 35
      src/bin/e_canvas.c
  8. 9
      src/bin/e_color_class.c
  9. 36
      src/bin/e_config.c
  10. 11
      src/bin/e_config_dialog.c
  11. 197
      src/bin/e_container.c
  12. 41
      src/bin/e_desk.c
  13. 56
      src/bin/e_desklock.c
  14. 17
      src/bin/e_dnd.c
  15. 45
      src/bin/e_exehist.c
  16. 39
      src/bin/e_flowlayout.c
  17. 94
      src/bin/e_fm.c
  18. 16
      src/bin/e_fm_custom.c
  19. 40
      src/bin/e_fm_hal.c
  20. 58
      src/bin/e_fm_main.c
  21. 28
      src/bin/e_fm_mime.c
  22. 2
      src/bin/e_fm_op.c
  23. 3
      src/bin/e_fm_prop.c
  24. 7
      src/bin/e_fm_shared.h
  25. 65
      src/bin/e_font.c
  26. 488
      src/bin/e_gadcon.c
  27. 39
      src/bin/e_hints.c
  28. 57
      src/bin/e_ilist.c
  29. 12
      src/bin/e_init.c
  30. 8
      src/bin/e_init_main.c
  31. 5
      src/bin/e_int_border_remember.c
  32. 15
      src/bin/e_int_config_modules.c
  33. 42
      src/bin/e_int_gadcon_config.c
  34. 46
      src/bin/e_int_menus.c
  35. 31
      src/bin/e_int_shelf_config.c
  36. 34
      src/bin/e_intl.c
  37. 26
      src/bin/e_ipc_codec.c
  38. 166
      src/bin/e_ipc_handlers.h
  39. 23
      src/bin/e_layout.c
  40. 39
      src/bin/e_main.c
  41. 69
      src/bin/e_manager.c
  42. 43
      src/bin/e_maximize.c
  43. 111
      src/bin/e_menu.c
  44. 22
      src/bin/e_module.c
  45. 14
      src/bin/e_msg.c
  46. 21
      src/bin/e_msgbus.c
  47. 12
      src/bin/e_object.c
  48. 69
      src/bin/e_order.c
  49. 49
      src/bin/e_path.c
  50. 30
      src/bin/e_place.c
  51. 42
      src/bin/e_pointer.c
  52. 15
      src/bin/e_popup.c
  53. 8
      src/bin/e_powersave.c
  54. 29
      src/bin/e_remember.c
  55. 44
      src/bin/e_resist.c
  56. 24
      src/bin/e_shelf.c
  57. 8
      src/bin/e_slidecore.c
  58. 12
      src/bin/e_sys.c
  59. 51
      src/bin/e_table.c
  60. 35
      src/bin/e_test.c
  61. 29
      src/bin/e_thumb.c
  62. 5
      src/bin/e_thumb_main.c
  63. 38
      src/bin/e_toolbar.c
  64. 54
      src/bin/e_utils.c
  65. 67
      src/bin/e_widget.c
  66. 19
      src/bin/e_widget_csel.c
  67. 18
      src/bin/e_widget_desk_preview.c
  68. 7
      src/bin/e_widget_fsel.c
  69. 18
      src/bin/e_widget_ilist.c
  70. 14
      src/bin/e_widget_radio.c
  71. 8
      src/bin/e_widget_toolbook.c
  72. 36
      src/bin/e_xinerama.c
  73. 48
      src/bin/e_zone.c

@ -126,14 +126,12 @@ typedef struct _E_Rect E_Rect;
{ \
if (list) \
{ \
Eina_List *tmp; \
tmp = list; \
list = NULL; \
while (tmp) \
void *data; \
EINA_LIST_FREE(list, data) \
{ \
free(tmp->data); \
tmp = eina_list_remove_list(tmp, tmp); \
free(data); \
} \
list = NULL; \
} \
} \
while (0)

@ -1286,12 +1286,9 @@ ACT_FN_GO(desk_linear_flip_to)
E_Container *con; \
E_Manager *man; \
\
for (lm = e_manager_list(); lm; lm = lm->next) { \
man = lm->data; \
for (lc = man->containers; lc; lc = lc->next) { \
con = lc->data; \
for (lz = con->zones; lz; lz = lz->next) { \
zone = lz->data; \
EINA_LIST_FOREACH(e_manager_list(), lm, man) { \
EINA_LIST_FOREACH(man->containers, lc, con) { \
EINA_LIST_FOREACH(con->zones, lz, zone) { \
act; \
} \
} \
@ -1441,26 +1438,20 @@ if ((con_num < 0) || (zone_num < 0)) { \
E_Manager *man; \
if ((con_num >= 0) && (zone_num < 0)) /* con=1 zone=all */ { \
con = e_util_container_number_get(con_num); \
for (l = con->zones; l; l = l->next) { \
zone = l->data; \
EINA_LIST_FOREACH(con->zones, l, zone) { \
act; \
} } \
else if ((con_num < 0) && (zone_num >= 0)) /* con=all zone=1 */ { \
for (l = e_manager_list(); l; l = l->next) { \
man = l->data; \
for (ll = man->containers; ll; ll = ll->next) { \
con = ll->data; \
EINA_LIST_FOREACH(e_manager_list(), l, man) { \
EINA_LIST_FOREACH(man->containers, ll, con) { \
zone = e_container_zone_number_get(con, zone_num); \
if (zone) \
act; \
} } } \
else if ((con_num < 0) && (zone_num < 0)) /* con=all zone=all */ { \
for (l = e_manager_list(); l; l = l->next) { \
man = l->data; \
for (ll = man->containers; ll; ll = ll->next) { \
con = ll->data; \
for (lll = con->zones; lll; lll = lll->next) { \
zone = lll->data; \
EINA_LIST_FOREACH(e_manager_list(), l, man) { \
EINA_LIST_FOREACH(man->containers, ll, con) { \
EINA_LIST_FOREACH(con->zones, lll, zone) { \
act; \
} } } } } \
else { \
@ -2367,12 +2358,10 @@ static void
_delayed_action_key_del(E_Object *obj, const char *params, Ecore_Event_Key *ev)
{
Eina_List *l;
for (l = _delayed_actions; l; l = l->next)
Delayed_Action *da;
EINA_LIST_FOREACH(_delayed_actions, l, da)
{
Delayed_Action *da;
da = l->data;
if ((da->obj == obj) && (!da->mouse) &&
(!strcmp(da->keyname, ev->keyname)))
{
@ -2406,12 +2395,10 @@ static void
_delayed_action_mouse_del(E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev)
{
Eina_List *l;
Delayed_Action *da;
for (l = _delayed_actions; l; l = l->next)
EINA_LIST_FOREACH(_delayed_actions, l, da)
{
Delayed_Action *da;
da = l->data;
if ((da->obj == obj) && (da->mouse) &&
(ev->buttons == da->button))
{
@ -2928,7 +2915,6 @@ e_action_predef_label_get(const char *action, const char *params)
{
EINA_LIST_FOREACH(actg->acts, l2, actd)
{
actd = l2->data;
if (!strcmp(actd->act_cmd, action))
{
if ((params) && (actd->act_params))
@ -3002,9 +2988,8 @@ e_action_predef_name_del(const char *act_grp, const char *act_name)
E_Action_Description *actd = NULL;
Eina_List *l;
for (l = action_groups; l; l = l->next)
EINA_LIST_FOREACH(action_groups, l, actg)
{
actg = l->data;
if (!strcmp(actg->act_grp, act_grp))
break;
actg = NULL;
@ -3012,9 +2997,8 @@ e_action_predef_name_del(const char *act_grp, const char *act_name)
if (!actg) return;
for (l = actg->acts; l; l = l->next)
EINA_LIST_FOREACH(actg->acts, l, actd)
{
actd = l->data;
if (!strcmp(actd->act_name, act_name))
{
actg->acts = eina_list_remove(actg->acts, actd);
@ -3043,27 +3027,19 @@ e_action_predef_name_all_del(void)
E_Action_Group *actg = NULL;
E_Action_Description *actd = NULL;
while (action_groups)
EINA_LIST_FREE(action_groups, actg)
{
actg = action_groups->data;
while (actg->acts)
EINA_LIST_FREE(actg->acts, actd)
{
actd = actg->acts->data;
if (actd->act_name) eina_stringshare_del(actd->act_name);
if (actd->act_cmd) eina_stringshare_del(actd->act_cmd);
if (actd->act_params) eina_stringshare_del(actd->act_params);
if (actd->param_example) eina_stringshare_del(actd->param_example);
E_FREE(actd);
actg->acts = eina_list_remove_list(actg->acts, actg->acts);
}
if (actg->act_grp) eina_stringshare_del(actg->act_grp);
E_FREE(actg);
action_groups = eina_list_remove_list(action_groups, action_groups);
}
action_groups = NULL;
}

@ -32,6 +32,7 @@ EAPI int
e_bg_init(void)
{
Eina_List *l = NULL;
E_Config_Desktop_Background *cfbg = NULL;
/* Register mime handler */
bg_hdl = e_fm2_mime_handler_new(_("Set As Background"),
@ -44,11 +45,8 @@ e_bg_init(void)
if (e_config->desktop_default_background)
e_filereg_register(e_config->desktop_default_background);
for (l = e_config->desktop_backgrounds; l; l = l->next)
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
{
E_Config_Desktop_Background *cfbg;
cfbg = l->data;
if (!cfbg) continue;
e_filereg_register(cfbg->file);
}
@ -61,6 +59,7 @@ EAPI int
e_bg_shutdown(void)
{
Eina_List *l = NULL;
E_Config_Desktop_Background *cfbg = NULL;
/* Deregister mime handler */
if (bg_hdl)
@ -73,11 +72,8 @@ e_bg_shutdown(void)
if (e_config->desktop_default_background)
e_filereg_deregister(e_config->desktop_default_background);
for (l = e_config->desktop_backgrounds; l; l = l->next)
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
{
E_Config_Desktop_Background *cfbg;
cfbg = l->data;
if (!cfbg) continue;
e_filereg_deregister(cfbg->file);
}
@ -94,19 +90,18 @@ EAPI const E_Config_Desktop_Background *
e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
{
Eina_List *l, *ll, *entries;
E_Config_Desktop_Background *bg = NULL;
E_Config_Desktop_Background *bg = NULL, *cfbg = NULL;
const char *bgfile = "";
char *entry;
int current_spec = 0; /* how specific the setting is - we want the least general one that applies */
/* look for desk specific background. */
if (container_num >= 0 || zone_num >= 0 || desk_x >= 0 || desk_y >= 0)
{
for (l = e_config->desktop_backgrounds; l; l = l->next)
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
{
E_Config_Desktop_Background *cfbg;
int spec;
cfbg = l->data;
if (!cfbg) continue;
spec = 0;
if (cfbg->container == container_num) spec++;
@ -133,9 +128,9 @@ e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
entries = edje_file_collection_list(bgfile);
if (entries)
{
for (ll = entries; ll; ll = ll->next)
EINA_LIST_FOREACH(entries, ll, entry)
{
if (!strcmp(ll->data, "e/desktop/background"))
if (!strcmp(entry, "e/desktop/background"))
{
bg = cfbg;
current_spec = spec;
@ -154,6 +149,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
const E_Config_Desktop_Background *cfbg;
Eina_List *l, *entries;
const char *bgfile = "";
char *entry;
int ok = 0;
cfbg = e_bg_config_get(container_num, zone_num, desk_x, desk_y);
@ -189,9 +185,9 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
entries = edje_file_collection_list(bgfile);
if (entries)
{
for (l = entries; l; l = l->next)
EINA_LIST_FOREACH(entries, l, entry)
{
if (!strcmp(l->data, "e/desktop/background"))
if (!strcmp(entry, "e/desktop/background"))
{
ok = 1;
break;
@ -442,13 +438,11 @@ EAPI void
e_bg_del(int container, int zone, int desk_x, int desk_y)
{
Eina_List *l = NULL;
E_Config_Desktop_Background *cfbg = NULL;
E_Event_Bg_Update *ev;
for (l = e_config->desktop_backgrounds; l; l = l->next)
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
{
E_Config_Desktop_Background *cfbg;
cfbg = l->data;
if (!cfbg) continue;
if ((cfbg->container == container) && (cfbg->zone == zone) &&
(cfbg->desk_x == desk_x) && (cfbg->desk_y == desk_y))
@ -477,15 +471,12 @@ e_bg_update(void)
E_Container *con;
E_Zone *zone;
for (l = e_manager_list(); l; l = l->next)
EINA_LIST_FOREACH(e_manager_list(), l, man)
{
man = l->data;
for (ll = man->containers; ll; ll = ll->next)
EINA_LIST_FOREACH(man->containers, ll, con)
{
con = ll->data;
for (lll = con->zones; lll; lll = lll->next)
EINA_LIST_FOREACH(con->zones, lll, zone)
{
zone = lll->data;
e_zone_bg_reconfigure(zone);
}
}

@ -87,26 +87,11 @@ e_bindings_init(void)
EAPI int
e_bindings_shutdown(void)
{
E_Binding_Signal *binds;
E_Binding_Mouse *bindm;
E_Binding_Wheel *bindw;
E_Binding_Edge *binde;
E_Binding_Key *bindk;
EINA_LIST_FREE(mouse_bindings, bindm)
_e_bindings_mouse_free(bindm);
EINA_LIST_FREE(key_bindings, bindk)
_e_bindings_key_free(bindk);
EINA_LIST_FREE(edge_bindings, binde)
_e_bindings_edge_free(binde);
EINA_LIST_FREE(signal_bindings, binds)
_e_bindings_signal_free(binds);
EINA_LIST_FREE(wheel_bindings, bindw)
_e_bindings_wheel_free(bindw);
E_FREE_LIST(mouse_bindings, _e_bindings_mouse_free);
E_FREE_LIST(key_bindings, _e_bindings_key_free);
E_FREE_LIST(edge_bindings, _e_bindings_edge_free);
E_FREE_LIST(signal_bindings, _e_bindings_signal_free);
E_FREE_LIST(wheel_bindings, _e_bindings_wheel_free);
return 1;
}

@ -701,11 +701,9 @@ e_border_desk_set(E_Border *bd, E_Desk *desk)
if (e_config->transient.desktop)
{
Eina_List *l;
for (l = bd->transients; l; l = l->next)
E_Border *child;
EINA_LIST_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
e_border_desk_set(child, bd->desk);
}
}
@ -1207,6 +1205,7 @@ e_border_layer_set(E_Border *bd, int layer)
if (e_config->transient.layer)
{
Eina_List *l;
E_Border *child;
/* We need to set raise to one, else the child wont
* follow to the new layer. It should be like this,
@ -1214,11 +1213,8 @@ e_border_layer_set(E_Border *bd, int layer)
* the transients.
*/
e_config->transient.raise = 1;
for (l = bd->transients; l; l = l->next)
EINA_LIST_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
child->layer = layer;
}
}
@ -1230,7 +1226,7 @@ EAPI void
e_border_raise(E_Border *bd)
{
E_Event_Border_Stack *ev;
E_Border *last = NULL;
E_Border *last = NULL, *child;
Eina_List *l;
E_OBJECT_CHECK(bd);
@ -1240,11 +1236,8 @@ e_border_raise(E_Border *bd)
if (e_config->transient.raise)
{
for (l = eina_list_last(bd->transients); l; l = l->prev)
EINA_LIST_REVERSE_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
@ -1320,7 +1313,7 @@ EAPI void
e_border_lower(E_Border *bd)
{
E_Event_Border_Stack *ev;
E_Border *last = NULL;
E_Border *last = NULL, *child;
Eina_List *l;
E_OBJECT_CHECK(bd);
@ -1330,11 +1323,8 @@ e_border_lower(E_Border *bd)
if (e_config->transient.lower)
{
for (l = eina_list_last(bd->transients); l; l = l->prev)
EINA_LIST_REVERSE_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
@ -1410,7 +1400,7 @@ e_border_stack_above(E_Border *bd, E_Border *above)
{
/* TODO: Should stack above allow the border to change level */
E_Event_Border_Stack *ev;
E_Border *last = NULL;
E_Border *last = NULL, *child;
Eina_List *l;
E_OBJECT_CHECK(bd);
@ -1420,11 +1410,8 @@ e_border_stack_above(E_Border *bd, E_Border *above)
if (e_config->transient.raise)
{
for (l = eina_list_last(bd->transients); l; l = l->prev)
EINA_LIST_REVERSE_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
@ -1468,7 +1455,7 @@ e_border_stack_below(E_Border *bd, E_Border *below)
{
/* TODO: Should stack below allow the border to change level */
E_Event_Border_Stack *ev;
E_Border *last = NULL;
E_Border *last = NULL, *child;
Eina_List *l;
E_OBJECT_CHECK(bd);
@ -1478,11 +1465,8 @@ e_border_stack_below(E_Border *bd, E_Border *below)
if (e_config->transient.lower)
{
for (l = eina_list_last(bd->transients); l; l = l->prev)
EINA_LIST_REVERSE_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
@ -2457,12 +2441,10 @@ e_border_iconify(E_Border *bd)
if (e_config->transient.iconify)
{
Eina_List *l;
E_Border *child;
for (l = bd->transients; l; l = l->next)
EINA_LIST_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
e_border_iconify(child);
}
}
@ -2502,12 +2484,10 @@ e_border_uniconify(E_Border *bd)
if (e_config->transient.iconify)
{
Eina_List *l;
E_Border *child;
for (l = bd->transients; l; l = l->next)
EINA_LIST_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
e_border_uniconify(child);
}
}
@ -2530,11 +2510,9 @@ e_border_stick(E_Border *bd)
if (e_config->transient.desktop)
{
Eina_List *l;
for (l = bd->transients; l; l = l->next)
E_Border *child;
EINA_LIST_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
child->sticky = 1;
e_hints_window_sticky_set(child, 1);
e_border_show(child);
@ -2566,11 +2544,9 @@ e_border_unstick(E_Border *bd)
if (e_config->transient.desktop)
{
Eina_List *l;
for (l = bd->transients; l; l = l->next)
E_Border *child;
EINA_LIST_FOREACH(bd->transients, l, child)
{
E_Border *child;
child = l->data;
child->sticky = 0;
e_hints_window_sticky_set(child, 0);
}
@ -2668,12 +2644,10 @@ EAPI E_Border *
e_border_find_by_alarm(Ecore_X_Sync_Alarm alarm)
{
Eina_List *l;
for (l = borders; l; l = l->next)
E_Border *bd;
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
if ((bd) && (!e_object_is_del(E_OBJECT(bd))) &&
(bd->client.netwm.sync.alarm == alarm))
return bd;
@ -2691,22 +2665,18 @@ EAPI void
e_border_idler_before(void)
{
Eina_List *ml, *cl;
E_Manager *man;
E_Container *con;
if (!borders)
return;
for (ml = e_manager_list(); ml; ml = ml->next)
EINA_LIST_FOREACH(e_manager_list(), ml, man)
{
E_Manager *man;
man = ml->data;
for (cl = man->containers; cl; cl = cl->next)
EINA_LIST_FOREACH(man->containers, cl, con)
{
E_Container *con;
E_Border_List *bl;
E_Border *bd;
con = cl->data;
// pass 1 - eval0. fetch properties on new or on change and
// call hooks to decide what to do - maybe move/resize
@ -3354,12 +3324,10 @@ EAPI void
e_border_button_bindings_ungrab_all(void)
{
Eina_List *l;
for (l = borders; l; l = l->next)
E_Border *bd;
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
e_focus_setdown(bd);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_BORDER, bd->win);
@ -3370,12 +3338,10 @@ EAPI void
e_border_button_bindings_grab_all(void)
{
Eina_List *l;
E_Border *bd;
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
e_bindings_mouse_grab(E_BINDING_CONTEXT_BORDER, bd->win);
e_bindings_wheel_grab(E_BINDING_CONTEXT_BORDER, bd->win);
e_focus_setup(bd);
@ -3398,15 +3364,13 @@ EAPI Eina_List *
e_border_lost_windows_get(E_Zone *zone)
{
Eina_List *list = NULL, *l;
E_Border *bd;
int loss_overlap = 5;
E_OBJECT_CHECK_RETURN(zone, NULL);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL);
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
if (bd->zone)
{
if ((bd->zone == zone) ||
@ -3538,12 +3502,10 @@ EAPI Eina_List *
e_border_immortal_windows_get(void)
{
Eina_List *list = NULL, *l;
E_Border *bd;
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
if (bd->lock_life)
list = eina_list_append(list, bd);
}
@ -3799,11 +3761,7 @@ _e_border_free(E_Border *bd)
ecore_poller_del(bd->ping_poller);
bd->ping_poller = NULL;
}
while (bd->pending_move_resize)
{
free(bd->pending_move_resize->data);
bd->pending_move_resize = eina_list_remove_list(bd->pending_move_resize, bd->pending_move_resize);
}
E_FREE_LIST(bd->pending_move_resize, free);
if (bd->shade.anim) ecore_animator_del(bd->shade.anim);
if (bd->border_menu) e_menu_deactivate(bd->border_menu);
@ -3930,6 +3888,7 @@ static void
_e_border_del(E_Border *bd)
{
E_Event_Border_Remove *ev;
E_Border *child;
if (bd->fullscreen) bd->desk->fullscreen_borders--;
@ -4000,13 +3959,9 @@ _e_border_del(E_Border *bd)
}
bd->parent = NULL;
}
while (bd->transients)
EINA_LIST_FREE(bd->transients, child)
{
E_Border *child;
child = bd->transients->data;
child->parent = NULL;
bd->transients = eina_list_remove_list(bd->transients, bd->transients);
}
if (bd->leader)
@ -4023,13 +3978,9 @@ _e_border_del(E_Border *bd)
}
bd->leader = NULL;
}
while (bd->group)
EINA_LIST_FREE(bd->group, child)
{
E_Border *child;
child = bd->group->data;
child->leader = NULL;
bd->group = eina_list_remove_list(bd->group, bd->group);
}
}
@ -5043,13 +4994,11 @@ static int
_e_border_cb_efreet_desktop_list_change(void *data, int ev_type, void *ev)
{
Eina_List *l;
E_Border *bd;
/* mark all borders for desktop/icon updates */
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
if (!bd->desktop)
{
bd->changes.icon = 1;
@ -5066,6 +5015,7 @@ _e_border_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
{
Efreet_Event_Desktop_Change *event;
Eina_List *l;
E_Border *bd;
event = ev;
e_init_status_set(_("Desktop file scan"));
@ -5073,11 +5023,8 @@ _e_border_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
{
case EFREET_DESKTOP_CHANGE_ADD:
/* If a desktop is added, make the borders without icon retry */
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
if (!bd->desktop)
{
bd->changes.icon = 1;
@ -5087,11 +5034,8 @@ _e_border_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
break;
case EFREET_DESKTOP_CHANGE_REMOVE:
/* If a desktop is removed, drop the .desktop pointer */
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
if (bd->desktop == event->current)
{
efreet_desktop_free(bd->desktop);
@ -5103,12 +5047,8 @@ _e_border_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
break;
case EFREET_DESKTOP_CHANGE_UPDATE:
/* If a desktop is updated, point to the new desktop and update the icon */
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
if (bd->desktop == event->previous)
{
efreet_desktop_free(bd->desktop);
@ -5132,13 +5072,11 @@ static int
_e_border_cb_config_icon_theme(void *data, int ev_type, void *ev)
{
Eina_List *l;
E_Border *bd;
/* mark all borders for desktop/icon updates */
for (l = borders; l; l = l->next)
EINA_LIST_FOREACH(borders, l, bd)
{
E_Border *bd;
bd = l->data;
bd->changes.icon = 1;
bd->changed = 1;
}
@ -5717,11 +5655,9 @@ _e_border_eval0(E_Border *bd)
else
{
Eina_List *l;
for (l = bd->leader->group; l; l = l->next)
E_Border *child;
EINA_LIST_FOREACH(bd->leader->group, l, child)
{
E_Border *child;
child = l->data;
if ((child != bd) && (child->focused))
e_border_focus_set(bd, 1, 1);
}
@ -6198,11 +6134,9 @@ _e_border_eval0(E_Border *bd)
else
{
Eina_List *l;
for (l = bd->leader->group; l; l = l->next)
E_Border *child;
EINA_LIST_FOREACH(bd->leader->group, l, child)
{
E_Border *child;
child = l->data;
if ((child != bd) && (child->focused))
e_border_focus_set(bd, 1, 1);
}
@ -6669,6 +6603,7 @@ static void
_e_border_eval(E_Border *bd)
{
E_Event_Border_Property *event;
E_Border_Pending_Move_Resize *pnd;
int rem_change = 0;
int send_event = 1;
int zx, zy, zw, zh;
@ -6805,11 +6740,8 @@ _e_border_eval(E_Border *bd)
}
}
}
while (bd->pending_move_resize)
EINA_LIST_FREE(bd->pending_move_resize, pnd)
{
E_Border_Pending_Move_Resize *pnd;
pnd = bd->pending_move_resize->data;
if ((!bd->lock_client_location) && (pnd->move))
{
bd->x = pnd->x;
@ -6831,8 +6763,6 @@ _e_border_eval(E_Border *bd)
bd->changes.size = 1;
}
free(pnd);
bd->pending_move_resize = eina_list_remove_list(bd->pending_move_resize,
bd->pending_move_resize);
}
/* Recreate state */
@ -7954,6 +7884,7 @@ _e_border_zone_update(E_Border *bd)
{
E_Container *con;
Eina_List *l;
E_Zone *zone;
/* still within old zone - leave it there */
if (E_INTERSECTS(bd->x, bd->y, bd->w, bd->h,
@ -7961,11 +7892,8 @@ _e_border_zone_update(E_Border *bd)
return;
/* find a new zone */
con = bd->zone->container;
for (l = con->zones; l; l = l->next)
EINA_LIST_FOREACH(con->zones, l, zone)
{
E_Zone *zone;
zone = l->data;
if (E_INTERSECTS(bd->x, bd->y, bd->w, bd->h,
zone->x, zone->y, zone->w, zone->h))
{
@ -8284,18 +8212,14 @@ static int _e_border_hooks_walking = 0;
static void
_e_border_hooks_clean(void)
{
Eina_List *l, *pl;
Eina_List *l, *ln;
E_Border_Hook *bh;
for (l = _e_border_hooks; l;)
EINA_LIST_FOREACH_SAFE(_e_border_hooks, l, ln, bh)
{
E_Border_Hook *bh;
bh = l->data;
pl = l;
l = l->next;
if (bh->delete_me)
{
_e_border_hooks = eina_list_remove_list(_e_border_hooks, pl);
_e_border_hooks = eina_list_remove_list(_e_border_hooks, l);
free(bh);
}
}
@ -8305,13 +8229,11 @@ static void
_e_border_hook_call(E_Border_Hook_Point hookpoint, void *bd)
{
Eina_List *l;
E_Border_Hook *bh;
_e_border_hooks_walking++;
for (l = _e_border_hooks; l; l = l->next)
EINA_LIST_FOREACH(_e_border_hooks, l, bh)
{
E_Border_Hook *bh;
bh = l->data;
if (bh->delete_me) continue;
if (bh->hookpoint == hookpoint) bh->func(bh->data, bd);
}
@ -8362,7 +8284,7 @@ e_border_focus_track_thaw(void)
EAPI E_Border *
e_border_under_pointer_get(E_Desk *desk, E_Border *exclude)
{
E_Border *bd = NULL;
E_Border *bd = NULL, *cbd;
Eina_List *l;
int x, y;
@ -8376,11 +8298,8 @@ e_border_under_pointer_get(E_Desk *desk, E_Border *exclude)
else
return NULL;
for (l = e_border_raise_stack_get(); l; l = l->next)
EINA_LIST_FOREACH(e_border_raise_stack_get(), l, cbd)
{
E_Border *cbd;
cbd = l->data;
if (!cbd) continue;
/* If a border was specified which should be excluded from the list
* (because it will be closed shortly for example), skip */

@ -164,15 +164,17 @@ e_box_pack_before(Evas_Object *obj, Evas_Object *child, Evas_Object *before)
E_Smart_Data *sd;
int i = 0;
Eina_List *l;
Evas_Object *item;
if (!child) return 0;
sd = evas_object_smart_data_get(obj);
if (!sd) return 0;
_e_box_smart_adopt(sd, child);
sd->items = eina_list_prepend_relative(sd->items, child, before);
for (i = 0, l = sd->items; l; l = l->next, i++)
EINA_LIST_FOREACH(sd->items, l, item)
{
if (l->data == child) break;
if (item == child) break;
i++;
}
sd->changed = 1;
if (sd->frozen <= 0) _e_box_smart_reconfigure(sd);
@ -185,15 +187,17 @@ e_box_pack_after(Evas_Object *obj, Evas_Object *child, Evas_Object *after)
E_Smart_Data *sd;
int i = 0;
Eina_List *l;
Evas_Object *item;
if (!child) return 0;
sd = evas_object_smart_data_get(obj);
if (!sd) return 0;
_e_box_smart_adopt(sd, child);
sd->items = eina_list_append_relative(sd->items, child, after);
for (i = 0, l = sd->items; l; l = l->next, i++)
EINA_LIST_FOREACH(sd->items, l, item)
{
if (l->data == child) break;
if (item == child) break;
i++;
}
sd->changed = 1;
if (sd->frozen <= 0) _e_box_smart_reconfigure(sd);
@ -405,6 +409,7 @@ _e_box_smart_reconfigure(E_Smart_Data *sd)
{
Evas_Coord x, y, w, h, xx, yy;
Eina_List *l;
Evas_Object *obj;
int minw, minh, wdif, hdif;
int count, expand;
@ -430,12 +435,9 @@ _e_box_smart_reconfigure(E_Smart_Data *sd)
y = y + ((h - minh) * (1.0 - sd->align.y));
h = minh;
}
for (l = sd->items; l; l = l->next)
EINA_LIST_FOREACH(sd->items, l, obj)
{
E_Box_Item *bi;
Evas_Object *obj;
obj = l->data;
bi = evas_object_data_get(obj, "e_box_data");
if (bi)
{
@ -466,12 +468,10 @@ _e_box_smart_reconfigure(E_Smart_Data *sd)
hdif = h - minh;
xx = x;
yy = y;
for (l = sd->items; l; l = l->next)
EINA_LIST_FOREACH(sd->items, l, obj)
{
E_Box_Item *bi;
Evas_Object *obj;
obj = l->data;
bi = evas_object_data_get(obj, "e_box_data");
if (bi)
{
@ -578,6 +578,7 @@ static void
_e_box_smart_extents_calculate(E_Smart_Data *sd)
{
Eina_List *l;
Evas_Object *obj;
int minw, minh;
/* FIXME: need to calc max */
@ -588,12 +589,10 @@ _e_box_smart_extents_calculate(E_Smart_Data *sd)
minh = 0;
if (sd->homogenous)
{
for (l = sd->items; l; l = l->next)
EINA_LIST_FOREACH(sd->items, l, obj)
{
E_Box_Item *bi;
Evas_Object *obj;
obj = l->data;
bi = evas_object_data_get(obj, "e_box_data");
if (bi)
{
@ -608,12 +607,10 @@ _e_box_smart_extents_calculate(E_Smart_Data *sd)
}
else
{
for (l = sd->items; l; l = l->next)
EINA_LIST_FOREACH(sd->items, l, obj)
{
E_Box_Item *bi;
Evas_Object *obj;
obj = l->data;
bi = evas_object_data_get(obj, "e_box_data");
if (bi)
{
@ -698,7 +695,7 @@ _e_box_smart_del(Evas_Object *obj)
{
Evas_Object *child;
child = sd->items->data;
child = eina_list_data_get(sd->items);
e_box_unpack(child);
}
e_box_thaw(obj);
@ -718,16 +715,17 @@ _e_box_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
if ((x == sd->x) && (y == sd->y)) return;
{
Eina_List *l;
Evas_Object *item;
Evas_Coord dx, dy;
dx = x - sd->x;
dy = y - sd->y;
for (l = sd->items; l; l = l->next)
EINA_LIST_FOREACH(sd->items, l, item)
{
Evas_Coord ox, oy;
evas_object_geometry_get(l->data, &ox, &oy, NULL, NULL);
evas_object_move(l->data, ox + dx, oy + dy);
evas_object_geometry_get(item, &ox, &oy, NULL, NULL);
evas_object_move(item, ox + dx, oy + dy);
}
}
sd->x = x;

@ -80,13 +80,12 @@ EAPI void
e_canvas_recache(void)
{
Eina_List *l;
for (l = _e_canvases; l; l = l->next)
Ecore_Evas *ee;
EINA_LIST_FOREACH(_e_canvases, l, ee)
{
Ecore_Evas *ee;
Evas *e;
ee = l->data;
e = ecore_evas_get(ee);
evas_image_cache_set(e, e_config->image_cache * 1024);
evas_font_cache_set(e, e_config->font_cache * 1024);
@ -111,13 +110,12 @@ EAPI void
e_canvas_cache_flush(void)
{
Eina_List *l;
for (l = _e_canvases; l; l = l->next)
Ecore_Evas *ee;
EINA_LIST_FOREACH(_e_canvases, l, ee)
{
Ecore_Evas *ee;
Evas *e;
ee = l->data;
e = ecore_evas_get(ee);
evas_image_cache_flush(e);
evas_font_cache_flush(e);
@ -130,13 +128,12 @@ EAPI void
e_canvas_cache_reload(void)
{
Eina_List *l;
for (l = _e_canvases; l; l = l->next)
Ecore_Evas *ee;
EINA_LIST_FOREACH(_e_canvases, l, ee)
{
Ecore_Evas *ee;
Evas *e;
ee = l->data;
e = ecore_evas_get(ee);
evas_image_cache_reload(e);
}
@ -146,13 +143,12 @@ EAPI void
e_canvas_idle_flush(void)
{
Eina_List *l;
for (l = _e_canvases; l; l = l->next)
Ecore_Evas *ee;
EINA_LIST_FOREACH(_e_canvases, l, ee)
{
Ecore_Evas *ee;
Evas *e;
ee = l->data;
e = ecore_evas_get(ee);
evas_render_idle_flush(e);
}
@ -162,13 +158,12 @@ EAPI void
e_canvas_rehint(void)
{
Eina_List *l;
for (l = _e_canvases; l; l = l->next)
Ecore_Evas *ee;
EINA_LIST_FOREACH(_e_canvases, l, ee)
{
Ecore_Evas *ee;
Evas *e;
ee = l->data;
e = ecore_evas_get(ee);
if (e_config->font_hinting == 0)
evas_font_hinting_set(e, EVAS_FONT_HINTING_BYTECODE);

@ -7,12 +7,10 @@ EAPI int
e_color_class_init(void)
{
Eina_List *l;
E_Color_Class *cc;
for (l = e_config->color_classes; l; l = l->next)
EINA_LIST_FOREACH(e_config->color_classes, l, cc)
{
E_Color_Class *cc;
cc = l->data;
if (!cc) continue;
printf("INIT CC: %s, %d %d %d %d\n", cc->name, cc->r, cc->g, cc->b, cc->a);
@ -90,9 +88,8 @@ e_color_class_find(const char *name)
Eina_List *l;
E_Color_Class *cc = NULL;
for (l = e_config->color_classes; l; l = l->next)
EINA_LIST_FOREACH(e_config->color_classes, l, cc)
{
cc = l->data;
if (!cc) continue;
if (!strcmp(cc->name, name))

@ -1303,8 +1303,6 @@ e_config_domain_load(const char *domain, E_Config_DD *edd)
for (i =1; i <= _e_config_revisions; i++)
{
char buf2[4096];
e_user_dir_snprintf(buf, sizeof(buf), "config/%s/%s.%i.cfg",
_e_config_profile, domain, i);
ef = eet_open(buf, EET_FILE_MODE_READ);