summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-02-25 11:03:47 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-02-25 11:03:47 +0000
commitdb419867dde088460976d3fdff29156ace4be93e (patch)
tree6d9f8f7ce0cfc84454f26302e02477a1d8439116
parente0cfef818f53047d64e67011a5e762e8630e33e3 (diff)
* estickies,
* etk, * PROTO/exalt, * E-MODULES-EXTRA/diskio, * E-MODULES-EXTRA/drawer, * E-MODULES-EXTRA/penguins, * E-MODULES-EXTRA/slideshow, * E-MODULES-EXTRA/mail, * E-MODULES-EXTRA/forecasts, * E-MODULES-EXTRA/iiirk, * E-MODULES-EXTRA/places, * e, * ewl, * ecore, * elitaire, * entrance, * e_dbus, * efreet: Here we go, move from Ecore_List to Eina_List. NOTE: This patch is huge, I did test it a lot, and I hope nothing is broken. But if you think something change after this commit, please contact me ASAP. SVN revision: 39200
-rw-r--r--src/bin/e_config.c199
-rw-r--r--src/bin/e_configure.c137
-rw-r--r--src/bin/e_eap_editor.c10
-rw-r--r--src/bin/e_exec.c13
-rw-r--r--src/bin/e_exec.h2
-rw-r--r--src/bin/e_fm.c36
-rw-r--r--src/bin/e_fm_main.c102
-rw-r--r--src/bin/e_fm_mime.c2
-rw-r--r--src/bin/e_gadcon.c5
-rw-r--r--src/bin/e_init_main.c3
-rw-r--r--src/bin/e_int_border_menu.c5
-rw-r--r--src/bin/e_int_config_modules.c18
-rw-r--r--src/bin/e_int_menus.c42
-rw-r--r--src/bin/e_intl.c88
-rw-r--r--src/bin/e_main.c6
-rw-r--r--src/bin/e_menu.c2
-rw-r--r--src/bin/e_module.c25
-rw-r--r--src/bin/e_prefix.c13
-rw-r--r--src/bin/e_utils.c4
-rw-r--r--src/modules/battery/batget.c78
-rw-r--r--src/modules/battery/e_mod_main.c33
-rw-r--r--src/modules/conf/e_mod_main.c3
-rw-r--r--src/modules/conf_applications/e_int_config_apps.c73
-rw-r--r--src/modules/conf_display/e_int_config_display.c8
-rw-r--r--src/modules/conf_fonts/e_int_config_fonts.c4
-rw-r--r--src/modules/conf_icon_theme/e_int_config_icon_themes.c51
-rw-r--r--src/modules/conf_mousebindings/e_int_config_mousebindings.c4
-rw-r--r--src/modules/conf_window_remembers/e_int_config_remembers.c3
-rw-r--r--src/modules/exebuf/e_exebuf.c157
-rw-r--r--src/modules/fileman/e_fwin.c131
-rw-r--r--src/modules/gadman/e_mod_gadman.c2
-rw-r--r--src/modules/ibar/e_mod_config.c16
-rw-r--r--src/modules/illume/e_cfg.c115
-rw-r--r--src/modules/illume/e_flaunch.c26
-rw-r--r--src/modules/illume/e_kbd.c138
-rw-r--r--src/modules/illume/e_kbd_int.c221
-rw-r--r--src/modules/illume/e_mod_gad_bluetooth.c16
-rw-r--r--src/modules/illume/e_mod_gad_usb.c16
-rw-r--r--src/modules/illume/e_mod_win.c140
-rw-r--r--src/modules/temperature/e_mod_config.c45
-rw-r--r--src/modules/temperature/e_mod_main.c29
-rw-r--r--src/modules/temperature/e_mod_main.h2
-rw-r--r--src/modules/temperature/tempget.c74
-rw-r--r--src/modules/wizard/e_mod_main.c17
-rw-r--r--src/modules/wizard/page_030.c11
-rw-r--r--src/modules/wizard/page_070.c13
-rw-r--r--src/modules/wizard/page_080.c24
-rw-r--r--src/preload/e_precache.c4
48 files changed, 804 insertions, 1362 deletions
diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index bfeb7fcd6..76e72f600 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -1074,7 +1074,7 @@ static int _cb_sort_files(char *f1, char *f2)
1074EAPI Eina_List * 1074EAPI Eina_List *
1075e_config_profile_list(void) 1075e_config_profile_list(void)
1076{ 1076{
1077 Ecore_List *files; 1077 Eina_List *files;
1078 char buf[PATH_MAX]; 1078 char buf[PATH_MAX];
1079 const char *homedir; 1079 const char *homedir;
1080 const char *dir; 1080 const char *dir;
@@ -1087,16 +1087,15 @@ e_config_profile_list(void)
1087 { 1087 {
1088 char *file; 1088 char *file;
1089 1089
1090 ecore_list_sort(files, ECORE_COMPARE_CB(_cb_sort_files), ECORE_SORT_MIN); 1090 files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
1091 ecore_list_first_goto(files); 1091 EINA_LIST_FREE(files, file)
1092 while ((file = ecore_list_current(files)))
1093 { 1092 {
1094 snprintf(buf, sizeof(buf), "%s/.e/e/config/%s", homedir, file); 1093 snprintf(buf, sizeof(buf), "%s/.e/e/config/%s", homedir, file);
1095 if (ecore_file_is_dir(buf)) 1094 if (ecore_file_is_dir(buf))
1096 flist = eina_list_append(flist, strdup(file)); 1095 flist = eina_list_append(flist, file);
1097 ecore_list_next(files); 1096 else
1097 free(file);
1098 } 1098 }
1099 ecore_list_destroy(files);
1100 } 1099 }
1101 dir = e_prefix_data_get(); 1100 dir = e_prefix_data_get();
1102 snprintf(buf, sizeof(buf), "%s/data/config", dir); 1101 snprintf(buf, sizeof(buf), "%s/data/config", dir);
@@ -1105,24 +1104,24 @@ e_config_profile_list(void)
1105 { 1104 {
1106 char *file; 1105 char *file;
1107 1106
1108 ecore_list_sort(files, ECORE_COMPARE_CB(_cb_sort_files), ECORE_SORT_MIN); 1107 files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
1109 ecore_list_first_goto(files); 1108 EINA_LIST_FREE(files, file)
1110 while ((file = ecore_list_current(files)))
1111 { 1109 {
1110 const char *tmp;
1111 Eina_List *l;
1112
1112 snprintf(buf, sizeof(buf), "%s/data/config/%s", dir, file); 1113 snprintf(buf, sizeof(buf), "%s/data/config/%s", dir, file);
1113 if (ecore_file_is_dir(buf)) 1114 if (ecore_file_is_dir(buf))
1114 { 1115 {
1115 Eina_List *l; 1116 EINA_LIST_FOREACH(flist, l, tmp)
1117 if (!strcmp(file, tmp)) break;
1116 1118
1117 for (l = flist; l; l = l->next) 1119 if (!l) flist = eina_list_append(flist, file);
1118 { 1120 else free(file);
1119 if (!strcmp(file, l->data)) break;
1120 }
1121 if (!l) flist = eina_list_append(flist, strdup(file));
1122 } 1121 }
1123 ecore_list_next(files); 1122 else
1123 free(file);
1124 } 1124 }
1125 ecore_list_destroy(files);
1126 } 1125 }
1127 return flist; 1126 return flist;
1128} 1127}
@@ -1141,7 +1140,7 @@ e_config_profile_add(const char *prof)
1141EAPI void 1140EAPI void
1142e_config_profile_del(const char *prof) 1141e_config_profile_del(const char *prof)
1143{ 1142{
1144 Ecore_List *files; 1143 Eina_List *files;
1145 char buf[4096]; 1144 char buf[4096];
1146 const char *homedir; 1145 const char *homedir;
1147 1146
@@ -1152,15 +1151,13 @@ e_config_profile_del(const char *prof)
1152 { 1151 {
1153 char *file; 1152 char *file;
1154 1153
1155 ecore_list_first_goto(files); 1154 EINA_LIST_FREE(files, file)
1156 while ((file = ecore_list_current(files)))
1157 { 1155 {
1158 snprintf(buf, sizeof(buf), "%s/.e/e/config/%s/%s", 1156 snprintf(buf, sizeof(buf), "%s/.e/e/config/%s/%s",
1159 homedir, prof, file); 1157 homedir, prof, file);
1160 ecore_file_unlink(buf); 1158 ecore_file_unlink(buf);
1161 ecore_list_next(files); 1159 free(file);
1162 } 1160 }
1163 ecore_list_destroy(files);
1164 } 1161 }
1165 snprintf(buf, sizeof(buf), "%s/.e/e/config/%s", homedir, prof); 1162 snprintf(buf, sizeof(buf), "%s/.e/e/config/%s", homedir, prof);
1166 ecore_file_rmdir(buf); 1163 ecore_file_rmdir(buf);
@@ -1417,181 +1414,127 @@ _e_config_save_cb(void *data)
1417static void 1414static void
1418_e_config_free(E_Config *ecf) 1415_e_config_free(E_Config *ecf)
1419{ 1416{
1420 if (!ecf) return; 1417 E_Config_Binding_Signal *ebs;
1421 while (ecf->modules) 1418 E_Config_Binding_Mouse *ebm;
1422 { 1419 E_Config_Binding_Wheel *ebw;
1420 E_Config_Syscon_Action *sca;
1421 E_Config_Binding_Key *ebk;
1422 E_Font_Fallback *eff;
1423 E_Config_Module *em; 1423 E_Config_Module *em;
1424 E_Font_Default *efd;
1425 E_Config_Theme *et;
1426 E_Color_Class *cc;
1427 E_Path_Dir *epd;
1428 E_Remember *rem;
1424 1429
1425 em = ecf->modules->data; 1430 if (!ecf) return;
1426 ecf->modules = eina_list_remove_list(ecf->modules, ecf->modules); 1431
1432 EINA_LIST_FREE(ecf->modules, em)
1433 {
1427 if (em->name) eina_stringshare_del(em->name); 1434 if (em->name) eina_stringshare_del(em->name);
1428 E_FREE(em); 1435 E_FREE(em);
1429 } 1436 }
1430 while (ecf->font_fallbacks) 1437 EINA_LIST_FREE(ecf->font_fallbacks, eff)
1431 { 1438 {
1432 E_Font_Fallback *eff;
1433
1434 eff = ecf->font_fallbacks->data;
1435 ecf->font_fallbacks = eina_list_remove_list(ecf->font_fallbacks, ecf->font_fallbacks);
1436 if (eff->name) eina_stringshare_del(eff->name); 1439 if (eff->name) eina_stringshare_del(eff->name);
1437 E_FREE(eff); 1440 E_FREE(eff);
1438 } 1441 }
1439 while (ecf->font_defaults) 1442 EINA_LIST_FREE(ecf->font_defaults, efd)
1440 { 1443 {
1441 E_Font_Default *efd;
1442
1443 efd = ecf->font_defaults->data;
1444 ecf->font_defaults = eina_list_remove_list(ecf->font_defaults, ecf->font_defaults);
1445 if (efd->text_class) eina_stringshare_del(efd->text_class); 1444 if (efd->text_class) eina_stringshare_del(efd->text_class);
1446 if (efd->font) eina_stringshare_del(efd->font); 1445 if (efd->font) eina_stringshare_del(efd->font);
1447 E_FREE(efd); 1446 E_FREE(efd);
1448 } 1447 }
1449 while (ecf->themes) 1448 EINA_LIST_FREE(ecf->themes, et)
1450 { 1449 {
1451 E_Config_Theme *et;
1452
1453 et = ecf->themes->data;
1454 ecf->themes = eina_list_remove_list(ecf->themes, ecf->themes);
1455 if (et->category) eina_stringshare_del(et->category); 1450 if (et->category) eina_stringshare_del(et->category);
1456 if (et->file) eina_stringshare_del(et->file); 1451 if (et->file) eina_stringshare_del(et->file);
1457 E_FREE(et); 1452 E_FREE(et);
1458 } 1453 }
1459 while (ecf->mouse_bindings) 1454 EINA_LIST_FREE(ecf->mouse_bindings, ebm)
1460 { 1455 {
1461 E_Config_Binding_Mouse *eb; 1456 if (ebm->action) eina_stringshare_del(ebm->action);
1462 1457 if (ebm->params) eina_stringshare_del(ebm->params);
1463 eb = ecf->mouse_bindings->data; 1458 E_FREE(ebm);
1464 ecf->mouse_bindings = eina_list_remove_list(ecf->mouse_bindings, ecf->mouse_bindings);
1465 if (eb->action) eina_stringshare_del(eb->action);
1466 if (eb->params) eina_stringshare_del(eb->params);
1467 E_FREE(eb);
1468 } 1459 }
1469 while (ecf->key_bindings) 1460 EINA_LIST_FREE(ecf->key_bindings, ebk)
1470 { 1461 {
1471 E_Config_Binding_Key *eb; 1462 if (ebk->key) eina_stringshare_del(ebk->key);
1472 1463 if (ebk->action) eina_stringshare_del(ebk->action);
1473 eb = ecf->key_bindings->data; 1464 if (ebk->params) eina_stringshare_del(ebk->params);
1474 ecf->key_bindings = eina_list_remove_list(ecf->key_bindings, ecf->key_bindings); 1465 E_FREE(ebk);
1475 if (eb->key) eina_stringshare_del(eb->key);
1476 if (eb->action) eina_stringshare_del(eb->action);
1477 if (eb->params) eina_stringshare_del(eb->params);
1478 E_FREE(eb);
1479 } 1466 }
1480 while (ecf->signal_bindings) 1467 EINA_LIST_FREE(ecf->signal_bindings, ebs)
1481 { 1468 {
1482 E_Config_Binding_Signal *eb; 1469 if (ebs->signal) eina_stringshare_del(ebs->signal);
1483 1470 if (ebs->source) eina_stringshare_del(ebs->source);
1484 eb = ecf->signal_bindings->data; 1471 if (ebs->action) eina_stringshare_del(ebs->action);
1485 ecf->signal_bindings = eina_list_remove_list(ecf->signal_bindings, ecf->signal_bindings); 1472 if (ebs->params) eina_stringshare_del(ebs->params);
1486 if (eb->signal) eina_stringshare_del(eb->signal); 1473 E_FREE(ebs);
1487 if (eb->source) eina_stringshare_del(eb->source);
1488 if (eb->action) eina_stringshare_del(eb->action);
1489 if (eb->params) eina_stringshare_del(eb->params);
1490 E_FREE(eb);
1491 } 1474 }
1492 while (ecf->wheel_bindings) 1475 EINA_LIST_FREE(ecf->wheel_bindings, ebw)
1493 { 1476 {
1494 E_Config_Binding_Wheel *eb; 1477 if (ebw->action) eina_stringshare_del(ebw->action);
1495 1478 if (ebw->params) eina_stringshare_del(ebw->params);
1496 eb = ecf->wheel_bindings->data; 1479 E_FREE(ebw);
1497 ecf->wheel_bindings = eina_list_remove_list(ecf->wheel_bindings, ecf->wheel_bindings);
1498 if (eb->action) eina_stringshare_del(eb->action);
1499 if (eb->params) eina_stringshare_del(eb->params);
1500 E_FREE(eb);
1501 } 1480 }
1502 while (ecf->path_append_data) 1481 EINA_LIST_FREE(ecf->path_append_data, epd)
1503 { 1482 {
1504 E_Path_Dir *epd;
1505 epd = ecf->path_append_data->data;
1506 ecf->path_append_data = eina_list_remove_list(ecf->path_append_data, ecf->path_append_data);
1507 if (epd->dir) eina_stringshare_del(epd->dir); 1483 if (epd->dir) eina_stringshare_del(epd->dir);
1508 E_FREE(epd); 1484 E_FREE(epd);
1509 } 1485 }
1510 while (ecf->path_append_images) 1486 EINA_LIST_FREE(ecf->path_append_images, epd)
1511 { 1487 {
1512 E_Path_Dir *epd;
1513 epd = ecf->path_append_images->data;
1514 ecf->path_append_images = eina_list_remove_list(ecf->path_append_images, ecf->path_append_images);
1515 if (epd->dir) eina_stringshare_del(epd->dir); 1488 if (epd->dir) eina_stringshare_del(epd->dir);
1516 E_FREE(epd); 1489 E_FREE(epd);
1517 } 1490 }
1518 while (ecf->path_append_fonts) 1491 EINA_LIST_FREE(ecf->path_append_fonts, epd)
1519 { 1492 {
1520 E_Path_Dir *epd;
1521 epd = ecf->path_append_fonts->data;
1522 ecf->path_append_fonts = eina_list_remove_list(ecf->path_append_fonts, ecf->path_append_fonts);
1523 if (epd->dir) eina_stringshare_del(epd->dir); 1493 if (epd->dir) eina_stringshare_del(epd->dir);
1524 E_FREE(epd); 1494 E_FREE(epd);
1525 } 1495 }
1526 while (ecf->path_append_themes) 1496 EINA_LIST_FREE(ecf->path_append_themes, epd)
1527 { 1497 {
1528 E_Path_Dir *epd;
1529 epd = ecf->path_append_themes->data;
1530 ecf->path_append_themes = eina_list_remove_list(ecf->path_append_themes, ecf->path_append_themes);
1531 if (epd->dir) eina_stringshare_del(epd->dir); 1498 if (epd->dir) eina_stringshare_del(epd->dir);
1532 E_FREE(epd); 1499 E_FREE(epd);
1533 } 1500 }
1534 while (ecf->path_append_init) 1501 EINA_LIST_FREE(ecf->path_append_init, epd)
1535 { 1502 {
1536 E_Path_Dir *epd;
1537 epd = ecf->path_append_init->data;
1538 ecf->path_append_init = eina_list_remove_list(ecf->path_append_init, ecf->path_append_init);
1539 if (epd->dir) eina_stringshare_del(epd->dir); 1503 if (epd->dir) eina_stringshare_del(epd->dir);
1540 E_FREE(epd); 1504 E_FREE(epd);
1541 } 1505 }
1542 while (ecf->path_append_icons) 1506 EINA_LIST_FREE(ecf->path_append_icons, epd)
1543 { 1507 {
1544 E_Path_Dir *epd;
1545 epd = ecf->path_append_icons->data;
1546 ecf->path_append_icons = eina_list_remove_list(ecf->path_append_icons, ecf->path_append_icons);
1547 if (epd->dir) eina_stringshare_del(epd->dir); 1508 if (epd->dir) eina_stringshare_del(epd->dir);
1548 E_FREE(epd); 1509 E_FREE(epd);
1549 } 1510 }
1550 while (ecf->path_append_modules) 1511 EINA_LIST_FREE(ecf->path_append_modules, epd)
1551 { 1512 {
1552 E_Path_Dir *epd;
1553 epd = ecf->path_append_modules->data;
1554 ecf->path_append_modules = eina_list_remove_list(ecf->path_append_modules, ecf->path_append_modules);
1555 if (epd->dir) eina_stringshare_del(epd->dir); 1513 if (epd->dir) eina_stringshare_del(epd->dir);
1556 E_FREE(epd); 1514 E_FREE(epd);
1557 } 1515 }
1558 while (ecf->path_append_backgrounds) 1516 EINA_LIST_FREE(ecf->path_append_backgrounds, epd)
1559 { 1517 {
1560 E_Path_Dir *epd;
1561 epd = ecf->path_append_backgrounds->data;
1562 ecf->path_append_backgrounds = eina_list_remove_list(ecf->path_append_backgrounds, ecf->path_append_backgrounds);
1563 if (epd->dir) eina_stringshare_del(epd->dir); 1518 if (epd->dir) eina_stringshare_del(epd->dir);
1564 E_FREE(epd); 1519 E_FREE(epd);
1565 } 1520 }
1566 while (ecf->path_append_messages) 1521 EINA_LIST_FREE(ecf->path_append_messages, epd)
1567 { 1522 {
1568 E_Path_Dir *epd;
1569 epd = ecf->path_append_messages->data;
1570 ecf->path_append_messages = eina_list_remove_list(ecf->path_append_messages, ecf->path_append_messages);
1571 if (epd->dir) eina_stringshare_del(epd->dir); 1523 if (epd->dir) eina_stringshare_del(epd->dir);
1572 E_FREE(epd); 1524 E_FREE(epd);
1573 } 1525 }
1574 while (ecf->remembers) 1526 EINA_LIST_FREE(ecf->remembers, rem)
1575 { 1527 {
1576 E_Remember *rem;
1577 rem = ecf->remembers->data;
1578 ecf->remembers = eina_list_remove_list(ecf->remembers, ecf->remembers);
1579
1580 if (rem->name) eina_stringshare_del(rem->name); 1528 if (rem->name) eina_stringshare_del(rem->name);
1581 if (rem->class) eina_stringshare_del(rem->class); 1529 if (rem->class) eina_stringshare_del(rem->class);
1582 if (rem->title) eina_stringshare_del(rem->title); 1530 if (rem->title) eina_stringshare_del(rem->title);
1583 if (rem->role) eina_stringshare_del(rem->role); 1531 if (rem->role) eina_stringshare_del(rem->role);
1584 if (rem->prop.border) eina_stringshare_del(rem->prop.border); 1532 if (rem->prop.border) eina_stringshare_del(rem->prop.border);
1585 if (rem->prop.command) eina_stringshare_del(rem->prop.command); 1533 if (rem->prop.command) eina_stringshare_del(rem->prop.command);
1586
1587 E_FREE(rem); 1534 E_FREE(rem);
1588 } 1535 }
1589 while (ecf->color_classes) 1536 EINA_LIST_FREE(ecf->color_classes, cc)
1590 { 1537 {
1591 E_Color_Class *cc;
1592 cc = ecf->color_classes->data;
1593 ecf->color_classes = eina_list_remove_list(ecf->color_classes, ecf->color_classes);
1594
1595 if (cc->name) eina_stringshare_del(cc->name); 1538 if (cc->name) eina_stringshare_del(cc->name);
1596 E_FREE(cc); 1539 E_FREE(cc);
1597 } 1540 }
@@ -1611,17 +1554,13 @@ _e_config_free(E_Config *ecf)
1611 if (ecf->wallpaper_import_last_path) eina_stringshare_del(ecf->wallpaper_import_last_path); 1554 if (ecf->wallpaper_import_last_path) eina_stringshare_del(ecf->wallpaper_import_last_path);
1612 if (ecf->theme_default_border_style) eina_stringshare_del(ecf->theme_default_border_style); 1555 if (ecf->theme_default_border_style) eina_stringshare_del(ecf->theme_default_border_style);
1613 if (ecf->desklock_custom_desklock_cmd) eina_stringshare_del(ecf->desklock_custom_desklock_cmd); 1556 if (ecf->desklock_custom_desklock_cmd) eina_stringshare_del(ecf->desklock_custom_desklock_cmd);
1614 while (ecf->syscon.actions) 1557 EINA_LIST_FREE(ecf->syscon.actions, sca)
1615 { 1558 {
1616 E_Config_Syscon_Action *sca;
1617
1618 sca = ecf->syscon.actions->data;
1619 if (sca->action) eina_stringshare_del(sca->action); 1559 if (sca->action) eina_stringshare_del(sca->action);
1620 if (sca->params) eina_stringshare_del(sca->params); 1560 if (sca->params) eina_stringshare_del(sca->params);
1621 if (sca->button) eina_stringshare_del(sca->button); 1561 if (sca->button) eina_stringshare_del(sca->button);
1622 if (sca->icon) eina_stringshare_del(sca->icon); 1562 if (sca->icon) eina_stringshare_del(sca->icon);
1623 E_FREE(sca); 1563 E_FREE(sca);
1624 ecf->syscon.actions = eina_list_remove_list(ecf->syscon.actions, ecf->syscon.actions);
1625 } 1564 }
1626 E_FREE(ecf); 1565 E_FREE(ecf);
1627} 1566}
diff --git a/src/bin/e_configure.c b/src/bin/e_configure.c
index cbdbd5362..6141ffa12 100644
--- a/src/bin/e_configure.c
+++ b/src/bin/e_configure.c
@@ -27,22 +27,22 @@ e_configure_init(void)
27static void 27static void
28_e_configure_efreet_desktop_update(void) 28_e_configure_efreet_desktop_update(void)
29{ 29{
30 Ecore_List *settings_desktops, *system_desktops; 30 Eina_List *settings_desktops, *system_desktops;
31 Eina_List *remove_items = NULL;
32 Eina_List *remove_cats = NULL;
33 Eina_List *l;
31 Efreet_Desktop *desktop; 34 Efreet_Desktop *desktop;
32 Eina_List *l, *ll, *remove_items = NULL, *remove_cats = NULL; 35 E_Configure_Cat *ecat;
36 void *data;
33 char buf[1024]; 37 char buf[1024];
34 38
35 /* remove anything with a desktop entry */ 39 /* remove anything with a desktop entry */
36 for (l = e_configure_registry; l; l = l->next) 40 EINA_LIST_FOREACH(e_configure_registry, l, ecat)
37 {
38 E_Configure_Cat *ecat;
39
40 ecat = l->data;
41 for (ll = ecat->items; ll; ll = ll->next)
42 { 41 {
43 E_Configure_It *eci; 42 E_Configure_It *eci;
43 Eina_List *ll;
44 44
45 eci = ll->data; 45 EINA_LIST_FOREACH(ecat->items, ll, eci)
46 if (eci->desktop) 46 if (eci->desktop)
47 { 47 {
48 snprintf(buf, sizeof(buf), "%s/%s", ecat->cat, eci->item); 48 snprintf(buf, sizeof(buf), "%s/%s", ecat->cat, eci->item);
@@ -50,18 +50,15 @@ _e_configure_efreet_desktop_update(void)
50 remove_cats = eina_list_append(remove_cats, strdup(ecat->cat)); 50 remove_cats = eina_list_append(remove_cats, strdup(ecat->cat));
51 } 51 }
52 } 52 }
53 } 53 EINA_LIST_FREE(remove_items, data)
54 while (remove_items)
55 { 54 {
56 e_configure_registry_item_del(remove_items->data); 55 e_configure_registry_item_del(data);
57 free(remove_items->data); 56 free(data);
58 remove_items = eina_list_remove_list(remove_items, remove_items);
59 } 57 }
60 while (remove_cats) 58 EINA_LIST_FREE(remove_cats, data)
61 { 59 {
62 e_configure_registry_category_del(remove_cats->data); 60 e_configure_registry_category_del(data);
63 free(remove_cats->data); 61 free(data);
64 remove_cats = eina_list_remove_list(remove_cats, remove_cats);
65 } 62 }
66 63
67 /* get desktops */ 64 /* get desktops */
@@ -70,8 +67,7 @@ _e_configure_efreet_desktop_update(void)
70 if ((!settings_desktops) || (!system_desktops)) return; 67 if ((!settings_desktops) || (!system_desktops)) return;
71 68
72 /* get ones in BOTH lists */ 69 /* get ones in BOTH lists */
73 ecore_list_first_goto(settings_desktops); 70 EINA_LIST_FOREACH(settings_desktops, l, desktop)
74 while ((desktop = ecore_list_next(settings_desktops)))
75 { 71 {
76 char *s; 72 char *s;
77 char *cfg_cat_name; 73 char *cfg_cat_name;
@@ -82,7 +78,7 @@ _e_configure_efreet_desktop_update(void)
82 char *label; 78 char *label;
83 int cfg_pri; 79 int cfg_pri;
84 80
85 if (!ecore_list_goto(system_desktops, desktop)) continue; 81 if (!eina_list_data_find(system_desktops, desktop)) continue;
86 cfg_cat = NULL; 82 cfg_cat = NULL;
87 cfg_icon = NULL; 83 cfg_icon = NULL;
88 cfg_cat_cfg = NULL; 84 cfg_cat_cfg = NULL;
@@ -237,61 +233,51 @@ e_configure_registry_generic_item_add(const char *path, int pri, const char *lab
237EAPI void 233EAPI void
238e_configure_registry_item_del(const char *path) 234e_configure_registry_item_del(const char *path)
239{ 235{
236 E_Configure_Cat *ecat;
240 Eina_List *l; 237 Eina_List *l;
241 char *cat;
242 const char *item; 238 const char *item;
239 char *cat;
243 240
244 /* path is "category/item" */ 241 /* path is "category/item" */
245 cat = ecore_file_dir_get(path); 242 cat = ecore_file_dir_get(path);
246 if (!cat) return; 243 if (!cat) return;
247 item = ecore_file_file_get(path); 244 item = ecore_file_file_get(path);
248 for (l = e_configure_registry; l; l = l->next)
249 {
250 E_Configure_Cat *ecat;
251 245
252 ecat = l->data; 246 EINA_LIST_FOREACH(e_configure_registry, l, ecat)
253 if (!strcmp(cat, ecat->cat)) 247 if (!strcmp(cat, ecat->cat))
254 { 248 {
255 Eina_List *ll;
256
257 for (ll = ecat->items; ll; ll = ll->next)
258 {
259 E_Configure_It *eci; 249 E_Configure_It *eci;
250 Eina_List *ll;
260 251
261 eci = ll->data; 252 EINA_LIST_FOREACH(ecat->items, ll, eci)
262 if (!strcmp(item, eci->item)) 253 if (!strcmp(item, eci->item))
263 { 254 {
264 ecat->items = eina_list_remove_list(ecat->items, ll); 255 ecat->items = eina_list_remove_list(ecat->items, ll);
256
265 eina_stringshare_del(eci->item); 257 eina_stringshare_del(eci->item);
266 eina_stringshare_del(eci->label); 258 eina_stringshare_del(eci->label);
267 eina_stringshare_del(eci->icon); 259 eina_stringshare_del(eci->icon);
268 if (eci->icon_file) eina_stringshare_del(eci->icon_file); 260 if (eci->icon_file) eina_stringshare_del(eci->icon_file);
269 if (eci->desktop) efreet_desktop_free(eci->desktop); 261 if (eci->desktop) efreet_desktop_free(eci->desktop);
270 free(eci); 262 free(eci);
271 goto done; 263 break;
272 }
273 }
274 goto done;
275 } 264 }
265 break;
276 } 266 }
277 done: 267
278 free(cat); 268 free(cat);
279} 269}
280 270
281EAPI void 271EAPI void
282e_configure_registry_category_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon) 272e_configure_registry_category_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon)
283{ 273{
274 E_Configure_Cat *ecat2;
284 E_Configure_Cat *ecat; 275 E_Configure_Cat *ecat;
285 Eina_List *l; 276 Eina_List *l;
286 277
287 /* if it exists - ignore this */ 278 /* if it exists - ignore this */
288 for (l = e_configure_registry; l; l = l->next) 279 EINA_LIST_FOREACH(e_configure_registry, l, ecat2)
289 {
290 E_Configure_Cat *ecat2;
291
292 ecat2 = l->data;
293 if (!strcmp(ecat2->cat, path)) return; 280 if (!strcmp(ecat2->cat, path)) return;
294 }
295 281
296 ecat = E_NEW(E_Configure_Cat, 1); 282 ecat = E_NEW(E_Configure_Cat, 1);
297 if (!ecat) return; 283 if (!ecat) return;
@@ -301,46 +287,37 @@ e_configure_registry_category_add(const char *path, int pri, const char *label,
301 ecat->label = eina_stringshare_add(label); 287 ecat->label = eina_stringshare_add(label);
302 if (icon_file) ecat->icon_file = eina_stringshare_add(icon_file); 288 if (icon_file) ecat->icon_file = eina_stringshare_add(icon_file);
303 if (icon) ecat->icon = eina_stringshare_add(icon); 289 if (icon) ecat->icon = eina_stringshare_add(icon);
304 for (l = e_configure_registry; l; l = l->next) 290 EINA_LIST_FOREACH(e_configure_registry, l, ecat2)
305 {
306 E_Configure_Cat *ecat2;
307
308 ecat2 = l->data;
309 if (ecat2->pri > ecat->pri) 291 if (ecat2->pri > ecat->pri)
310 { 292 {
311 e_configure_registry = eina_list_prepend_relative_list(e_configure_registry, ecat, l); 293 e_configure_registry = eina_list_prepend_relative_list(e_configure_registry, ecat, l);
312 return; 294 return;
313 } 295 }
314 }
315 e_configure_registry = eina_list_append(e_configure_registry, ecat); 296 e_configure_registry = eina_list_append(e_configure_registry, ecat);
316} 297}
317 298
318EAPI void 299EAPI void
319e_configure_registry_category_del(const char *path) 300e_configure_registry_category_del(const char *path)
320{ 301{
302 E_Configure_Cat *ecat;
321 Eina_List *l; 303 Eina_List *l;
322 char *cat; 304 char *cat;
323 305
324 cat = ecore_file_dir_get(path); 306 cat = ecore_file_dir_get(path);
325 if (!cat) return; 307 if (!cat) return;
326 for (l = e_configure_registry; l; l = l->next) 308 EINA_LIST_FOREACH(e_configure_registry, l, ecat)
327 {
328 E_Configure_Cat *ecat;
329
330 ecat = l->data;
331 if (!strcmp(cat, ecat->cat)) 309 if (!strcmp(cat, ecat->cat))
332 { 310 {
333 if (ecat->items) goto done; 311 if (ecat->items) break;
334 e_configure_registry = eina_list_remove_list(e_configure_registry, l); 312 e_configure_registry = eina_list_remove_list(e_configure_registry, l);
335 eina_stringshare_del(ecat->cat); 313 eina_stringshare_del(ecat->cat);
336 eina_stringshare_del(ecat->label); 314 eina_stringshare_del(ecat->label);
337 if (ecat->icon) eina_stringshare_del(ecat->icon); 315 if (ecat->icon) eina_stringshare_del(ecat->icon);
338 if (ecat->icon_file) eina_stringshare_del(ecat->icon_file); 316 if (ecat->icon_file) eina_stringshare_del(ecat->icon_file);
339 free(ecat); 317 free(ecat);
340 goto done; 318 break;
341 }
342 } 319 }
343 done: 320
344 free(cat); 321 free(cat);
345} 322}
346 323
@@ -352,6 +329,7 @@ static struct {
352EAPI void 329EAPI void
353e_configure_registry_call(const char *path, E_Container *con, const char *params) 330e_configure_registry_call(const char *path, E_Container *con, const char *params)
354{ 331{
332 E_Configure_Cat *ecat;
355 Eina_List *l; 333 Eina_List *l;
356 char *cat; 334 char *cat;
357 const char *item; 335 const char *item;
@@ -360,20 +338,13 @@ e_configure_registry_call(const char *path, E_Container *con, const char *params
360 cat = ecore_file_dir_get(path); 338 cat = ecore_file_dir_get(path);
361 if (!cat) return; 339 if (!cat) return;
362 item = ecore_file_file_get(path); 340 item = ecore_file_file_get(path);
363 for (l = e_configure_registry; l; l = l->next) 341 EINA_LIST_FOREACH(e_configure_registry, l, ecat)
364 {
365 E_Configure_Cat *ecat;
366
367 ecat = l->data;
368 if (!strcmp(cat, ecat->cat)) 342 if (!strcmp(cat, ecat->cat))
369 { 343 {
370 Eina_List *ll;
371
372 for (ll = ecat->items; ll; ll = ll->next)
373 {
374 E_Configure_It *eci; 344 E_Configure_It *eci;
345 Eina_List *ll;
375 346
376 eci = ll->data; 347 EINA_LIST_FOREACH(ecat->items, ll, eci)
377 if (!strcmp(item, eci->item)) 348 if (!strcmp(item, eci->item))
378 { 349 {
379 if (eci->func) eci->func(con, params); 350 if (eci->func) eci->func(con, params);
@@ -389,13 +360,11 @@ e_configure_registry_call(const char *path, E_Container *con, const char *params
389 e_exec(e_util_zone_current_get(con->manager), 360 e_exec(e_util_zone_current_get(con->manager),
390 eci->desktop, NULL, NULL, "config"); 361 eci->desktop, NULL, NULL, "config");
391 } 362 }
392 goto done; 363 break;
393 }
394 }
395 goto done;
396 } 364 }
365 break;
397 } 366 }
398 done: 367
399 free(cat); 368 free(cat);
400} 369}
401 370
@@ -410,6 +379,7 @@ e_configure_registry_custom_desktop_exec_callback_set(void (*func) (const void *
410EAPI int 379EAPI int
411e_configure_registry_exists(const char *path) 380e_configure_registry_exists(const char *path)
412{ 381{
382 E_Configure_Cat *ecat;
413 Eina_List *l; 383 Eina_List *l;
414 char *cat; 384 char *cat;
415 const char *item; 385 const char *item;
@@ -419,35 +389,26 @@ e_configure_registry_exists(const char *path)
419 cat = ecore_file_dir_get(path); 389 cat = ecore_file_dir_get(path);
420 if (!cat) return 0; 390 if (!cat) return 0;
421 item = ecore_file_file_get(path); 391 item = ecore_file_file_get(path);
422 for (l = e_configure_registry; l; l = l->next) 392 EINA_LIST_FOREACH(e_configure_registry, l, ecat)
423 {
424 E_Configure_Cat *ecat;
425
426 ecat = l->data;
427 if (!strcmp(cat, ecat->cat)) 393 if (!strcmp(cat, ecat->cat))
428 { 394 {
395 E_Configure_It *eci;
429 Eina_List *ll; 396 Eina_List *ll;
430 397
431 if (!item) 398 if (!item)
432 { 399 {
433 ret = 1; 400 ret = 1;
434 goto done; 401 break;
435 } 402 }
436 for (ll = ecat->items; ll; ll = ll->next) 403 EINA_LIST_FOREACH(ecat->items, ll, eci)
437 {
438 E_Configure_It *eci;
439
440 eci = ll->data;
441 if (!strcmp(item, eci->item)) 404 if (!strcmp(item, eci->item))
442 { 405 {
443 ret = 1; 406 ret = 1;
444 goto done; 407 break;
445 } 408 }
409 break;
446 } 410 }
447 goto done; 411
448 }
449 }
450 done:
451 free(cat); 412 free(cat);
452 return ret; 413 return ret;
453} 414}
diff --git a/src/bin/e_eap_editor.c b/src/bin/e_eap_editor.c
index 5856d667e..0929ae21b 100644
--- a/src/bin/e_eap_editor.c
+++ b/src/bin/e_eap_editor.c
@@ -358,6 +358,7 @@ _e_desktop_edit_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfd
358{ 358{
359 E_Desktop_Edit *editor; 359 E_Desktop_Edit *editor;
360 Efreet_Desktop *desktop; 360 Efreet_Desktop *desktop;
361 char *str;
361 362
362 editor = cfdata->editor; 363 editor = cfdata->editor;
363 desktop = editor->desktop; 364 desktop = editor->desktop;
@@ -375,11 +376,12 @@ _e_desktop_edit_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfd
375 IFFREE(cfdata->desktop->startup_wm_class); 376 IFFREE(cfdata->desktop->startup_wm_class);
376 IFDUP(cfdata->startup_wm_class, cfdata->desktop->startup_wm_class); 377 IFDUP(cfdata->startup_wm_class, cfdata->desktop->startup_wm_class);
377 378
378 if (cfdata->desktop->categories) 379 EINA_LIST_FREE(cfdata->desktop->categories, str)
379 ecore_list_destroy(cfdata->desktop->categories); 380 eina_stringshare_del(str);
380 cfdata->desktop->categories = efreet_desktop_string_list_parse(cfdata->categories); 381 cfdata->desktop->categories = efreet_desktop_string_list_parse(cfdata->categories);
381 if (cfdata->desktop->mime_types) 382
382 ecore_list_destroy(cfdata->desktop->mime_types); 383 EINA_LIST_FREE(cfdata->desktop->mime_types, str)
384 eina_stringshare_del(str);
383 cfdata->desktop->mime_types = efreet_desktop_string_list_parse(cfdata->mimes); 385 cfdata->desktop->mime_types = efreet_desktop_string_list_parse(cfdata->mimes);
384 386
385 IFFREE(cfdata->desktop->icon); 387 IFFREE(cfdata->desktop->icon);
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index ac34878d9..52819a7df 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -98,7 +98,7 @@ e_exec_shutdown(void)
98 98
99EAPI E_Exec_Instance * 99EAPI E_Exec_Instance *
100e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec, 100e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
101 Ecore_List *files, const char *launch_method) 101 Eina_List *files, const char *launch_method)
102{ 102{
103 E_Exec_Launch *launch; 103 E_Exec_Launch *launch;
104 E_Exec_Instance *inst = NULL; 104 E_Exec_Instance *inst = NULL;
@@ -367,15 +367,12 @@ static Evas_Bool
367_e_exec_startup_id_pid_find(const Eina_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)
368{ 368{
369 E_Exec_Search *search; 369 E_Exec_Search *search;
370 Eina_List *instances, *l; 370 E_Exec_Instance *inst;
371 Eina_List *l;
371 372
372 search = data; 373 search = data;
373 instances = value;
374 for (l = instances; l; l = l->next)
375 {
376 E_Exec_Instance *inst;
377 374
378 inst = l->data; 375 EINA_LIST_FOREACH(value, l, inst)
379 if (((search->startup_id > 0) && (search->startup_id == inst->startup_id)) || 376 if (((search->startup_id > 0) && (search->startup_id == inst->startup_id)) ||
380 ((inst->exe) && (search->pid > 1) && 377 ((inst->exe) && (search->pid > 1) &&
381 (search->pid == ecore_exe_pid_get(inst->exe)))) 378 (search->pid == ecore_exe_pid_get(inst->exe))))
@@ -383,7 +380,7 @@ _e_exec_startup_id_pid_find(const Eina_Hash *hash __UNUSED__, const void *key __
383 search->desktop = inst->desktop; 380 search->desktop = inst->desktop;
384 return 0; 381 return 0;
385 } 382 }
386 } 383
387 return 1; 384 return 1;
388} 385}
389 386
diff --git a/src/bin/e_exec.h b/src/bin/e_exec.h
index 38eec0d51..24eb31a81 100644
--- a/src/bin/e_exec.h
+++ b/src/bin/e_exec.h
@@ -20,7 +20,7 @@ struct _E_Exec_Instance
20 20
21EAPI int e_exec_init(void); 21EAPI int e_exec_init(void);
22EAPI int e_exec_shutdown(void); 22EAPI int e_exec_shutdown(void);
23EAPI E_Exec_Instance *e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Ecore_List *files, const char *launch_method); 23EAPI E_Exec_Instance *e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method);
24 24
25EAPI Efreet_Desktop *e_exec_startup_id_pid_find(int startup_id, pid_t pid); 25EAPI Efreet_Desktop *e_exec_startup_id_pid_find(int startup_id, pid_t pid);
26 26
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 787edc4f0..753097f9e 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -2911,30 +2911,26 @@ static void
2911_e_fm2_queue_free(Evas_Object *obj) 2911_e_fm2_queue_free(Evas_Object *obj)
2912{ 2912{
2913 E_Fm2_Smart_Data *sd; 2913 E_Fm2_Smart_Data *sd;
2914 E_Fm2_Icon *ic;
2914 2915
2915 sd = evas_object_smart_data_get(obj); 2916 sd = evas_object_smart_data_get(obj);
2916 if (!sd) return; 2917 if (!sd) return;
2917 /* just free the icons in the queue and the queue itself */ 2918 /* just free the icons in the queue and the queue itself */
2918 while (sd->queue) 2919 EINA_LIST_FREE(sd->queue, ic)
2919 { 2920 _e_fm2_icon_free(ic);
2920 _e_fm2_icon_free(sd->queue->data);
2921 sd->queue = eina_list_remove_list(sd->queue, sd->queue);
2922 }
2923} 2921}
2924 2922
2925static void 2923static void
2926_e_fm2_regions_free(Evas_Object *obj) 2924_e_fm2_regions_free(Evas_Object *obj)
2927{ 2925{
2928 E_Fm2_Smart_Data *sd; 2926 E_Fm2_Smart_Data *sd;
2927 E_Fm2_Region *rg;
2929 2928
2930 sd = evas_object_smart_data_get(obj); 2929 sd = evas_object_smart_data_get(obj);
2931 if (!sd) return; 2930 if (!sd) return;
2932 /* free up all regions */ 2931 /* free up all regions */
2933 while (sd->regions.list) 2932 EINA_LIST_FREE(sd->regions.list, rg)
2934 { 2933 _e_fm2_region_free(rg);
2935 _e_fm2_region_free(sd->regions.list->data);
2936 sd->regions.list = eina_list_remove_list(sd->regions.list, sd->regions.list);
2937 }
2938} 2934}
2939 2935
2940static void 2936static void
@@ -4217,12 +4213,8 @@ _e_fm2_region_free(E_Fm2_Region *rg)
4217{ 4213{
4218 E_Fm2_Icon *ic; 4214 E_Fm2_Icon *ic;
4219 4215
4220 while (rg->list) 4216 EINA_LIST_FREE(rg->list, ic)
4221 {
4222 ic = rg->list->data;
4223 ic->region = NULL; 4217 ic->region = NULL;
4224 rg->list = eina_list_remove_list(rg->list, rg->list);
4225 }
4226 free(rg); 4218 free(rg);
4227} 4219}
4228 4220
@@ -7195,19 +7187,13 @@ _e_fm2_context_list_sort(const void *data1, const void *data2)
7195static void 7187static void
7196_e_fm2_icon_menu_post_cb(void *data, E_Menu *m) 7188_e_fm2_icon_menu_post_cb(void *data, E_Menu *m)
7197{ 7189{
7190 E_Fm2_Context_Menu_Data *md;
7198 E_Fm2_Icon *ic; 7191 E_Fm2_Icon *ic;
7199 7192
7200 ic = data; 7193 ic = data;
7201 ic->menu = NULL; 7194 ic->menu = NULL;
7202 while (_e_fm2_menu_contexts) 7195 EINA_LIST_FREE(_e_fm2_menu_contexts, md)
7203 {
7204 E_Fm2_Context_Menu_Data *md;
7205
7206 md = _e_fm2_menu_contexts->data;
7207 _e_fm2_menu_contexts = eina_list_remove_list(_e_fm2_menu_contexts,
7208 _e_fm2_menu_contexts);
7209 E_FREE(md); 7196 E_FREE(md);
7210 }
7211} 7197}
7212 7198
7213static void 7199static void
@@ -8153,10 +8139,8 @@ _e_fm2_live_process_end(Evas_Object *obj)
8153 E_Fm2_Action *a; 8139 E_Fm2_Action *a;
8154 8140
8155 sd = evas_object_smart_data_get(obj); 8141 sd = evas_object_smart_data_get(obj);
8156 while (sd->live.actions) 8142 EINA_LIST_FREE(sd->live.actions, a)
8157 { 8143 {
8158 a = sd->live.actions->data;
8159 sd->live.actions = eina_list_remove_list(sd->live.actions, sd->live.actions);
8160 eina_stringshare_del(a->file); 8144 eina_stringshare_del(a->file);
8161 eina_stringshare_del(a->file2); 8145 eina_stringshare_del(a->file2);
8162 eina_stringshare_del(a->finf.lnk); 8146 eina_stringshare_del(a->finf.lnk);
diff --git a/src/bin/e_fm_main.c b/src/bin/e_fm_main.c
index b04bc33e0..8faa0d7e3 100644
--- a/src/bin/e_fm_main.c
+++ b/src/bin/e_fm_main.c
@@ -305,7 +305,8 @@ static void
305_e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error) 305_e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error)
306{ 306{
307 E_Hal_Manager_Get_All_Devices_Return *ret = reply_data; 307 E_Hal_Manager_Get_All_Devices_Return *ret = reply_data;
308 char *device; 308 Eina_List *l;
309 char *udi;
309 310
310 if (!ret || !ret->strings) return; 311 if (!ret || !ret->strings) return;
311 312
@@ -315,13 +316,9 @@ _e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error)
315 return; 316 return;
316 } 317 }
317 318
318 ecore_list_first_goto(ret->strings); 319 EINA_LIST_FOREACH(ret->strings, l, udi)
319 while ((device = ecore_list_next(ret->strings)))
320 { 320 {
321// printf("DB INIT DEV+: %s\n", device); 321// printf("DB INIT DEV+: %s\n", udi);
322 char *udi;
323
324 udi = device;
325 e_hal_device_query_capability(_e_dbus_conn, udi, "storage", 322 e_hal_device_query_capability(_e_dbus_conn, udi, "storage",
326 _e_dbus_cb_store_is, strdup(udi)); 323 _e_dbus_cb_store_is, strdup(udi));
327 e_hal_device_query_capability(_e_dbus_conn, udi, "volume", 324 e_hal_device_query_capability(_e_dbus_conn, udi, "volume",
@@ -333,6 +330,7 @@ static void
333_e_dbus_cb_dev_store(void *user_data, void *reply_data, DBusError *error) 330_e_dbus_cb_dev_store(void *user_data, void *reply_data, DBusError *error)
334{ 331{
335 E_Hal_Manager_Find_Device_By_Capability_Return *ret = reply_data; 332 E_Hal_Manager_Find_Device_By_Capability_Return *ret = reply_data;
333 Eina_List *l;
336 char *device; 334 char *device;
337 335
338 if (!ret || !ret->strings) return; 336 if (!ret || !ret->strings) return;
@@ -343,8 +341,7 @@ _e_dbus_cb_dev_store(void *user_data, void *reply_data, DBusError *error)
343 return; 341 return;
344 } 342 }
345 343
346 ecore_list_first_goto(ret->strings); 344 EINA_LIST_FOREACH(ret->strings, l, device)
347 while ((device = ecore_list_next(ret->strings)))
348 { 345 {
349// printf("DB STORE+: %s\n", device); 346// printf("DB STORE+: %s\n", device);
350 e_storage_add(device); 347 e_storage_add(device);
@@ -355,6 +352,7 @@ static void
355_e_dbus_cb_dev_vol(void *user_data, void *reply_data, DBusError *error) 352_e_dbus_cb_dev_vol(void *user_data, void *reply_data, DBusError *error)
356{ 353{
357 E_Hal_Manager_Find_Device_By_Capability_Return *ret = reply_data; 354 E_Hal_Manager_Find_Device_By_Capability_Return *ret = reply_data;
355 Eina_List *l;
358 char *device; 356 char *device;
359 357
360 if (!ret || !ret->strings) return; 358 if (!ret || !ret->strings) return;
@@ -365,8 +363,7 @@ _e_dbus_cb_dev_vol(void *user_data, void *reply_data, DBusError *error)
365 return; 363 return;
366 } 364 }
367 365
368 ecore_list_first_goto(ret->strings); 366 EINA_LIST_FOREACH(ret->strings, l, device)
369 while ((device = ecore_list_next(ret->strings)))
370 { 367 {
371// printf("DB VOL+: %s\n", device); 368// printf("DB VOL+: %s\n", device);
372 e_volume_add(device); 369 e_volume_add(device);
@@ -856,7 +853,7 @@ e_volume_mount(E_Volume *v)
856{ 853{
857 char buf[256]; 854 char buf[256];
858 char *mount_point; 855 char *mount_point;
859 Ecore_List *opt = NULL; 856 Eina_List *opt = NULL;
860 857
861 if (!v || !v->mount_point || strncmp(v->mount_point, "/media/", 7)) 858 if (!v || !v->mount_point || strncmp(v->mount_point, "/media/", 7))
862 return; 859 return;
@@ -868,13 +865,12 @@ e_volume_mount(E_Volume *v)
868// || (!strcmp(v->fstype, "iso9660")) || (!strcmp(v->fstype, "udf")) 865// || (!strcmp(v->fstype, "iso9660")) || (!strcmp(v->fstype, "udf"))
869 ) 866 )
870 { 867 {
871 opt = ecore_list_new();
872 snprintf(buf, sizeof(buf), "uid=%i", (int)getuid()); 868 snprintf(buf, sizeof(buf), "uid=%i", (int)getuid());
873 ecore_list_append(opt, buf); 869 opt = eina_list_append(opt, buf);
874 } 870 }
875 e_hal_device_volume_mount(_e_dbus_conn, v->udi, mount_point, 871 e_hal_device_volume_mount(_e_dbus_conn, v->udi, mount_point,
876 v->fstype, opt, NULL, v); 872 v->fstype, opt, NULL, v);
877 if (opt) ecore_list_destroy(opt); 873 opt = eina_list_free(opt);
878} 874}
879 875
880static void 876static void
@@ -1077,12 +1073,7 @@ _e_fm_monitor_start_try(E_Fm_Task *task)
1077 } 1073 }
1078 fclose(f); 1074 fclose(f);
1079 /* append whats left */ 1075 /* append whats left */
1080 while (files) 1076 files = eina_list_merge(f2, files);
1081 {
1082 f2 = eina_list_append(f2, files->data);
1083 files = eina_list_remove_list(files, files);
1084 }
1085 files = f2;
1086 } 1077 }
1087 } 1078 }
1088 ed->fq = files; 1079 ed->fq = files;
@@ -1119,15 +1110,12 @@ _e_fm_monitor_start_try(E_Fm_Task *task)
1119static void 1110static void
1120_e_fm_monitor_end(int id, const char *path) 1111_e_fm_monitor_end(int id, const char *path)
1121{ 1112{
1122 Eina_List *l;
1123 E_Fm_Task *task; 1113 E_Fm_Task *task;
1124 1114 Eina_List *l;
1125 for (l = _e_dirs; l; l = l->next)
1126 {
1127 E_Dir *ed; 1115 E_Dir *ed;
1128 1116
1117 EINA_LIST_FOREACH(_e_dirs, l, ed)
1129 /* look for the dire entry to stop monitoring */ 1118 /* look for the dire entry to stop monitoring */
1130 ed = l->data;
1131 if ((id == ed->id) && (!strcmp(ed->dir, path))) 1119 if ((id == ed->id) && (!strcmp(ed->dir, path)))
1132 { 1120 {
1133 /* if this is not the real monitoring node - unref the 1121 /* if this is not the real monitoring node - unref the
@@ -1156,7 +1144,6 @@ _e_fm_monitor_end(int id, const char *path)
1156 _e_dirs = eina_list_remove_list(_e_dirs, l); 1144 _e_dirs = eina_list_remove_list(_e_dirs, l);
1157 break; 1145 break;
1158 } 1146 }
1159 }
1160 1147
1161 task = _e_fm_task_get(id); 1148 task = _e_fm_task_get(id);
1162 if (task) _e_fm_task_remove(task); 1149 if (task) _e_fm_task_remove(task);
@@ -1173,18 +1160,13 @@ _e_fm_task_get(int id)
1173static Eina_List * 1160static Eina_List *
1174_e_fm_task_node_get(int id) 1161_e_fm_task_node_get(int id)
1175{ 1162{
1176 Eina_List *l = _e_fm_tasks;
1177 E_Fm_Task *task; 1163 E_Fm_Task *task;
1164 Eina_List *l;
1178 1165
1179 while (l) 1166 EINA_LIST_FOREACH(_e_fm_tasks, l, task)
1180 {
1181 task = eina_list_data_get(l);
1182 if (task->id == id) 1167 if (task->id == id)
1183 return l; 1168 return l;
1184 1169
1185 l = eina_list_next(l);
1186 }
1187
1188 return NULL; 1170 return NULL;
1189} 1171}
1190 1172
@@ -1722,11 +1704,7 @@ _e_cb_recent_clean(void *data)
1722 ed = data; 1704 ed = data;
1723 ed->cleaning = 1; 1705 ed->cleaning = 1;
1724 t_now = ecore_time_get(); 1706 t_now = ecore_time_get();
1725 for (l = ed->recent_mods; l;) 1707 EINA_LIST_FOREACH_SAFE(ed->recent_mods, pl, l, m)
1726 {
1727 m = l->data;
1728 pl = l;
1729 l = l->next;
1730 if ((m->mod) && ((t_now - m->timestamp) >= DEF_MOD_BACKOFF)) 1708 if ((m->mod) && ((t_now - m->timestamp) >= DEF_MOD_BACKOFF))
1731 { 1709 {
1732 ed->recent_mods = eina_list_remove_list(ed->recent_mods, pl); 1710 ed->recent_mods = eina_list_remove_list(ed->recent_mods, pl);
@@ -1734,7 +1712,6 @@ _e_cb_recent_clean(void *data)
1734 eina_stringshare_del(m->path); 1712 eina_stringshare_del(m->path);
1735 free(m); 1713 free(m);
1736 } 1714 }
1737 }
1738 ed->cleaning = 0; 1715 ed->cleaning = 0;
1739 if (ed->recent_mods) return 1; 1716 if (ed->recent_mods) return 1;
1740 ed->recent_clean = NULL; 1717 ed->recent_clean = NULL;
@@ -2020,18 +1997,15 @@ static char *
2020_e_str_list_remove(Eina_List **list, char *str) 1997_e_str_list_remove(Eina_List **list, char *str)
2021{ 1998{
2022 Eina_List *l; 1999 Eina_List *l;
2023
2024 for (l = *list; l; l = l->next)
2025 {
2026 char *s; 2000 char *s;
2027 2001
2028 s = l->data; 2002 EINA_LIST_FOREACH(*list, l, s)
2029 if (!strcmp(s, str)) 2003 if (!strcmp(s, str))
2030 { 2004 {
2031 *list = eina_list_remove_list(*list, l); 2005 *list = eina_list_remove_list(*list, l);
2032 return s; 2006 return s;
2033 } 2007 }
2034 } 2008
2035 return NULL; 2009 return NULL;
2036} 2010}
2037 2011
@@ -2050,6 +2024,7 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
2050 { 2024 {
2051 FILE *forder; 2025 FILE *forder;
2052 Eina_List *files = NULL, *l; 2026 Eina_List *files = NULL, *l;
2027 char *str;
2053 2028
2054 forder = fopen(order, "r"); 2029 forder = fopen(order, "r");
2055 if (forder) 2030 if (forder)
@@ -2067,23 +2042,21 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
2067 fclose(forder); 2042 fclose(forder);
2068 } 2043 }
2069 /* remove dest file from .order - if there */ 2044 /* remove dest file from .order - if there */
2070 for (l = files; l; l = l->next) 2045 EINA_LIST_FOREACH(files, l, str)
2071 { 2046 if (!strcmp(str, file))
2072 if (!strcmp(l->data, file))
2073 { 2047 {
2074 free(l->data); 2048 free(str);
2075 files = eina_list_remove_list(files, l); 2049 files = eina_list_remove_list(files, l);
2076 break; 2050 break;
2077 } 2051 }
2078 }
2079 /* now insert dest into list or replace entry */ 2052 /* now insert dest into list or replace entry */
2080 for (l = files; l; l = l->next) 2053 EINA_LIST_FOREACH(files, l, str)
2081 { 2054 {
2082 if (!strcmp(l->data, relative)) 2055 if (!strcmp(str, relative))
2083 { 2056 {
2084 if (after == 2) /* replace */ 2057 if (after == 2) /* replace */
2085 { 2058 {
2086 free(l->data); 2059 free(str);
2087 l->data = strdup(file); 2060 l->data = strdup(file);
2088 } 2061 }
2089 else if (after == 0) /* before */ 2062 else if (after == 0) /* before */
@@ -2101,11 +2074,10 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
2101 forder = fopen(order, "w"); 2074 forder = fopen(order, "w");
2102 if (forder) 2075 if (forder)
2103 { 2076 {
2104 while (files) 2077 EINA_LIST_FREE(files, str)
2105 { 2078 {
2106 fprintf(forder, "%s\n", (char *)files->data); 2079 fprintf(forder, "%s\n", str);
2107 free(files->data); 2080 free(str);
2108 files = eina_list_remove_list(files, files);
2109 } 2081 }
2110 fclose(forder); 2082 fclose(forder);
2111 } 2083 }
@@ -2115,24 +2087,20 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
2115static void 2087static void
2116_e_dir_del(E_Dir *ed) 2088_e_dir_del(E_Dir *ed)
2117{ 2089{
2090 void *data;
2091 E_Mod *m;
2092
2118 eina_stringshare_del(ed->dir); 2093 eina_stringshare_del(ed->dir);
2119 if (ed->idler) ecore_idler_del(ed->idler); 2094 if (ed->idler) ecore_idler_del(ed->idler);
2120 if (ed->recent_clean) 2095 if (ed->recent_clean)
2121 ecore_timer_del(ed->recent_clean); 2096 ecore_timer_del(ed->recent_clean);
2122 while (ed->recent_mods) 2097 EINA_LIST_FREE(ed->recent_mods, m)
2123 { 2098 {
2124 E_Mod *m;
2125
2126 m = ed->recent_mods->data;
2127 eina_stringshare_del(m->path); 2099 eina_stringshare_del(m->path);
2128 free(m); 2100 free(m);
2129 ed->recent_mods = eina_list_remove_list(ed->recent_mods, ed->recent_mods);
2130 }
2131 while (ed->fq)
2132 {
2133 free(ed->fq->data);
2134 ed->fq = eina_list_remove_list(ed->fq, ed->fq);
2135 } 2101 }
2102 EINA_LIST_FREE(ed->fq, data)
2103 free(data);
2136 free(ed); 2104 free(ed);
2137} 2105}
2138 2106
diff --git a/src/bin/e_fm_mime.c b/src/bin/e_fm_mime.c
index 4ad9e2428..3cab54708 100644
--- a/src/bin/e_fm_mime.c
+++ b/src/bin/e_fm_mime.c
@@ -359,7 +359,7 @@ e_fm2_mime_handler_glob_handlers_call_all(Evas_Object *obj, const char *path, co
359} 359}
360 360
361/* run a handlers test function */ 361/* run a handlers test function */
362EAPI Evas_Bool 362EAPI Eina_Bool
363e_fm2_mime_handler_test(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const char *path) 363e_fm2_mime_handler_test(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const char *path)
364{ 364{
365 if ((!handler) || (!obj) || (!path)) return 0; 365 if ((!handler) || (!obj) || (!path)) return 0;
diff --git a/src/bin/e_gadcon.c b/src/bin/e_gadcon.c
index 280c7435a..8e66cdb43 100644
--- a/src/bin/e_gadcon.c
+++ b/src/bin/e_gadcon.c
@@ -3473,11 +3473,12 @@ _e_gadcon_layout_smart_width_smart_sort_reverse_cb(const void *d1, const void *d
3473void 3473void
3474_e_gadcon_layout_smart_gadcons_width_adjust(E_Smart_Data *sd, int min, int cur) 3474_e_gadcon_layout_smart_gadcons_width_adjust(E_Smart_Data *sd, int min, int cur)
3475{ 3475{
3476 E_Gadcon_Layout_Item *bi2 = NULL;
3477 E_Gadcon_Layout_Item *bi = NULL;
3478 Eina_List *l, *l2;
3476 int need, limit, reduce_total, reduce; 3479 int need, limit, reduce_total, reduce;
3477 int max_size; 3480 int max_size;
3478 int c; 3481 int c;
3479 Eina_List *l, *l2;
3480 E_Gadcon_Layout_Item *bi, *bi2;
3481 3482
3482 if (sd->horizontal) 3483 if (sd->horizontal)
3483 { 3484 {
diff --git a/src/bin/e_init_main.c b/src/bin/e_init_main.c
index 8e113eab3..a7a7f738a 100644
--- a/src/bin/e_init_main.c
+++ b/src/bin/e_init_main.c
@@ -444,6 +444,7 @@ _e_init_evas_new(Ecore_X_Window root, int w, int h, Ecore_X_Window *winret)
444 Ecore_Evas *ee; 444 Ecore_Evas *ee;
445 Evas *e; 445 Evas *e;
446 Eina_List *l; 446 Eina_List *l;
447 const char *path;
447 448
448 if ((engine == 0) || (engine == 1)) 449 if ((engine == 0) || (engine == 1))
449 { 450 {
@@ -479,7 +480,7 @@ _e_init_evas_new(Ecore_X_Window root, int w, int h, Ecore_X_Window *winret)
479 evas_image_cache_set(e, 4096 * 1024); 480 evas_image_cache_set(e, 4096 * 1024);
480 evas_font_cache_set(e, 512 * 1024); 481 evas_font_cache_set(e, 512 * 1024);
481 482
482 for (l = fpath; l; l = l->next) evas_font_path_append(e, l->data); 483 EINA_LIST_FOREACH(fpath, l, path) evas_font_path_append(e, l->data);
483 484
484 if (font_hinting == 0) 485 if (font_hinting == 0)
485 { 486 {
diff --git a/src/bin/e_int_border_menu.c b/src/bin/e_int_border_menu.c
index 7b6c73957..36f166cf2 100644
--- a/src/bin/e_int_border_menu.c
+++ b/src/bin/e_int_border_menu.c
@@ -1095,7 +1095,8 @@ _e_border_menu_cb_ibar_add_pre(void *data, E_Menu *m, E_Menu_Item *mi)
1095{ 1095{
1096 E_Menu *sm; 1096 E_Menu *sm;
1097 E_Border *bd; 1097 E_Border *bd;
1098 Ecore_List *dirs; 1098 Eina_List *dirs;
1099 Eina_List *l;
1099 char buf[4096], *file; 1100 char buf[4096], *file;
1100 const char *homedir; 1101 const char *homedir;
1101 1102
@@ -1106,7 +1107,7 @@ _e_border_menu_cb_ibar_add_pre(void *data, E_Menu *m, E_Menu_Item *mi)
1106 if (!dirs) return; 1107 if (!dirs) return;
1107 1108
1108 sm = e_menu_new(); 1109 sm = e_menu_new();
1109 while ((file = ecore_list_next(dirs))) 1110 EINA_LIST_FOREACH(dirs, l, file)
1110 { 1111 {
1111 E_Menu_Item *smi; 1112 E_Menu_Item *smi;
1112 1113
diff --git a/src/bin/e_int_config_modules.c b/src/bin/e_int_config_modules.c
index 74e49d2c0..7a3231295 100644
--- a/src/bin/e_int_config_modules.c
+++ b/src/bin/e_int_config_modules.c
@@ -17,7 +17,7 @@ struct _CFModule
17struct _CFType 17struct _CFType
18{ 18{
19 const char *key, *name, *icon; 19 const char *key, *name, *icon;
20 Evas_Hash *modules; 20 Eina_Hash *modules;
21}; 21};
22 22
23struct _CFTypes 23struct _CFTypes
@@ -241,15 +241,16 @@ _fill_type_hash(void)
241static void 241static void
242_load_modules(const char *dir) 242_load_modules(const char *dir)
243{ 243{
244 Ecore_List *files = NULL; 244 Eina_List *files = NULL;
245 Eina_List *l;
245 char *mod = NULL; 246 char *mod = NULL;
247 char *file;
246 248
247 if (!dir) return; 249 if (!dir) return;
248 if (!(files = ecore_file_ls(dir))) return; 250 if (!(files = ecore_file_ls(dir))) return;
249 251
250 /* get all modules in this path_dir */ 252 /* get all modules in this path_dir */
251 ecore_list_first_goto(files); 253 EINA_LIST_FOREACH(files, l, mod)
252 while ((mod = ecore_list_next(files)))
253 { 254 {
254 Efreet_Desktop *desk = NULL; 255 Efreet_Desktop *desk = NULL;
255 CFType *cft = NULL; 256 CFType *cft = NULL;
@@ -312,7 +313,8 @@ _load_modules(const char *dir)
312 eina_hash_direct_add(cft->modules, cfm->short_name, cfm); 313 eina_hash_direct_add(cft->modules, cfm->short_name, cfm);
313 } 314 }
314 free(mod); 315 free(mod);
315 if (files) ecore_list_destroy(files); 316 EINA_LIST_FREE(files, file)
317 free(file);
316} 318}
317 319
318static void 320static void
@@ -494,17 +496,17 @@ _list_widget_load(Evas_Object *obj, Eina_List *list)
494{ 496{
495 Evas *evas; 497 Evas *evas;
496 Eina_List *ml = NULL; 498 Eina_List *ml = NULL;
499 CFModule *mod;
497 500
498 if ((!obj) || (!list)) return; 501 if ((!obj) || (!list)) return;
499 evas = evas_object_evas_get(obj); 502 evas = evas_object_evas_get(obj);
500 for (ml = list; ml; ml = ml->next) 503 EINA_LIST_FOREACH(list, ml, mod)
501 { 504 {
502 CFModule *mod = NULL;
503 Evas_Object *ic = NULL; 505 Evas_Object *ic = NULL;
504 char *path; 506 char *path;
505 char buf[4096]; 507 char buf[4096];
506 508
507 if (!(mod = ml->data)) continue; 509 if (!mod) continue;
508 if (mod->orig_path) 510 if (mod->orig_path)
509 { 511 {
510 path = ecore_file_dir_get(mod->orig_path); 512 path = ecore_file_dir_get(mod->orig_path);
diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c
index 25d868989..564a0f72f 100644
--- a/src/bin/e_int_menus.c
+++ b/src/bin/e_int_menus.c
@@ -473,13 +473,13 @@ static void
473_e_int_menus_apps_scan(E_Menu *m, Efreet_Menu *menu) 473_e_int_menus_apps_scan(E_Menu *m, Efreet_Menu *menu)
474{ 474{
475 E_Menu_Item *mi; 475 E_Menu_Item *mi;
476 Eina_List *l;
476 477
477 if (menu->entries) 478 if (menu->entries)
478 { 479 {
479 Efreet_Menu *entry; 480 Efreet_Menu *entry;
480 481
481 ecore_list_first_goto(menu->entries); 482 EINA_LIST_FOREACH(menu->entries, l, entry)
482 while ((entry = ecore_list_next(menu->entries)))
483 { 483 {
484 mi = e_menu_item_new(m); 484 mi = e_menu_item_new(m);
485 485
@@ -1149,19 +1149,14 @@ _e_int_menus_clients_item_create(E_Border *bd, E_Menu *m)
1149static void 1149static void
1150_e_int_menus_clients_free_hook(void *obj) 1150_e_int_menus_clients_free_hook(void *obj)
1151{ 1151{
1152 Eina_List *borders;
1153 E_Border *bd;
1152 E_Menu *m; 1154 E_Menu *m;
1153 Eina_List *borders = NULL;
1154 1155
1155 m = obj; 1156 m = obj;
1156 borders = e_object_data_get(E_OBJECT(m)); 1157 borders = e_object_data_get(E_OBJECT(m));
1157 while (borders) 1158 EINA_LIST_FREE(borders, bd)
1158 {
1159 E_Border *bd;
1160
1161 bd = borders->data;
1162 borders = eina_list_remove_list(borders, borders);
1163 e_object_unref(E_OBJECT(bd)); 1159 e_object_unref(E_OBJECT(bd));
1164 }
1165} 1160}
1166 1161
1167static void 1162static void
@@ -1262,19 +1257,14 @@ _e_int_menus_lost_clients_pre_cb(void *data, E_Menu *m)
1262static void 1257static void
1263_e_int_menus_lost_clients_free_hook(void *obj) 1258_e_int_menus_lost_clients_free_hook(void *obj)
1264{ 1259{
1260 Eina_List *borders;
1261 E_Border *bd;
1265 E_Menu *m; 1262 E_Menu *m;
1266 Eina_List *borders = NULL;
1267 1263
1268 m = obj; 1264 m = obj;
1269 borders = e_object_data_get(E_OBJECT(m)); 1265 borders = e_object_data_get(E_OBJECT(m));
1270 while (borders) 1266 EINA_LIST_FREE(borders, bd)
1271 {
1272 E_Border *bd;
1273
1274 bd = borders->data;
1275 borders = eina_list_remove_list(borders, borders);
1276 e_object_unref(E_OBJECT(bd)); 1267 e_object_unref(E_OBJECT(bd));
1277 }
1278} 1268}
1279 1269
1280static void 1270static void
@@ -1295,29 +1285,21 @@ _e_int_menus_lost_clients_item_cb(void *data, E_Menu *m, E_Menu_Item *mi)
1295static void 1285static void
1296_e_int_menus_augmentation_add(E_Menu *m, Eina_List *augmentation) 1286_e_int_menus_augmentation_add(E_Menu *m, Eina_List *augmentation)
1297{ 1287{
1298 Eina_List *l = NULL;
1299
1300 for (l = augmentation; l; l = l->next)
1301 {
1302 E_Int_Menu_Augmentation *aug; 1288 E_Int_Menu_Augmentation *aug;
1289 Eina_List *l;
1303 1290
1304 aug = l->data; 1291 EINA_LIST_FOREACH(augmentation, l, aug)
1305 if (aug->add.func) aug->add.func(aug->add.data, m); 1292 if (aug->add.func) aug->add.func(aug->add.data, m);
1306 }
1307} 1293}
1308 1294
1309static void 1295static void
1310_e_int_menus_augmentation_del(E_Menu *m, Eina_List *augmentation) 1296_e_int_menus_augmentation_del(E_Menu *m, Eina_List *augmentation)
1311{ 1297{
1312 Eina_List *l = NULL;
1313
1314 for (l = augmentation; l; l = l->next)
1315 {
1316 E_Int_Menu_Augmentation *aug; 1298 E_Int_Menu_Augmentation *aug;
1299 Eina_List *l;
1317 1300
1318 aug = l->data; 1301 EINA_LIST_FOREACH(augmentation, l, aug)
1319 if (aug->del.func) aug->del.func(aug->del.data, m); 1302 if (aug->del.func) aug->del.func(aug->del.data, m);
1320 }
1321} 1303}
1322 1304
1323static void 1305static void
diff --git a/src/bin/e_intl.c b/src/bin/e_intl.c
index 53a8b268a..719e66841 100644
--- a/src/bin/e_intl.c
+++ b/src/bin/e_intl.c
@@ -278,23 +278,18 @@ e_intl_language_list(void)
278 Eina_List *next; 278 Eina_List *next;
279 Eina_List *dir_list; 279 Eina_List *dir_list;
280 Eina_List *all_languages; 280 Eina_List *all_languages;
281 E_Path_Dir *epd;
281 282
282 all_languages = NULL; 283 all_languages = NULL;
283 dir_list = e_path_dir_list_get(path_messages); 284 dir_list = e_path_dir_list_get(path_messages);
284 for (next = dir_list ; next ; next = next->next) 285 EINA_LIST_FOREACH(dir_list, next, epd)
285 { 286 {
286 E_Path_Dir *epd;
287 Eina_List *dir_languages; 287 Eina_List *dir_languages;
288
289 epd = next->data;
290 dir_languages = _e_intl_language_dir_scan(epd->dir);
291 while (dir_languages)
292 {
293 char *language; 288 char *language;
294 289
295 language = dir_languages->data; 290 dir_languages = _e_intl_language_dir_scan(epd->dir);
296 dir_languages = eina_list_remove_list(dir_languages, dir_languages);
297 291
292 EINA_LIST_FREE(dir_languages, language)
298 if ((_e_intl_language_list_find(all_languages, language)) || 293 if ((_e_intl_language_list_find(all_languages, language)) ||
299 ((strlen(language) > 2) && (!_e_intl_locale_validate(language)))) 294 ((strlen(language) > 2) && (!_e_intl_locale_validate(language))))
300 { 295 {
@@ -303,7 +298,6 @@ e_intl_language_list(void)
303 else 298 else
304 all_languages = eina_list_append(all_languages, language); 299 all_languages = eina_list_append(all_languages, language);
305 } 300 }
306 }
307 301
308 e_path_dir_list_free(dir_list); 302 e_path_dir_list_free(dir_list);
309 303
@@ -314,17 +308,13 @@ static int
314_e_intl_language_list_find(Eina_List *language_list, char *language) 308_e_intl_language_list_find(Eina_List *language_list, char *language)
315{ 309{
316 Eina_List *l; 310 Eina_List *l;
311 char *lang;
317 312
318 if (!language_list) return 0; 313 if (!language_list) return 0;
319 if (!language) return 0; 314 if (!language) return 0;
320 315
321 for (l = language_list; l; l = l->next) 316 EINA_LIST_FOREACH(language_list, l, lang)
322 {
323 char *lang;
324
325 lang = l->data;
326 if (!strcmp(lang, language)) return 1; 317 if (!strcmp(lang, language)) return 1;
327 }
328 318
329 return 0; 319 return 0;
330} 320}
@@ -387,32 +377,15 @@ e_intl_input_method_list(void)
387{ 377{
388 Eina_List *input_methods; 378 Eina_List *input_methods;
389 Eina_List *im_list; 379 Eina_List *im_list;
390 Eina_List *l;
391 char *imc_path;
392 380
393 im_list = NULL; 381 im_list = NULL;
394 382
395 /* Personal Path */ 383 /* Personal Path */
396 input_methods = _e_intl_imc_dir_scan(e_intl_imc_personal_path_get()); 384 im_list = _e_intl_imc_dir_scan(e_intl_imc_personal_path_get());
397 for (l = input_methods; l; l = l->next)
398 {
399 imc_path = l->data;
400 im_list = eina_list_append(im_list, imc_path);
401 }
402
403 while (input_methods)
404 input_methods = eina_list_remove_list(input_methods, input_methods);
405 385
406 /* System Path */ 386 /* System Path */
407 input_methods = _e_intl_imc_dir_scan(e_intl_imc_system_path_get()); 387 input_methods = _e_intl_imc_dir_scan(e_intl_imc_system_path_get());
408 for (l = input_methods; l; l = l->next) 388 im_list = eina_list_merge(im_list, input_methods);
409 {
410 imc_path = l->data;
411 im_list = eina_list_append(im_list, imc_path);
412 }
413
414 while (input_methods)
415 input_methods = eina_list_remove_list(input_methods, input_methods);
416 389
417 return im_list; 390 return im_list;
418} 391}
@@ -488,6 +461,7 @@ static char *
488_e_intl_language_path_find(char *language) 461_e_intl_language_path_find(char *language)
489{ 462{
490 char *directory; 463 char *directory;
464 char *data;
491 Eina_List *dir_list; 465 Eina_List *dir_list;
492 Eina_List *search_list; 466 Eina_List *search_list;
493 Eina_List *next_dir; 467 Eina_List *next_dir;
@@ -527,13 +501,8 @@ _e_intl_language_path_find(char *language)
527 501
528 e_path_dir_list_free(dir_list); 502 e_path_dir_list_free(dir_list);
529 503
530 while (search_list) 504 EINA_LIST_FREE(search_list, data)
531 {
532 char *data;
533 data = search_list->data;
534 free(data); 505 free(data);
535 search_list = eina_list_remove_list(search_list, search_list);
536 }
537 506
538 return directory; 507 return directory;
539} 508}
@@ -542,7 +511,7 @@ static Eina_List *
542_e_intl_language_dir_scan(const char *dir) 511_e_intl_language_dir_scan(const char *dir)
543{ 512{
544 Eina_List *languages; 513 Eina_List *languages;
545 Ecore_List *files; 514 Eina_List *files;
546 char *file; 515 char *file;
547 516
548 languages = NULL; 517 languages = NULL;
@@ -550,19 +519,19 @@ _e_intl_language_dir_scan(const char *dir)
550 files = ecore_file_ls(dir); 519 files = ecore_file_ls(dir);
551 if (!files) return NULL; 520 if (!files) return NULL;
552 521
553 ecore_list_first_goto(files);
554 if (files) 522 if (files)
555 { 523 {
556 while ((file = ecore_list_next(files))) 524 EINA_LIST_FREE(files, file)
557 { 525 {
558 char file_path[PATH_MAX]; 526 char file_path[PATH_MAX];
559 527
560 snprintf(file_path, sizeof(file_path),"%s/%s/LC_MESSAGES/%s.mo", 528 snprintf(file_path, sizeof(file_path),"%s/%s/LC_MESSAGES/%s.mo",
561 dir, file, PACKAGE); 529 dir, file, PACKAGE);
562 if (ecore_file_exists(file_path) && !ecore_file_is_dir(file_path)) 530 if (ecore_file_exists(file_path) && !ecore_file_is_dir(file_path))
563 languages = eina_list_append(languages, strdup(file)); 531 languages = eina_list_append(languages, file);
532 else
533 free(file);
564 } 534 }
565 ecore_list_destroy(files);
566 } 535 }
567 return languages; 536 return languages;
568} 537}
@@ -579,7 +548,6 @@ _e_intl_locale_alias_get(const char *language)
579 Eina_Hash *alias_hash; 548 Eina_Hash *alias_hash;
580 char *alias; 549 char *alias;
581 char *lower_language; 550 char *lower_language;
582 char *noenc_language;
583 int i; 551 int i;
584 552
585 if ((language == NULL) || (!strncmp(language, "POSIX", strlen("POSIX")))) 553 if ((language == NULL) || (!strncmp(language, "POSIX", strlen("POSIX"))))
@@ -906,6 +874,7 @@ _e_intl_locale_validate(const char *locale)
906{ 874{
907 Eina_List *all_locales; 875 Eina_List *all_locales;
908 E_Locale_Parts *locale_parts; 876 E_Locale_Parts *locale_parts;
877 char *locale_next;
909 char *locale_lr; 878 char *locale_lr;
910 char *locale_cs_canonic; 879 char *locale_cs_canonic;
911 int found; 880 int found;
@@ -936,11 +905,7 @@ _e_intl_locale_validate(const char *locale)
936 all_locales = _e_intl_locale_system_locales_get(); 905 all_locales = _e_intl_locale_system_locales_get();
937 906
938 /* Match locale with one from the list */ 907 /* Match locale with one from the list */
939 while (all_locales) 908 EINA_LIST_FREE(all_locales, locale_next)
940 {
941 char *locale_next;
942 locale_next = all_locales->data;
943
944 if (found == 0) 909 if (found == 0)
945 { 910 {
946 E_Locale_Parts *locale_parts_next; 911 E_Locale_Parts *locale_parts_next;
@@ -1009,9 +974,6 @@ _e_intl_locale_validate(const char *locale)
1009 E_FREE(locale_lr_next); 974 E_FREE(locale_lr_next);
1010 } 975 }
1011 976
1012 all_locales = eina_list_remove_list(all_locales, all_locales);
1013 free(locale_next);
1014 }
1015 e_intl_locale_parts_free(locale_parts); 977 e_intl_locale_parts_free(locale_parts);
1016 free(locale_lr); 978 free(locale_lr);
1017 E_FREE(locale_cs_canonic); 979 E_FREE(locale_cs_canonic);
@@ -1055,19 +1017,13 @@ _e_intl_locale_search_order_get(const char *locale)
1055static Eina_List * 1017static Eina_List *
1056_e_intl_imc_dir_scan(const char *dir) 1018_e_intl_imc_dir_scan(const char *dir)
1057{ 1019{
1058 Eina_List *imcs; 1020 Eina_List *imcs = NULL;
1059 Ecore_List *files; 1021 Eina_List *files;
1060 char *file; 1022 char *file;
1061 1023
1062 imcs = NULL;
1063
1064 files = ecore_file_ls(dir); 1024 files = ecore_file_ls(dir);
1065 if (!files) return NULL;
1066 1025
1067 ecore_list_first_goto(files); 1026 EINA_LIST_FREE(files, file)
1068 if (files)
1069 {
1070 while ((file = ecore_list_next(files)))
1071 { 1027 {
1072 if (strstr(file, ".imc") != NULL) 1028 if (strstr(file, ".imc") != NULL)
1073 { 1029 {
@@ -1076,8 +1032,8 @@ _e_intl_imc_dir_scan(const char *dir)
1076 snprintf(buf, sizeof(buf), "%s/%s", dir, file); 1032 snprintf(buf, sizeof(buf), "%s/%s", dir, file);
1077 imcs = eina_list_append(imcs, strdup(buf)); 1033 imcs = eina_list_append(imcs, strdup(buf));
1078 } 1034 }
1035 free(file);
1079 } 1036 }
1080 ecore_list_destroy(files); 1037
1081 }
1082 return imcs; 1038 return imcs;
1083} 1039}
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 29434ccea..c80b0bee9 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -762,15 +762,15 @@ main(int argc, char **argv)
762 e_init_status_set(_("Setting up Paths")); 762 e_init_status_set(_("Setting up Paths"));
763 TS("efreet paths"); 763 TS("efreet paths");
764 { 764 {
765 Ecore_List *list; 765 Eina_List *list;
766 766
767 list = efreet_icon_extra_list_get(); 767 list = efreet_icon_extra_list_get();
768 if (list) 768 if (list)
769 { 769 {
770 snprintf(buf, sizeof(buf), "%s/.e/e/icons", e_user_homedir_get()); 770 snprintf(buf, sizeof(buf), "%s/.e/e/icons", e_user_homedir_get());
771 ecore_list_prepend(list, (void *)eina_stringshare_add(buf)); 771 list = eina_list_prepend(list, (void *)eina_stringshare_add(buf));
772 snprintf(buf, sizeof(buf), "%s/data/icons", e_prefix_data_get()); 772 snprintf(buf, sizeof(buf), "%s/data/icons", e_prefix_data_get());
773 ecore_list_prepend(list, (void *)eina_stringshare_add(buf)); 773 list = eina_list_prepend(list, (void *)eina_stringshare_add(buf));
774 } 774 }
775 } 775 }
776 efreet_icon_extension_add(".edj"); 776 efreet_icon_extension_add(".edj");
diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c
index 582af6333..15425a766 100644
--- a/src/bin/e_menu.c
+++ b/src/bin/e_menu.c
@@ -1063,7 +1063,7 @@ _e_menu_item_free(E_Menu_Item *mi)
1063 { 1063 {
1064 mi->submenu->parent_item = NULL; 1064 mi->submenu->parent_item = NULL;
1065 e_object_unref(E_OBJECT(mi->submenu)); /* added on submenu_set() */ 1065 e_object_unref(E_OBJECT(mi->submenu)); /* added on submenu_set() */
1066 e_object_del(E_OBJECT(mi->submenu)); 1066/* e_object_del(E_OBJECT(mi->submenu)); */
1067 } 1067 }
1068 if (mi->menu->realized) _e_menu_item_unrealize(mi); 1068 if (mi->menu->realized) _e_menu_item_unrealize(mi);
1069 mi->menu->items = eina_list_remove(mi->menu->items, mi); 1069 mi->menu->items = eina_list_remove(mi->menu->items, mi);
diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index 5ef7982c3..43757b8bc 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -36,7 +36,7 @@ e_module_init(void)
36EAPI int 36EAPI int
37e_module_shutdown(void) 37e_module_shutdown(void)
38{ 38{
39 Eina_List *l; 39 E_Module *m;
40 40
41#ifdef HAVE_VALGRIND 41#ifdef HAVE_VALGRIND
42 /* do a leak check now before we dlclose() all those plugins, cause 42 /* do a leak check now before we dlclose() all those plugins, cause
@@ -46,25 +46,18 @@ e_module_shutdown(void)
46#endif 46#endif
47 47
48 _e_modules = eina_list_reverse(_e_modules); 48 _e_modules = eina_list_reverse(_e_modules);
49 for (l = _e_modules; l; l = l->next)
50 {
51 E_Module *m;
52 49
53 m = l->data; 50 EINA_LIST_FREE(_e_modules, m)
54 if ((m->enabled) && (!m->error)) 51 {
52 if (m && m->enabled && !m->error)
55 { 53 {
56 m->func.save(m); 54 m->func.save(m);
57 m->func.shutdown(m); 55 m->func.shutdown(m);
58 m->enabled = 0; 56 m->enabled = 0;
59 } 57 }
58 e_object_del(E_OBJECT(m));
60 } 59 }
61 l = _e_modules; 60
62 _e_modules = NULL;
63 while (l)
64 {
65 e_object_del(E_OBJECT(l->data));
66 l = eina_list_remove_list(l, l);
67 }
68 return 1; 61 return 1;
69} 62}
70 63
@@ -469,13 +462,11 @@ e_module_priority_set(E_Module *m, int priority)
469static void 462static void
470_e_module_free(E_Module *m) 463_e_module_free(E_Module *m)
471{ 464{
465 E_Config_Module *em;
472 Eina_List *l; 466 Eina_List *l;
473 467
474 for (l = e_config->modules; l; l = l->next) 468 EINA_LIST_FOREACH(e_config->modules, l, em)
475 { 469 {
476 E_Config_Module *em;
477
478 em = l->data;
479 if (!em) continue; 470 if (!em) continue;
480 if (!e_util_strcmp(em->name, m->name)) 471 if (!e_util_strcmp(em->name, m->name))
481 { 472 {
diff --git a/src/bin/e_prefix.c b/src/bin/e_prefix.c
index f007a6eec..cb441f59d 100644
--- a/src/bin/e_prefix.c
+++ b/src/bin/e_prefix.c
@@ -283,7 +283,8 @@ _e_prefix_share_hunt(void)
283 */ 283 */
284 if (!_prefix_path_data) 284 if (!_prefix_path_data)
285 { 285 {
286 Ecore_List *files; 286 Eina_List *files;
287 Eina_List *l;
287 288
288 snprintf(buf, sizeof(buf), "%s", _prefix_path); 289 snprintf(buf, sizeof(buf), "%s", _prefix_path);
289 p = strrchr(buf, '/'); 290 p = strrchr(buf, '/');
@@ -293,8 +294,7 @@ _e_prefix_share_hunt(void)
293 { 294 {
294 char *file; 295 char *file;
295 296
296 ecore_list_first_goto(files); 297 EINA_LIST_FOREACH(files, l, file)
297 while ((file = ecore_list_current(files)))
298 { 298 {
299 snprintf(buf2, sizeof(buf2), "%s/%s/"MAGIC_DAT, buf, file); 299 snprintf(buf2, sizeof(buf2), "%s/%s/"MAGIC_DAT, buf, file);
300 if (ecore_file_exists(buf2)) 300 if (ecore_file_exists(buf2))
@@ -305,9 +305,12 @@ _e_prefix_share_hunt(void)
305 _prefix_path_locale = strdup(buf2); 305 _prefix_path_locale = strdup(buf2);
306 break; 306 break;
307 } 307 }
308 ecore_list_next(files);
309 } 308 }
310 ecore_list_destroy(files); 309 while (files)
310 {
311 free(eina_list_data_get(files));
312 files = eina_list_remove_list(files, files);
313 }
311 } 314 }
312 } 315 }
313 316
diff --git a/src/bin/e_utils.c b/src/bin/e_utils.c
index 690402bf1..a80c50779 100644
--- a/src/bin/e_utils.c
+++ b/src/bin/e_utils.c
@@ -618,7 +618,9 @@ e_util_shell_env_path_eval(char *path)
618 * $HOME/bin/$HOSTNAME/blah -> /home/user/bin/localhost/blah 618 * $HOME/bin/$HOSTNAME/blah -> /home/user/bin/localhost/blah
619 * etc. etc. 619 * etc. etc.
620 */ 620 */
621 char buf[4096], *pd, *p, *v1, *v2, *s, *v, *vp; 621 char buf[4096], *pd, *p, *v2, *s, *vp;
622 char *v = NULL;
623 char *v1 = NULL;
622 int esc = 0, invar = 0; 624 int esc = 0, invar = 0;
623 625
624 for (p = path, pd = buf; (pd < (buf + sizeof(buf) - 1)); p++) 626 for (p = path, pd = buf; (pd < (buf + sizeof(buf) - 1)); p++)
diff --git a/src/modules/battery/batget.c b/src/modules/battery/batget.c
index eda696a75..6db3826ab 100644
--- a/src/modules/battery/batget.c
+++ b/src/modules/battery/batget.c
@@ -430,7 +430,7 @@ struct _Sys_Class_Power_Supply_Uevent
430 unsigned char have_current_now : 1; 430 unsigned char have_current_now : 1;
431}; 431};
432 432
433static Ecore_List *events = NULL; 433static Eina_List *events = NULL;
434static Ecore_Timer *sys_class_delay_check = NULL; 434static Ecore_Timer *sys_class_delay_check = NULL;
435 435
436static int 436static int
@@ -451,18 +451,14 @@ linux_sys_class_power_supply_cb_re_init(void *data)
451 451
452 if (events) 452 if (events)
453 { 453 {
454 while ((sysev = ecore_list_first_goto(events))) 454 EINA_LIST_FREE(events, sysev)
455 { 455 {
456 ecore_list_remove(events);
457
458 if (sysev->fd_handler) 456 if (sysev->fd_handler)
459 ecore_main_fd_handler_del(sysev->fd_handler); 457 ecore_main_fd_handler_del(sysev->fd_handler);
460 if (sysev->fd >= 0) close(sysev->fd); 458 if (sysev->fd >= 0) close(sysev->fd);
461 free(sysev->name); 459 free(sysev->name);
462 free(sysev); 460 free(sysev);
463 } 461 }
464 ecore_list_destroy(events);
465 events = NULL;
466 } 462 }
467 linux_sys_class_power_supply_init(); 463 linux_sys_class_power_supply_init();
468 re_init_timer = NULL; 464 re_init_timer = NULL;
@@ -496,8 +492,7 @@ linux_sys_class_power_supply_cb_event_fd_active(void *data, Ecore_Fd_Handler *fd
496 } 492 }
497 if (lost) 493 if (lost)
498 { 494 {
499 ecore_list_goto(events, sysev); 495 events = eina_list_remove(events, sysev);
500 ecore_list_remove(events);
501 496
502 if (sysev->fd_handler) 497 if (sysev->fd_handler)
503 ecore_main_fd_handler_del(sysev->fd_handler); 498 ecore_main_fd_handler_del(sysev->fd_handler);
@@ -631,32 +626,38 @@ linux_sys_class_power_supply_is_battery(char *name)
631static void 626static void
632linux_sys_class_power_supply_init(void) 627linux_sys_class_power_supply_init(void)
633{ 628{
629 Eina_List *l;
630
634 if (events) 631 if (events)
635 { 632 {
636 Sys_Class_Power_Supply_Uevent *sysev; 633 Sys_Class_Power_Supply_Uevent *sysev;
637 634
638 ecore_list_first_goto(events); 635 EINA_LIST_FOREACH(events, l, sysev)
639 while ((sysev = ecore_list_next(events)))
640 linux_sys_class_power_supply_sysev_init(sysev); 636 linux_sys_class_power_supply_sysev_init(sysev);
641 } 637 }
642 else 638 else
643 { 639 {
644 Ecore_List *bats; 640 Eina_List *bats;
645 char *name; 641 char *name;
646 char buf[4096]; 642 char buf[4096];
647 643
648 bats = ecore_file_ls("/sys/class/power_supply/"); 644 bats = ecore_file_ls("/sys/class/power_supply/");
649 if (bats) 645 if (bats)
650 { 646 {
651 events = ecore_list_new(); 647 events = NULL;
652 while ((name = ecore_list_next(bats))) 648
649 EINA_LIST_FREE(bats, name)
653 { 650 {
654 Sys_Class_Power_Supply_Uevent *sysev; 651 Sys_Class_Power_Supply_Uevent *sysev;
655 652
656 if (!(linux_sys_class_power_supply_is_battery(name))) 653 if (!(linux_sys_class_power_supply_is_battery(name)))
654 {
655 free(name);
657 continue; 656 continue;
657 }
658
658 sysev = E_NEW(Sys_Class_Power_Supply_Uevent, 1); 659 sysev = E_NEW(Sys_Class_Power_Supply_Uevent, 1);
659 sysev->name = strdup(name); 660 sysev->name = name;
660 snprintf(buf, sizeof(buf), "/sys/class/power_supply/%s/uevent", name); 661 snprintf(buf, sizeof(buf), "/sys/class/power_supply/%s/uevent", name);
661 sysev->fd = open(buf, O_RDONLY); 662 sysev->fd = open(buf, O_RDONLY);
662 if (sysev->fd >= 0) 663 if (sysev->fd >= 0)
@@ -665,10 +666,9 @@ linux_sys_class_power_supply_init(void)
665 linux_sys_class_power_supply_cb_event_fd_active, 666 linux_sys_class_power_supply_cb_event_fd_active,
666 sysev, 667 sysev,
667 NULL, NULL); 668 NULL, NULL);
668 ecore_list_append(events, sysev); 669 events = eina_list_append(events, sysev);
669 linux_sys_class_power_supply_sysev_init(sysev); 670 linux_sys_class_power_supply_sysev_init(sysev);
670 } 671 }
671 ecore_list_destroy(bats);
672 } 672 }
673 } 673 }
674} 674}
@@ -676,6 +676,7 @@ linux_sys_class_power_supply_init(void)
676static void 676static void
677linux_sys_class_power_supply_check(void) 677linux_sys_class_power_supply_check(void)
678{ 678{
679 Eina_List *l;
679 char *name; 680 char *name;
680 char buf[4096]; 681 char buf[4096];
681 682
@@ -694,8 +695,7 @@ linux_sys_class_power_supply_check(void)
694 total_pwr_now = 0; 695 total_pwr_now = 0;
695 total_pwr_max = 0; 696 total_pwr_max = 0;
696 time_left = 0; 697 time_left = 0;
697 ecore_list_first_goto(events); 698 EINA_LIST_FOREACH(events, l, sysev)
698 while ((sysev = ecore_list_next(events)))
699 { 699 {
700 char *tmp; 700 char *tmp;
701 int present = 0; 701 int present = 0;
@@ -944,8 +944,8 @@ linux_acpi_cb_event_fd_active(void *data, Ecore_Fd_Handler *fd_handler)
944static void 944static void
945linux_acpi_init(void) 945linux_acpi_init(void)
946{ 946{
947 Ecore_List *powers; 947 Eina_List *powers;
948 Ecore_List *bats; 948 Eina_List *bats;
949 949
950 bats = ecore_file_ls("/proc/acpi/battery"); 950 bats = ecore_file_ls("/proc/acpi/battery");
951 if (bats) 951 if (bats)
@@ -957,7 +957,8 @@ linux_acpi_init(void)
957 if (powers) 957 if (powers)
958 { 958 {
959 char *name; 959 char *name;
960 while ((name = ecore_list_next(powers))) 960
961 EINA_LIST_FREE(powers, name)
961 { 962 {
962 char buf[4096]; 963 char buf[4096];
963 FILE *f; 964 FILE *f;
@@ -977,14 +978,15 @@ linux_acpi_init(void)
977 free(tmp); 978 free(tmp);
978 } 979 }
979 } 980 }
981
982 free(name);
980 } 983 }
981 ecore_list_destroy(powers);
982 } 984 }
983 985
984 have_battery = 0; 986 have_battery = 0;
985 acpi_max_full = 0; 987 acpi_max_full = 0;
986 acpi_max_design = 0; 988 acpi_max_design = 0;
987 while ((name = ecore_list_next(bats))) 989 EINA_LIST_FREE(bats, name)
988 { 990 {
989 char buf[4096]; 991 char buf[4096];
990 FILE *f; 992 FILE *f;
@@ -1021,8 +1023,9 @@ linux_acpi_init(void)
1021 } 1023 }
1022 fclose(f); 1024 fclose(f);
1023 } 1025 }
1026
1027 free(name);
1024 } 1028 }
1025 ecore_list_destroy(bats);
1026 } 1029 }
1027 if (!acpid) 1030 if (!acpid)
1028 { 1031 {
@@ -1056,7 +1059,7 @@ linux_acpi_init(void)
1056static void 1059static void
1057linux_acpi_check(void) 1060linux_acpi_check(void)
1058{ 1061{
1059 Ecore_List *bats; 1062 Eina_List *bats;
1060 1063
1061 battery_full = -1; 1064 battery_full = -1;
1062 time_left = -1; 1065 time_left = -1;
@@ -1070,7 +1073,7 @@ linux_acpi_check(void)
1070 int rate = 0; 1073 int rate = 0;
1071 int capacity = 0; 1074 int capacity = 0;
1072 1075
1073 while ((name = ecore_list_next(bats))) 1076 EINA_LIST_FREE(bats, name)
1074 { 1077 {
1075 char buf[4096]; 1078 char buf[4096];
1076 FILE *f; 1079 FILE *f;
@@ -1120,8 +1123,9 @@ linux_acpi_check(void)
1120 } 1123 }
1121 fclose(f); 1124 fclose(f);
1122 } 1125 }
1126
1127 free(name);
1123 } 1128 }
1124 ecore_list_destroy(bats);
1125 if (acpi_max_full > 0) 1129 if (acpi_max_full > 0)
1126 battery_full = 100 * (long long)capacity / acpi_max_full; 1130 battery_full = 100 * (long long)capacity / acpi_max_full;
1127 else if (acpi_max_design > 0) 1131 else if (acpi_max_design > 0)
@@ -1267,7 +1271,7 @@ linux_pmu_check(void)
1267{ 1271{
1268 FILE *f; 1272 FILE *f;
1269 char buf[4096]; 1273 char buf[4096];
1270 Ecore_List *bats; 1274 Eina_List *bats;
1271 char *name; 1275 char *name;
1272 int ac = 0; 1276 int ac = 0;
1273 int flags = 0; 1277 int flags = 0;
@@ -1295,7 +1299,7 @@ linux_pmu_check(void)
1295 { 1299 {
1296 have_battery = 1; 1300 have_battery = 1;
1297 have_power = ac; 1301 have_power = ac;
1298 while ((name = ecore_list_next(bats))) 1302 EINA_LIST_FREE(bats, name)
1299 { 1303 {
1300 if (strncmp(name, "battery", 7)) continue; 1304 if (strncmp(name, "battery", 7)) continue;
1301 snprintf(buf, sizeof(buf), "/proc/pmu/%s", name); 1305 snprintf(buf, sizeof(buf), "/proc/pmu/%s", name);
@@ -1345,8 +1349,9 @@ linux_pmu_check(void)
1345 seconds = MAX(timeleft, seconds); 1349 seconds = MAX(timeleft, seconds);
1346 } 1350 }
1347 } 1351 }
1352
1353 free(name);
1348 } 1354 }
1349 ecore_list_destroy(bats);
1350 if (max_charge > 0) battery_full = ((long long)charge * 100) / max_charge; 1355 if (max_charge > 0) battery_full = ((long long)charge * 100) / max_charge;
1351 else battery_full = 0; 1356 else battery_full = 0;
1352 time_left = seconds; 1357 time_left = seconds;
@@ -1381,17 +1386,16 @@ linux_pmu_check(void)
1381static int 1386static int
1382dir_has_contents(const char *dir) 1387dir_has_contents(const char *dir)
1383{ 1388{
1384 Ecore_List *bats; 1389 Eina_List *bats;
1390 char *file;
1391 int count;
1385 1392
1386 bats = ecore_file_ls(dir); 1393 bats = ecore_file_ls(dir);
1387 if (bats)
1388 {
1389 int count;
1390 1394
1391 count = ecore_list_count(bats); 1395 count = eina_list_count(bats);
1392 ecore_list_destroy(bats); 1396 EINA_LIST_FREE(bats, file)
1397 free(file);
1393 if (count > 0) return 1; 1398 if (count > 0) return 1;
1394 }
1395 return 0; 1399 return 0;
1396} 1400}
1397 1401
diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c
index 46e2dfcb3..b23f318b5 100644
--- a/src/modules/battery/e_mod_main.c
+++ b/src/modules/battery/e_mod_main.c
@@ -354,6 +354,8 @@ static void
354_battery_hal_shutdown(void) 354_battery_hal_shutdown(void)
355{ 355{
356 E_DBus_Connection *conn; 356 E_DBus_Connection *conn;
357 Hal_Ac_Adapter *hac;
358 Hal_Battery *hbat;
357 359
358 conn = e_dbus_bus_get(DBUS_BUS_SYSTEM); 360 conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
359 if (!conn) return; 361 if (!conn) return;
@@ -372,25 +374,17 @@ _battery_hal_shutdown(void)
372 e_dbus_signal_handler_del(conn, battery_config->hal.dev_del); 374 e_dbus_signal_handler_del(conn, battery_config->hal.dev_del);
373 battery_config->hal.dev_del = NULL; 375 battery_config->hal.dev_del = NULL;
374 } 376 }
375 while (hal_ac_adapters) 377 EINA_LIST_FREE(hal_ac_adapters, hac)
376 { 378 {
377 Hal_Ac_Adapter *hac;
378
379 hac = hal_ac_adapters->data;
380 e_dbus_signal_handler_del(conn, hac->prop_change); 379 e_dbus_signal_handler_del(conn, hac->prop_change);
381 eina_stringshare_del(hac->udi); 380 eina_stringshare_del(hac->udi);
382 free(hac); 381 free(hac);
383 hal_ac_adapters = eina_list_remove_list(hal_ac_adapters, hal_ac_adapters);
384 } 382 }
385 while (hal_batteries) 383 EINA_LIST_FREE(hal_batteries, hbat)
386 { 384 {
387 Hal_Battery *hbat;
388
389 hbat = hal_batteries->data;
390 e_dbus_signal_handler_del(conn, hbat->prop_change); 385 e_dbus_signal_handler_del(conn, hbat->prop_change);
391 eina_stringshare_del(hbat->udi); 386 eina_stringshare_del(hbat->udi);
392 free(hbat); 387 free(hbat);
393 hal_batteries = eina_list_remove_list(hal_batteries, hal_batteries);
394 } 388 }
395} 389}
396 390
@@ -593,26 +587,27 @@ _battery_hal_ac_adapter_del(const char *udi)
593static void 587static void
594_battery_hal_find_battery(void *user_data, void *reply_data, DBusError *error) 588_battery_hal_find_battery(void *user_data, void *reply_data, DBusError *error)
595{ 589{
590 Eina_List *l;
596 char *device; 591 char *device;
592
597 E_Hal_Manager_Find_Device_By_Capability_Return *ret; 593 E_Hal_Manager_Find_Device_By_Capability_Return *ret;
598 594
599 ret = reply_data; 595 ret = reply_data;
600 if (ecore_list_count(ret->strings) < 1) return; 596 if (eina_list_count(ret->strings) < 1) return;
601 ecore_list_first_goto(ret->strings); 597 EINA_LIST_FOREACH(ret->strings, l, device)
602 while ((device = ecore_list_next(ret->strings)))
603 _battery_hal_battery_add(device); 598 _battery_hal_battery_add(device);
604} 599}
605 600
606static void 601static void
607_battery_hal_find_ac(void *user_data, void *reply_data, DBusError *err) 602_battery_hal_find_ac(void *user_data, void *reply_data, DBusError *err)
608{ 603{
604 Eina_List *l;
609 char *device; 605 char *device;
610 E_Hal_Manager_Find_Device_By_Capability_Return *ret; 606 E_Hal_Manager_Find_Device_By_Capability_Return *ret;
611 607
612 ret = reply_data; 608 ret = reply_data;
613 if (ecore_list_count(ret->strings) < 1) return; 609 if (eina_list_count(ret->strings) < 1) return;
614 ecore_list_first_goto(ret->strings); 610 EINA_LIST_FOREACH(ret->strings, l, device)
615 while ((device = ecore_list_next(ret->strings)))
616 _battery_hal_ac_adapter_add(device); 611 _battery_hal_ac_adapter_add(device);
617} 612}
618 613
@@ -885,13 +880,11 @@ static void
885_battery_update(int full, int time_left, int have_battery, int have_power) 880_battery_update(int full, int time_left, int have_battery, int have_power)
886{ 881{
887 Eina_List *l; 882 Eina_List *l;
883 Instance *inst;
888 static double debounce_time = 0.0; 884 static double debounce_time = 0.0;
889 885
890 for (l = battery_config->instances; l; l = l->next) 886 EINA_LIST_FOREACH(battery_config->instances, l, inst)
891 { 887 {
892 Instance *inst;
893
894 inst = l->data;
895 if (have_power != battery_config->have_power) 888 if (have_power != battery_config->have_power)
896 { 889 {
897 if (have_power) 890 if (have_power)
diff --git a/src/modules/conf/e_mod_main.c b/src/modules/conf/e_mod_main.c
index eee1bfaae..86c869bb2 100644
--- a/src/modules/conf/e_mod_main.c
+++ b/src/modules/conf/e_mod_main.c
@@ -110,11 +110,8 @@ _gc_id_new(E_Gadcon_Client_Class *client_class)
110static void 110static void
111_cb_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info) 111_cb_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info)
112{ 112{
113 Evas_Event_Mouse_Up *ev;
114 E_Action *a; 113 E_Action *a;
115 114
116 ev = event_info;
117 if (ev->button != 1) return;
118 a = e_action_find("configuration"); 115 a = e_action_find("configuration");
119 if ((a) && (a->func.go)) a->func.go(NULL, NULL); 116 if ((a) && (a->func.go)) a->func.go(NULL, NULL);
120} 117}
diff --git a/src/modules/conf_applications/e_int_config_apps.c b/src/modules/conf_applications/e_int_config_apps.c
index f82460ccb..f982ad3a4 100644
--- a/src/modules/conf_applications/e_int_config_apps.c
+++ b/src/modules/conf_applications/e_int_config_apps.c
@@ -14,7 +14,7 @@ struct _E_Config_Dialog_Data
14 Evas_Object *o_all, *o_sel; 14 Evas_Object *o_all, *o_sel;
15 Evas_Object *o_add, *o_del; 15 Evas_Object *o_add, *o_del;
16 Evas_Object *o_up, *o_down; 16 Evas_Object *o_up, *o_down;
17 Ecore_List *apps; 17 Eina_List *apps;
18}; 18};
19 19
20/* local protos */ 20/* local protos */
@@ -23,8 +23,8 @@ static void *_create_data(E_Config_Dialog *cfd);
23static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); 23static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
24static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); 24static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
25static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); 25static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
26static Ecore_List *_load_menu(const char *path); 26static Eina_List *_load_menu(const char *path);
27static Ecore_List *_load_order(const char *path); 27static Eina_List *_load_order(const char *path);
28static void _fill_apps(E_Config_Dialog_Data *cfdata); 28static void _fill_apps(E_Config_Dialog_Data *cfdata);
29static void _fill_list(E_Config_Dialog_Data *cfdata); 29static void _fill_list(E_Config_Dialog_Data *cfdata);
30static int _cb_sort_desks(Efreet_Desktop *d1, Efreet_Desktop *d2); 30static int _cb_sort_desks(Efreet_Desktop *d1, Efreet_Desktop *d2);
@@ -215,6 +215,7 @@ static void
215_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) 215_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
216{ 216{
217 E_Config_Data *data; 217 E_Config_Data *data;
218 Efreet_Desktop *desktop;
218 219
219 data = cfdata->data; 220 data = cfdata->data;
220 if (data) 221 if (data)
@@ -225,7 +226,8 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
225 if (data->filename) eina_stringshare_del(data->filename); 226 if (data->filename) eina_stringshare_del(data->filename);
226 E_FREE(data); 227 E_FREE(data);
227 } 228 }
228 if (cfdata->apps) ecore_list_destroy(cfdata->apps); 229 EINA_LIST_FREE(cfdata->apps, desktop)
230 efreet_desktop_free(desktop);
229 E_FREE(cfdata); 231 E_FREE(cfdata);
230} 232}
231 233
@@ -295,44 +297,43 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
295 return ret; 297 return ret;
296} 298}
297 299
298static Ecore_List * 300static Eina_List *
299_load_menu(const char *path) 301_load_menu(const char *path)
300{ 302{
301 Efreet_Menu *menu, *entry; 303 Efreet_Menu *menu, *entry;
302 Ecore_List *apps = NULL; 304 Eina_List *apps = NULL;
305 Eina_List *l;
303 306
304 apps = ecore_list_new(); 307 apps = NULL;
305 ecore_list_free_cb_set(apps, ECORE_FREE_CB(efreet_desktop_free));
306 menu = efreet_menu_parse(path); 308 menu = efreet_menu_parse(path);
307 if ((!menu) || (!menu->entries)) return apps; 309 if ((!menu) || (!menu->entries)) return apps;
308 ecore_list_first_goto(menu->entries); 310 EINA_LIST_FOREACH(menu->entries, l, entry)
309 while ((entry = ecore_list_next(menu->entries)))
310 { 311 {
311 if (entry->type != EFREET_MENU_ENTRY_DESKTOP) continue; 312 if (entry->type != EFREET_MENU_ENTRY_DESKTOP) continue;
312 efreet_desktop_ref(entry->desktop); 313 efreet_desktop_ref(entry->desktop);
313 ecore_list_append(apps, entry->desktop); 314 apps = eina_list_append(apps, entry->desktop);
314 } 315 }
315 efreet_menu_free(menu); 316 efreet_menu_free(menu);
316 return apps; 317 return apps;
317} 318}
318 319
319static Ecore_List * 320static Eina_List *
320_load_order(const char *path) 321_load_order(const char *path)
321{ 322{
322 E_Order *order = NULL; 323 E_Order *order = NULL;
323 Eina_List *l = NULL; 324 Eina_List *l = NULL;
324 Ecore_List *apps = NULL; 325 Eina_List *apps = NULL;
325 326
326 apps = ecore_list_new(); 327 apps = NULL;
327 ecore_list_free_cb_set(apps, ECORE_FREE_CB(efreet_desktop_free));
328 if (!path) return apps; 328 if (!path) return apps;
329 order = e_order_new(path); 329 order = e_order_new(path);
330 if (!order) return apps; 330 if (!order) return apps;
331 for (l = order->desktops; l; l = l->next) 331 for (l = order->desktops; l; l = l->next)
332 { 332 {
333 efreet_desktop_ref(l->data); 333 efreet_desktop_ref(l->data);
334 ecore_list_append(apps, l->data); 334 apps = eina_list_append(apps, l->data);
335 } 335 }
336 /* FIXME: The test below will never be true ! */
336 if (l) eina_list_free(l); 337 if (l) eina_list_free(l);
337 e_object_del(E_OBJECT(order)); 338 e_object_del(E_OBJECT(order));
338 return apps; 339 return apps;
@@ -341,48 +342,42 @@ _load_order(const char *path)
341static void 342static void
342_fill_apps(E_Config_Dialog_Data *cfdata) 343_fill_apps(E_Config_Dialog_Data *cfdata)
343{ 344{
344 Ecore_List *desks = NULL, *l = NULL; 345 Eina_List *desks = NULL, *l = NULL;
345 Efreet_Desktop *desk = NULL; 346 Efreet_Desktop *desk = NULL;
346 Evas *evas; 347 Evas *evas;
347 int w; 348 int w;
348 349
349 l = ecore_list_new(); 350 l = NULL;
350 ecore_list_free_cb_set(l, ECORE_FREE_CB(efreet_desktop_free));
351 351
352 evas = evas_object_evas_get(cfdata->o_all); 352 evas = evas_object_evas_get(cfdata->o_all);
353 desks = efreet_util_desktop_name_glob_list("*"); 353 desks = efreet_util_desktop_name_glob_list("*");
354 if (desks) 354
355 { 355 desks = eina_list_sort(desks, 0, _cb_sort_desks);
356 ecore_list_sort(desks, ECORE_COMPARE_CB(_cb_sort_desks), ECORE_SORT_MIN); 356 EINA_LIST_FREE(desks, desk)
357 ecore_list_first_goto(desks);
358 while ((desk = ecore_list_next(desks)))
359 { 357 {
360 if (!ecore_list_find(l, ECORE_COMPARE_CB(_cb_sort_desks), desk)) 358 if (!eina_list_search_unsorted(l, _cb_sort_desks, desk))
361 { 359 {
362 efreet_desktop_ref(desk); 360 efreet_desktop_ref(desk);
363 ecore_list_append(l, desk); 361 l = eina_list_append(l, desk);
364 }
365 } 362 }
366 ecore_list_destroy(desks); 363 efreet_desktop_free(desk);
367 } 364 }
368 if (l) ecore_list_sort(l, ECORE_COMPARE_CB(_cb_sort_desks), ECORE_SORT_MIN); 365
366 l = eina_list_sort(l, 0, _cb_sort_desks);
369 367
370 evas_event_freeze(evas); 368 evas_event_freeze(evas);
371 edje_freeze(); 369 edje_freeze();
372 e_widget_ilist_freeze(cfdata->o_all); 370 e_widget_ilist_freeze(cfdata->o_all);
373 e_widget_ilist_clear(cfdata->o_all); 371 e_widget_ilist_clear(cfdata->o_all);
374 if (l) 372
375 { 373 EINA_LIST_FREE(l, desk)
376 ecore_list_first_goto(l);
377 while ((desk = ecore_list_next(l)))
378 { 374 {
379 Evas_Object *icon = NULL; 375 Evas_Object *icon = NULL;
380 376
381 icon = e_util_desktop_icon_add(desk, 24, evas); 377 icon = e_util_desktop_icon_add(desk, 24, evas);
382 e_widget_ilist_append(cfdata->o_all, icon, desk->name, 378 e_widget_ilist_append(cfdata->o_all, icon, desk->name,
383 _all_list_cb_selected, cfdata, desk->orig_path); 379 _all_list_cb_selected, cfdata, desk->orig_path);
384 } 380 efreet_desktop_free(desk);
385 ecore_list_destroy(l);
386 } 381 }
387 382
388 e_widget_ilist_go(cfdata->o_all); 383 e_widget_ilist_go(cfdata->o_all);
@@ -406,10 +401,8 @@ _fill_list(E_Config_Dialog_Data *cfdata)
406 edje_freeze(); 401 edje_freeze();
407 e_widget_ilist_freeze(cfdata->o_sel); 402 e_widget_ilist_freeze(cfdata->o_sel);
408 e_widget_ilist_clear(cfdata->o_sel); 403 e_widget_ilist_clear(cfdata->o_sel);
409 if (cfdata->apps) 404
410 { 405 EINA_LIST_FREE(cfdata->apps, desk)
411 ecore_list_first_goto(cfdata->apps);
412 while ((desk = ecore_list_next(cfdata->apps)))
413 { 406 {
414 Evas_Object *icon = NULL; 407 Evas_Object *icon = NULL;
415 408
@@ -417,8 +410,6 @@ _fill_list(E_Config_Dialog_Data *cfdata)
417 e_widget_ilist_append(cfdata->o_sel, icon, desk->name, 410 e_widget_ilist_append(cfdata->o_sel, icon, desk->name,
418 _sel_list_cb_selected, cfdata, desk->orig_path); 411 _sel_list_cb_selected, cfdata, desk->orig_path);
419 } 412 }
420 ecore_list_destroy(cfdata->apps);
421 }
422 413
423 cfdata->apps = NULL; 414 cfdata->apps = NULL;
424 e_widget_ilist_go(cfdata->o_sel); 415 e_widget_ilist_go(cfdata->o_sel);
diff --git a/src/modules/conf_display/e_int_config_display.c b/src/modules/conf_display/e_int_config_display.c
index 7ce83c780..4c44568fb 100644
--- a/src/modules/conf_display/e_int_config_display.c
+++ b/src/modules/conf_display/e_int_config_display.c
@@ -308,13 +308,13 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
308 Ecore_X_Screen_Refresh_Rate *rt; 308 Ecore_X_Screen_Refresh_Rate *rt;
309 309
310 r = e_widget_ilist_selected_get(cfdata->res_list); 310 r = e_widget_ilist_selected_get(cfdata->res_list);
311 if (r < 0) return; 311 if (r < 0) return 0;
312 res = evas_list_nth(cfdata->resolutions, r); 312 res = evas_list_nth(cfdata->resolutions, r);
313 if (!res) return; 313 if (!res) return 0;
314 r = e_widget_ilist_selected_get(cfdata->rate_list); 314 r = e_widget_ilist_selected_get(cfdata->rate_list);
315 if (r < 0) return; 315 if (r < 0) return 0;
316 rt = evas_list_nth(res->rates, r); 316 rt = evas_list_nth(res->rates, r);
317 if (!rt) return; 317 if (!rt) return 0;
318 318
319 return (e_config->display_res_restore != cfdata->restore) || 319 return (e_config->display_res_restore != cfdata->restore) ||
320 (res->size.width != cfdata->orig_size.width) || 320 (res->size.width != cfdata->orig_size.width) ||
diff --git a/src/modules/conf_fonts/e_int_config_fonts.c b/src/modules/conf_fonts/e_int_config_fonts.c
index 3fc1a5a21..f145fefd3 100644
--- a/src/modules/conf_fonts/e_int_config_fonts.c
+++ b/src/modules/conf_fonts/e_int_config_fonts.c
@@ -420,7 +420,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
420} 420}
421 421
422static Evas_Bool 422static Evas_Bool
423_font_hash_cb(const Evas_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) 423_font_hash_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata)
424{ 424{
425 E_Config_Dialog_Data *cfdata; 425 E_Config_Dialog_Data *cfdata;
426 E_Font_Properties *efp; 426 E_Font_Properties *efp;
@@ -1034,7 +1034,7 @@ _font_list_load(E_Config_Dialog_Data *cfdata, const char *cur_font)
1034 1034
1035 fonts = evas_font_available_list(evas); 1035 fonts = evas_font_available_list(evas);
1036 cfdata->font_hash = e_font_available_list_parse(fonts); 1036 cfdata->font_hash = e_font_available_list_parse(fonts);
1037 evas_hash_foreach(cfdata->font_hash, _font_hash_cb, cfdata); 1037 eina_hash_foreach(cfdata->font_hash, _font_hash_cb, cfdata);
1038 if (cfdata->font_list) 1038 if (cfdata->font_list)
1039 { 1039 {
1040 cfdata->font_list = 1040 cfdata->font_list =
diff --git a/src/modules/conf_icon_theme/e_int_config_icon_themes.c b/src/modules/conf_icon_theme/e_int_config_icon_themes.c
index f6dc9a278..1d39c45f1 100644
--- a/src/modules/conf_icon_theme/e_int_config_icon_themes.c
+++ b/src/modules/conf_icon_theme/e_int_config_icon_themes.c
@@ -62,20 +62,20 @@ e_int_config_icon_themes(E_Container *con, const char *params __UNUSED__)
62static void 62static void
63_fill_data(E_Config_Dialog_Data *cfdata) 63_fill_data(E_Config_Dialog_Data *cfdata)
64{ 64{
65 Ecore_List *icon_themes; 65 Eina_List *icon_themes;
66 Eina_List *l;
66 67
67 icon_themes = efreet_icon_theme_list_get(); 68 icon_themes = efreet_icon_theme_list_get();
68 if (icon_themes) 69 if (icon_themes)
69 { 70 {
70 Efreet_Icon_Theme *theme; 71 Efreet_Icon_Theme *theme;
71 72
72 ecore_list_first_goto(icon_themes); 73 EINA_LIST_FOREACH(icon_themes, l, theme)
73 while ((theme = ecore_list_next(icon_themes)))
74 cfdata->icon_themes = eina_list_append(cfdata->icon_themes, theme); 74 cfdata->icon_themes = eina_list_append(cfdata->icon_themes, theme);
75 cfdata->icon_themes = eina_list_sort(cfdata->icon_themes, 75 cfdata->icon_themes = eina_list_sort(cfdata->icon_themes,
76 eina_list_count(cfdata->icon_themes), 76 eina_list_count(cfdata->icon_themes),
77 _sort_icon_themes); 77 _sort_icon_themes);
78 ecore_list_destroy(icon_themes); 78 icon_themes = eina_list_free(icon_themes);
79 } 79 }
80 cfdata->themename = strdup(e_config->icon_theme); 80 cfdata->themename = strdup(e_config->icon_theme);
81 81
@@ -338,9 +338,13 @@ _ilist_cb_change(void *data, Evas_Object *obj)
338{ 338{
339 E_Config_Dialog_Data *cfdata; 339 E_Config_Dialog_Data *cfdata;
340 Efreet_Icon_Theme *theme; 340 Efreet_Icon_Theme *theme;
341 Eina_List *l;
341 char *dir = NULL; 342 char *dir = NULL;
342 char *text; 343 char *text;
343 size_t length = 0, size = 4096; 344 size_t length = 0, size = 4096;
345 const char *inherit;
346 char *path;
347 int first = 1;
344 348
345 cfdata = data; 349 cfdata = data;
346 if (!cfdata->gui.comment) return; 350 if (!cfdata->gui.comment) return;
@@ -360,28 +364,10 @@ _ilist_cb_change(void *data, Evas_Object *obj)
360 strcat(text, theme->comment); 364 strcat(text, theme->comment);
361 strcat(text, "\n"); 365 strcat(text, "\n");
362 } 366 }
363 if (theme->paths.count == 1)
364 {
365 length += strlen(theme->paths.path) + 8;
366 while (length >= size)
367 {
368 size += 4096;
369 text = realloc(text, size);
370 }
371 dir = theme->paths.path;
372 strcat(text, "path = ");
373 strcat(text, dir);
374 strcat(text, "\n");
375 }
376 else if (theme->paths.count > 1)
377 {
378 char *path;
379 int first = 1;
380 367
381 ecore_list_first_goto(theme->paths.path); 368 EINA_LIST_FOREACH(theme->paths, l, path)
382 while ((path = ecore_list_next(theme->paths.path)))
383 { 369 {
384 length += strlen(theme->paths.path) + 16; 370 length += strlen(path) + 16;
385 while (length >= size) 371 while (length >= size)
386 { 372 {
387 size += 4096; 373 size += 4096;
@@ -400,17 +386,12 @@ _ilist_cb_change(void *data, Evas_Object *obj)
400 strcat(text, path); 386 strcat(text, path);
401 } 387 }
402 } 388 }
403 strcat(text, "\n"); 389 if (theme->paths) strcat(text, "\n");
404 }
405 if (theme->inherits)
406 {
407 const char *inherit;
408 int first = 1;
409 390
410 ecore_list_first_goto(theme->inherits); 391 first = 1;
411 while ((inherit = ecore_list_next(theme->inherits))) 392 EINA_LIST_FOREACH(theme->inherits, l, inherit)
412 { 393 {
413 length += strlen(theme->paths.path) + 32; 394 length += strlen(inherit) + 32;
414 while (length >= size) 395 while (length >= size)
415 { 396 {
416 size += 4096; 397 size += 4096;
@@ -428,8 +409,8 @@ _ilist_cb_change(void *data, Evas_Object *obj)
428 strcat(text, inherit); 409 strcat(text, inherit);
429 } 410 }
430 } 411 }
431 strcat(text, "\n"); 412 if (theme->inherits) strcat(text, "\n");
432 } 413
433 e_widget_textblock_plain_set(cfdata->gui.comment, text); 414 e_widget_textblock_plain_set(cfdata->gui.comment, text);
434 free(text); 415 free(text);
435 if (dir) 416 if (dir)
diff --git a/src/modules/conf_mousebindings/e_int_config_mousebindings.c b/src/modules/conf_mousebindings/e_int_config_mousebindings.c
index 006c8ecbc..204b361f1 100644
--- a/src/modules/conf_mousebindings/e_int_config_mousebindings.c
+++ b/src/modules/conf_mousebindings/e_int_config_mousebindings.c
@@ -1029,7 +1029,7 @@ _auto_apply_changes(E_Config_Dialog_Data *cfdata)
1029 1029
1030 E_Action_Group *actg; 1030 E_Action_Group *actg;
1031 E_Action_Description *actd; 1031 E_Action_Description *actd;
1032 const char **action, **params; 1032 const char **action = NULL, **params = NULL;
1033 1033
1034 if ((!cfdata->locals.cur) || (!cfdata->locals.cur[0])) return; 1034 if ((!cfdata->locals.cur) || (!cfdata->locals.cur[0])) return;
1035 1035
@@ -1345,7 +1345,7 @@ _grab_mouse_down_cb(void *data, int type, void *event)
1345{ 1345{
1346 Eina_List *l; 1346 Eina_List *l;
1347 E_Config_Dialog_Data *cfdata; 1347 E_Config_Dialog_Data *cfdata;
1348 E_Config_Binding_Mouse *eb; 1348 E_Config_Binding_Mouse *eb = NULL;
1349 E_Config_Binding_Wheel *bw; 1349 E_Config_Binding_Wheel *bw;
1350 int mod = E_BINDING_MODIFIER_NONE, n; 1350 int mod = E_BINDING_MODIFIER_NONE, n;
1351 1351
diff --git a/src/modules/conf_window_remembers/e_int_config_remembers.c b/src/modules/conf_window_remembers/e_int_config_remembers.c
index 937520adb..a82af2b69 100644
--- a/src/modules/conf_window_remembers/e_int_config_remembers.c
+++ b/src/modules/conf_window_remembers/e_int_config_remembers.c
@@ -39,7 +39,8 @@ _cb_sort(const void *data1, const void *data2)
39{ 39{
40 const E_Remember *rem1 = NULL; 40 const E_Remember *rem1 = NULL;
41 const E_Remember *rem2 = NULL; 41 const E_Remember *rem2 = NULL;
42 const char *d1, *d2; 42 const char *d1 = NULL;
43 const char *d2 = NULL;
43 44
44 if (!(rem1 = data1)) return 1; 45 if (!(rem1 = data1)) return 1;
45 if (!(rem2 = data2)) return -1; 46 if (!(rem2 = data2)) return -1;
diff --git a/src/modules/exebuf/e_exebuf.c b/src/modules/exebuf/e_exebuf.c
index bea8a37b7..ddcde1ad3 100644
--- a/src/modules/exebuf/e_exebuf.c
+++ b/src/modules/exebuf/e_exebuf.c
@@ -45,7 +45,6 @@ static void _e_exebuf_next(void);
45static void _e_exebuf_prev(void); 45static void _e_exebuf_prev(void);
46static void _e_exebuf_complete(void); 46static void _e_exebuf_complete(void);
47static void _e_exebuf_backspace(void); 47static void _e_exebuf_backspace(void);
48static void _e_exebuf_delete(void);
49static void _e_exebuf_clear(void); 48static void _e_exebuf_clear(void);
50static void _e_exebuf_matches_update(void); 49static void _e_exebuf_matches_update(void);
51static void _e_exebuf_hist_update(void); 50static void _e_exebuf_hist_update(void);
@@ -248,15 +247,13 @@ e_exebuf_show(E_Zone *zone)
248 el = e_config_domain_load("exebuf_exelist_cache", exelist_edd); 247 el = e_config_domain_load("exebuf_exelist_cache", exelist_edd);
249 if (el) 248 if (el)
250 { 249 {
251 while (el->list)
252 {
253 E_Exe *ee; 250 E_Exe *ee;
254 251
255 ee = el->list->data; 252 EINA_LIST_FREE(el->list, ee)
253 {
256 exe_list = eina_list_append(exe_list, strdup(ee->path)); 254 exe_list = eina_list_append(exe_list, strdup(ee->path));
257 eina_stringshare_del(ee->path); 255 eina_stringshare_del(ee->path);
258 free(ee); 256 free(ee);
259 el->list = eina_list_remove_list(el->list, el->list);
260 } 257 }
261 free(el); 258 free(el);
262 } 259 }
@@ -287,6 +284,9 @@ e_exebuf_show(E_Zone *zone)
287EAPI void 284EAPI void
288e_exebuf_hide(void) 285e_exebuf_hide(void)
289{ 286{
287 Ecore_Event *ev;
288 char *str;
289
290 if (!exebuf) return; 290 if (!exebuf) return;
291 291
292 evas_event_freeze(exebuf->evas); 292 evas_event_freeze(exebuf->evas);
@@ -317,11 +317,10 @@ e_exebuf_hide(void)
317 evas_event_thaw(exebuf->evas); 317 evas_event_thaw(exebuf->evas);
318 e_object_del(E_OBJECT(exebuf)); 318 e_object_del(E_OBJECT(exebuf));
319 exebuf = NULL; 319 exebuf = NULL;
320 while (handlers) 320
321 { 321 EINA_LIST_FREE(handlers, ev)
322 ecore_event_handler_del(handlers->data); 322 ecore_event_handler_del(ev);
323 handlers = eina_list_remove_list(handlers, handlers); 323
324 }
325 ecore_x_window_del(input_window); 324 ecore_x_window_del(input_window);
326 e_grabinput_release(input_window, input_window); 325 e_grabinput_release(input_window, input_window);
327 input_window = 0; 326 input_window = 0;
@@ -332,26 +331,18 @@ e_exebuf_hide(void)
332 closedir(exe_dir); 331 closedir(exe_dir);
333 exe_dir = NULL; 332 exe_dir = NULL;
334 } 333 }
335 while (exe_path) 334 EINA_LIST_FREE(exe_path, str)
336 { 335 free(str);
337 free(exe_path->data); 336
338 exe_path = eina_list_remove_list(exe_path, exe_path);
339 }
340 if (exe_list_idler) 337 if (exe_list_idler)
341 { 338 {
342 ecore_idler_del(exe_list_idler); 339 ecore_idler_del(exe_list_idler);
343 exe_list_idler = NULL; 340 exe_list_idler = NULL;
344 } 341 }
345 while (exe_list) 342 EINA_LIST_FREE(exe_list, str)
346 { 343 free(str);
347 free(exe_list->data); 344 EINA_LIST_FREE(exe_list2, str)
348 exe_list = eina_list_remove_list(exe_list, exe_list); 345 free(str);
349 }
350 while (exe_list2)
351 {
352 free(exe_list2->data);
353 exe_list2 = eina_list_remove_list(exe_list2, exe_list2);
354 }
355 which_list = NO_LIST; 346 which_list = NO_LIST;
356 exe_sel = NULL; 347 exe_sel = NULL;
357} 348}
@@ -372,30 +363,22 @@ _e_exebuf_exe_free(E_Exebuf_Exe *exe)
372static void 363static void
373_e_exebuf_matches_clear(void) 364_e_exebuf_matches_clear(void)
374{ 365{
375 while (eap_matches) 366 Efreet_Desktop *desktop;
376 { 367 E_Exebuf_Exe *exe;
377 e_object_unref(E_OBJECT(eap_matches->data)); 368 char *file;
378 eap_matches = eina_list_remove_list(eap_matches, eap_matches); 369
379 } 370 EINA_LIST_FREE(eap_matches, desktop)
380 while (exe_matches) 371 e_object_unref(E_OBJECT(desktop));
381 { 372 EINA_LIST_FREE(exe_matches, file)
382 free(exe_matches->data); 373 free(file);
383 exe_matches = eina_list_remove_list(exe_matches, exe_matches);
384 }
385 374
386 evas_event_freeze(exebuf->evas); 375 evas_event_freeze(exebuf->evas);
387 e_box_freeze(eap_list_object); 376 e_box_freeze(eap_list_object);
388 e_box_freeze(exe_list_object); 377 e_box_freeze(exe_list_object);
389 while (exes) 378 EINA_LIST_FREE(exes, exe)
390 { 379 _e_exebuf_exe_free(exe);
391 _e_exebuf_exe_free((E_Exebuf_Exe *)(exes->data)); 380 EINA_LIST_FREE(eaps, exe)
392 exes = eina_list_remove_list(exes, exes); 381 _e_exebuf_exe_free(exe);
393 }
394 while (eaps)
395 {
396 _e_exebuf_exe_free((E_Exebuf_Exe *)(eaps->data));
397 eaps = eina_list_remove_list(eaps, eaps);
398 }
399 e_box_thaw(exe_list_object); 382 e_box_thaw(exe_list_object);
400 e_box_thaw(eap_list_object); 383 e_box_thaw(eap_list_object);
401 evas_event_thaw(exebuf->evas); 384 evas_event_thaw(exebuf->evas);
@@ -984,9 +967,11 @@ static void
984_e_exebuf_matches_update(void) 967_e_exebuf_matches_update(void)
985{ 968{
986 char *path, *file, buf[4096]; 969 char *path, *file, buf[4096];
970 Efreet_Desktop *desktop;
987 Eina_Hash *added = NULL; 971 Eina_Hash *added = NULL;
988 Ecore_List *list; 972 Eina_List *list;
989 Eina_List *l; 973 Eina_List *l;
974 char *exe;
990 int i, max; 975 int i, max;
991 976
992 _e_exebuf_matches_clear(); 977 _e_exebuf_matches_clear();
@@ -994,15 +979,8 @@ _e_exebuf_matches_update(void)
994 979
995 snprintf(buf, sizeof(buf), "*%s*", cmd_buf); 980 snprintf(buf, sizeof(buf), "*%s*", cmd_buf);
996 list = efreet_util_desktop_name_glob_list(buf); 981 list = efreet_util_desktop_name_glob_list(buf);
997 if (list) 982 EINA_LIST_FREE(list, desktop)
998 {
999 Efreet_Desktop *desktop;
1000
1001 ecore_list_first_goto(list);
1002 while ((desktop = ecore_list_next(list)))
1003 { 983 {
1004 char *exe;
1005
1006 exe = ecore_file_app_exe_get(desktop->exec); 984 exe = ecore_file_app_exe_get(desktop->exec);
1007 if (exe) 985 if (exe)
1008 { 986 {
@@ -1016,20 +994,11 @@ _e_exebuf_matches_update(void)
1016 free(exe); 994 free(exe);
1017 } 995 }
1018 } 996 }
1019 ecore_list_destroy(list);
1020 }
1021 997
1022 snprintf(buf, sizeof(buf), "%s*", cmd_buf); 998 snprintf(buf, sizeof(buf), "%s*", cmd_buf);
1023 list = efreet_util_desktop_exec_glob_list(buf); 999 list = efreet_util_desktop_exec_glob_list(buf);
1024 if (list) 1000 EINA_LIST_FREE(list, desktop)
1025 {
1026 Efreet_Desktop *desktop;
1027
1028 ecore_list_first_goto(list);
1029 while ((desktop = ecore_list_next(list)))
1030 { 1001 {
1031 char *exe;
1032
1033 exe = ecore_file_app_exe_get(desktop->exec); 1002 exe = ecore_file_app_exe_get(desktop->exec);
1034 if (exe) 1003 if (exe)
1035 { 1004 {
@@ -1043,20 +1012,11 @@ _e_exebuf_matches_update(void)
1043 free(exe); 1012 free(exe);
1044 } 1013 }
1045 } 1014 }
1046 ecore_list_destroy(list);
1047 }
1048 1015
1049 snprintf(buf, sizeof(buf), "*%s*", cmd_buf); 1016 snprintf(buf, sizeof(buf), "*%s*", cmd_buf);
1050 list = efreet_util_desktop_generic_name_glob_list(buf); 1017 list = efreet_util_desktop_generic_name_glob_list(buf);
1051 if (list) 1018 EINA_LIST_FREE(list, desktop)
1052 { 1019 {
1053 Efreet_Desktop *desktop;
1054
1055 ecore_list_first_goto(list);
1056 while ((desktop = ecore_list_next(list)))
1057 {
1058 char *exe;
1059
1060 exe = ecore_file_app_exe_get(desktop->exec); 1020 exe = ecore_file_app_exe_get(desktop->exec);
1061 if (exe) 1021 if (exe)
1062 { 1022 {
@@ -1070,20 +1030,11 @@ _e_exebuf_matches_update(void)
1070 free(exe); 1030 free(exe);
1071 } 1031 }
1072 } 1032 }
1073 ecore_list_destroy(list);
1074 }
1075 1033
1076 snprintf(buf, sizeof(buf), "*%s*", cmd_buf); 1034 snprintf(buf, sizeof(buf), "*%s*", cmd_buf);
1077 list = efreet_util_desktop_comment_glob_list(buf); 1035 list = efreet_util_desktop_comment_glob_list(buf);
1078 if (list) 1036 EINA_LIST_FREE(list, desktop)
1079 { 1037 {
1080 Efreet_Desktop *desktop;
1081
1082 ecore_list_first_goto(list);
1083 while ((desktop = ecore_list_next(list)))
1084 {
1085 char *exe;
1086
1087 exe = ecore_file_app_exe_get(desktop->exec); 1038 exe = ecore_file_app_exe_get(desktop->exec);
1088 if (exe) 1039 if (exe)
1089 { 1040 {
@@ -1097,20 +1048,13 @@ _e_exebuf_matches_update(void)
1097 free(exe); 1048 free(exe);
1098 } 1049 }
1099 } 1050 }
1100 ecore_list_destroy(list);
1101 }
1102 1051
1103 if (added) eina_hash_free(added); 1052 if (added) eina_hash_free(added);
1104 added = NULL; 1053 added = NULL;
1105 1054
1106 snprintf(buf, sizeof(buf), "%s*", cmd_buf); 1055 snprintf(buf, sizeof(buf), "%s*", cmd_buf);
1107 if (exe_list) 1056 EINA_LIST_FOREACH(exe_list, l, path)
1108 { 1057 {
1109 Eina_List *l;
1110
1111 for (l = exe_list; l; l = l->next)
1112 {
1113 path = l->data;
1114 file = (char *)ecore_file_file_get(path); 1058 file = (char *)ecore_file_file_get(path);
1115 if (file) 1059 if (file)
1116 { 1060 {
@@ -1126,7 +1070,6 @@ _e_exebuf_matches_update(void)
1126 } 1070 }
1127 } 1071 }
1128 } 1072 }
1129 }
1130 if (added) eina_hash_free(added); 1073 if (added) eina_hash_free(added);
1131 added = NULL; 1074 added = NULL;
1132 1075
@@ -1239,18 +1182,19 @@ _e_exebuf_matches_update(void)
1239static void 1182static void
1240_e_exebuf_hist_update(void) 1183_e_exebuf_hist_update(void)
1241{ 1184{
1242 Eina_List *list = NULL, *l = NULL; 1185 Eina_List *list;
1186 char *file;
1243 1187
1244 edje_object_signal_emit(bg_object, "e,action,show,history", "e"); 1188 edje_object_signal_emit(bg_object, "e,action,show,history", "e");
1245 list = eina_list_reverse(e_exehist_list_get()); 1189 list = eina_list_reverse(e_exehist_list_get());
1246 for (l = list; l; l = l->next) 1190 EINA_LIST_FREE(list, file)
1247 { 1191 {
1248 E_Exebuf_Exe *exe; 1192 E_Exebuf_Exe *exe;
1249 Evas_Coord mw, mh; 1193 Evas_Coord mw, mh;
1250 Evas_Object *o; 1194 Evas_Object *o;
1251 1195
1252 exe = calloc(1, sizeof(E_Exebuf_Exe)); 1196 exe = calloc(1, sizeof(E_Exebuf_Exe));
1253 exe->file = l->data; 1197 exe->file = file;
1254 eaps = eina_list_prepend(eaps, exe); 1198 eaps = eina_list_prepend(eaps, exe);
1255 o = edje_object_add(exebuf->evas); 1199 o = edje_object_add(exebuf->evas);
1256 exe->bg_object = o; 1200 exe->bg_object = o;
@@ -1286,21 +1230,19 @@ _e_exebuf_hist_update(void)
1286 9999, mh /* max */ 1230 9999, mh /* max */
1287 ); 1231 );
1288 } 1232 }
1289 eina_list_free(list);
1290} 1233}
1291 1234
1292static void 1235static void
1293_e_exebuf_hist_clear(void) 1236_e_exebuf_hist_clear(void)
1294{ 1237{
1238 E_Exebuf_Exe *exe;
1239
1295 edje_object_signal_emit(bg_object, "e,action,hide,history", "e"); 1240 edje_object_signal_emit(bg_object, "e,action,hide,history", "e");
1296 evas_event_freeze(exebuf->evas); 1241 evas_event_freeze(exebuf->evas);
1297 e_box_freeze(eap_list_object); 1242 e_box_freeze(eap_list_object);
1298 e_box_freeze(exe_list_object); 1243 e_box_freeze(exe_list_object);
1299 while (eaps) 1244 EINA_LIST_FREE(eaps, exe)
1300 { 1245 _e_exebuf_exe_free(exe);
1301 _e_exebuf_exe_free((E_Exebuf_Exe *)(eaps->data));
1302 eaps = eina_list_remove_list(eaps, eaps);
1303 }
1304 e_box_thaw(exe_list_object); 1246 e_box_thaw(exe_list_object);
1305 e_box_thaw(eap_list_object); 1247 e_box_thaw(eap_list_object);
1306 evas_event_thaw(exebuf->evas); 1248 evas_event_thaw(exebuf->evas);
@@ -1309,7 +1251,6 @@ _e_exebuf_hist_clear(void)
1309 e_box_align_set(exe_list_object, 0.5, 1.0); 1251 e_box_align_set(exe_list_object, 0.5, 1.0);
1310 exe_sel = NULL; 1252 exe_sel = NULL;
1311 which_list = NO_LIST; 1253 which_list = NO_LIST;
1312
1313} 1254}
1314 1255
1315static void 1256static void
@@ -1397,7 +1338,7 @@ _e_exebuf_cb_key_down(void *data, int type, void *event)
1397 else if (!strcmp(ev->keysymbol, "BackSpace")) 1338 else if (!strcmp(ev->keysymbol, "BackSpace"))
1398 _e_exebuf_backspace(); 1339 _e_exebuf_backspace();
1399 else if (!strcmp(ev->keysymbol, "Delete")) 1340 else if (!strcmp(ev->keysymbol, "Delete"))
1400 _e_exebuf_delete(); 1341 _e_exebuf_backspace();
1401 else 1342 else
1402 { 1343 {
1403 if (ev->key_compose) 1344 if (ev->key_compose)
@@ -1598,7 +1539,7 @@ _e_exebuf_idler(void *data)
1598 { 1539 {
1599 while (exe_list) 1540 while (exe_list)
1600 { 1541 {
1601 free(exe_list->data); 1542 free(eina_list_data_get(exe_list));
1602 exe_list = eina_list_remove_list(exe_list, exe_list); 1543 exe_list = eina_list_remove_list(exe_list, exe_list);
1603 } 1544 }
1604 exe_list = exe_list2; 1545 exe_list = exe_list2;
@@ -1622,7 +1563,7 @@ _e_exebuf_idler(void *data)
1622 e_config_domain_save("exebuf_exelist_cache", exelist_edd, el); 1563 e_config_domain_save("exebuf_exelist_cache", exelist_edd, el);
1623 while (el->list) 1564 while (el->list)
1624 { 1565 {
1625 ee = el->list->data; 1566 ee = eina_list_data_get(el->list);
1626 eina_stringshare_del(ee->path); 1567 eina_stringshare_del(ee->path);
1627 free(ee); 1568 free(ee);
1628 el->list = eina_list_remove_list(el->list, el->list); 1569 el->list = eina_list_remove_list(el->list, el->list);
@@ -1669,14 +1610,14 @@ _e_exebuf_idler(void *data)
1669 */ 1610 */
1670 closedir(exe_dir); 1611 closedir(exe_dir);
1671 exe_dir = NULL; 1612 exe_dir = NULL;
1672 free(exe_path->data); 1613 free(eina_list_data_get(exe_path));
1673 exe_path = eina_list_remove_list(exe_path, exe_path); 1614 exe_path = eina_list_remove_list(exe_path, exe_path);
1674 } 1615 }
1675 } 1616 }
1676 /* obviously the dir open failed - so remove the first path item */ 1617 /* obviously the dir open failed - so remove the first path item */
1677 else 1618 else
1678 { 1619 {
1679 free(exe_path->data); 1620 free(eina_list_data_get(exe_path));
1680 exe_path = eina_list_remove_list(exe_path, exe_path); 1621 exe_path = eina_list_remove_list(exe_path, exe_path);
1681 } 1622 }
1682 /* we have mroe scannign to do */ 1623 /* we have mroe scannign to do */
diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c
index 7847655e8..730d5f325 100644
--- a/src/modules/fileman/e_fwin.c
+++ b/src/modules/fileman/e_fwin.c
@@ -125,15 +125,10 @@ e_fwin_init(void)
125EAPI int 125EAPI int
126e_fwin_shutdown(void) 126e_fwin_shutdown(void)
127{ 127{
128 Eina_List *l; 128 E_Fwin *fwin;
129 129
130 l = fwins; 130 EINA_LIST_FREE(fwins, fwin)
131 fwins = NULL; 131 e_object_del(E_OBJECT(fwin));
132 while (l)
133 {
134 e_object_del(E_OBJECT(l->data));
135 l = eina_list_remove_list(l, l);
136 }
137 132
138 eina_stringshare_shutdown(); 133 eina_stringshare_shutdown();
139 134
@@ -248,12 +243,10 @@ EAPI void
248e_fwin_zone_shutdown(E_Zone *zone) 243e_fwin_zone_shutdown(E_Zone *zone)
249{ 244{
250 Eina_List *f; 245 Eina_List *f;
251
252 for (f = fwins; f; f = f->next)
253 {
254 E_Fwin *win; 246 E_Fwin *win;
255 247
256 win = f->data; 248 EINA_LIST_FOREACH(fwins, f, win)
249 {
257 if (win->zone != zone) continue; 250 if (win->zone != zone) continue;
258 e_object_del(E_OBJECT(win)); 251 e_object_del(E_OBJECT(win));
259 win = NULL; 252 win = NULL;
@@ -264,15 +257,14 @@ EAPI void
264e_fwin_reload_all(void) 257e_fwin_reload_all(void)
265{ 258{
266 Eina_List *l, *ll, *lll; 259 Eina_List *l, *ll, *lll;
267 E_Manager *man;
268 E_Container *con; 260 E_Container *con;
261 E_Manager *man;
262 E_Fwin *fwin;
263 E_Zone *zone;
269 264
270 /* Reload/recreate zones cause of property changes */ 265 /* Reload/recreate zones cause of property changes */
271 for (l = fwins; l; l = l->next) 266 EINA_LIST_FOREACH(fwins, l, fwin)
272 { 267 {
273 E_Fwin *fwin;
274
275 fwin = l->data;
276 if (!fwin) continue; //safety 268 if (!fwin) continue; //safety
277 if (fwin->zone) 269 if (fwin->zone)
278 e_fwin_zone_shutdown(fwin->zone); 270 e_fwin_zone_shutdown(fwin->zone);
@@ -285,17 +277,10 @@ e_fwin_reload_all(void)
285 } 277 }
286 278
287 /* Hook into zones */ 279 /* Hook into zones */
288 for (l = e_manager_list(); l; l = l->next) 280 EINA_LIST_FOREACH(e_manager_list(), l, man)
281 EINA_LIST_FOREACH(man->containers, ll, con)
282 EINA_LIST_FOREACH(con->zones, lll, zone)
289 { 283 {
290 man = l->data;
291 for (ll = man->containers; ll; ll = ll->next)
292 {
293 con = ll->data;
294 for (lll = con->zones; lll; lll = lll->next)
295 {
296 E_Zone *zone;
297
298 zone = lll->data;
299 if (e_fwin_zone_find(zone)) continue; 284 if (e_fwin_zone_find(zone)) continue;
300 if ((zone->container->num == 0) && (zone->num == 0) && 285 if ((zone->container->num == 0) && (zone->num == 0) &&
301 (fileman_config->view.show_desktop_icons)) 286 (fileman_config->view.show_desktop_icons))
@@ -312,22 +297,16 @@ e_fwin_reload_all(void)
312 } 297 }
313 } 298 }
314 } 299 }
315 }
316 }
317} 300}
318 301
319EAPI int 302EAPI int
320e_fwin_zone_find(E_Zone *zone) 303e_fwin_zone_find(E_Zone *zone)
321{ 304{
322 Eina_List *f; 305 Eina_List *f;
323
324 for (f = fwins; f; f = f->next)
325 {
326 E_Fwin *win; 306 E_Fwin *win;
327 307
328 win = f->data; 308 EINA_LIST_FOREACH(fwins, f, win)
329 if (win->zone == zone) return 1; 309 if (win->zone == zone) return 1;
330 }
331 return 0; 310 return 0;
332} 311}
333 312
@@ -820,7 +799,8 @@ _e_fwin_cb_open(void *data, E_Dialog *dia)
820 char pcwd[4096], buf[4096]; 799 char pcwd[4096], buf[4096];
821 Eina_List *selected, *l; 800 Eina_List *selected, *l;
822 E_Fm2_Icon_Info *ici; 801 E_Fm2_Icon_Info *ici;
823 Ecore_List *files = NULL; 802 Eina_List *files = NULL;
803 char *file;
824 804
825 fad = data; 805 fad = data;
826 if (fad->app1) 806 if (fad->app1)
@@ -838,8 +818,7 @@ _e_fwin_cb_open(void *data, E_Dialog *dia)
838 selected = e_fm2_selected_list_get(fad->fwin->fm_obj); 818 selected = e_fm2_selected_list_get(fad->fwin->fm_obj);
839 if (selected) 819 if (selected)
840 { 820 {
841 files = ecore_list_new(); 821 files = NULL;
842 ecore_list_free_cb_set(files, free);
843 for (l = selected; l; l = l->next) 822 for (l = selected; l; l = l->next)
844 { 823 {
845 E_Fwin_Exec_Type ext; 824 E_Fwin_Exec_Type ext;
@@ -873,7 +852,7 @@ _e_fwin_cb_open(void *data, E_Dialog *dia)
873 { 852 {
874 if (ici->mime && desktop) 853 if (ici->mime && desktop)
875 e_exehist_mime_desktop_add(ici->mime, desktop); 854 e_exehist_mime_desktop_add(ici->mime, desktop);
876 ecore_list_append(files, strdup(ici->file)); 855 files = eina_list_append(files, strdup(ici->file));
877 } 856 }
878 } 857 }
879 eina_list_free(selected); 858 eina_list_free(selected);
@@ -901,7 +880,8 @@ _e_fwin_cb_open(void *data, E_Dialog *dia)
901 if (!strcmp(fad->exec_cmd, "")) 880 if (!strcmp(fad->exec_cmd, ""))
902 efreet_desktop_free(desktop); 881 efreet_desktop_free(desktop);
903 882
904 ecore_list_destroy(files); 883 EINA_LIST_FREE(files, file)
884 free(file);
905 } 885 }
906 chdir(pcwd); 886 chdir(pcwd);
907 } 887 }
@@ -1073,14 +1053,16 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1073 Evas_Coord mw, mh; 1053 Evas_Coord mw, mh;
1074 Evas_Object *o, *of, *oi, *ot; 1054 Evas_Object *o, *of, *oi, *ot;
1075 Evas *evas; 1055 Evas *evas;
1076 Eina_List *l = NULL, *apps = NULL, *mlist = NULL; 1056 Eina_List *l = NULL, *ll, *apps = NULL, *mlist = NULL;
1077 Ecore_List *cats = NULL; 1057 Eina_List *ml;
1058 Eina_List *cats = NULL;
1078 Eina_Hash *mimes = NULL; 1059 Eina_Hash *mimes = NULL;
1079 Efreet_Desktop *desk = NULL; 1060 Efreet_Desktop *desk = NULL;
1080 E_Fwin_Apps_Dialog *fad; 1061 E_Fwin_Apps_Dialog *fad;
1081 E_Fm2_Icon_Info *ici; 1062 E_Fm2_Icon_Info *ici;
1082 char buf[PATH_MAX]; 1063 char buf[PATH_MAX];
1083 const char *f; 1064 const char *f;
1065 char *mime;
1084 int need_dia = 0; 1066 int need_dia = 0;
1085 1067
1086 if (fwin->fad) 1068 if (fwin->fad)
@@ -1090,9 +1072,8 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1090 } 1072 }
1091 if (!always) 1073 if (!always)
1092 { 1074 {
1093 for (l = files; l; l = l->next) 1075 EINA_LIST_FOREACH(files, l, ici)
1094 { 1076 {
1095 ici = l->data;
1096 if ((ici->link) && (ici->mount)) 1077 if ((ici->link) && (ici->mount))
1097 { 1078 {
1098 if (!fileman_config->view.open_dirs_in_place || fwin->zone) 1079 if (!fileman_config->view.open_dirs_in_place || fwin->zone)
@@ -1288,9 +1269,7 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1288 } 1269 }
1289 1270
1290 /* 1. build hash of mimetypes */ 1271 /* 1. build hash of mimetypes */
1291 for (l = files; l; l = l->next) 1272 EINA_LIST_FOREACH(files, l, ici)
1292 {
1293 ici = l->data;
1294 if (!((ici->link) && (ici->mount))) 1273 if (!((ici->link) && (ici->mount)))
1295 { 1274 {
1296 if (_e_fwin_file_is_exec(ici) == E_FWIN_EXEC_NONE) 1275 if (_e_fwin_file_is_exec(ici) == E_FWIN_EXEC_NONE)
@@ -1314,7 +1293,6 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1314 } 1293 }
1315 } 1294 }
1316 } 1295 }
1317 }
1318 /* 2. for each mimetype list apps that handle it */ 1296 /* 2. for each mimetype list apps that handle it */
1319 if (mimes) 1297 if (mimes)
1320 { 1298 {
@@ -1323,21 +1301,10 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1323 } 1301 }
1324 /* 3. add apps to a list so its a unique app list */ 1302 /* 3. add apps to a list so its a unique app list */
1325 apps = NULL; 1303 apps = NULL;
1326 if (mlist) 1304 EINA_LIST_FOREACH(mlist, l, mime)
1327 {
1328 Ecore_List *ml;
1329
1330 for (l = mlist; l; l = l->next)
1331 { 1305 {
1332 ml = efreet_util_desktop_mime_list(l->data); 1306 ml = efreet_util_desktop_mime_list(mime);
1333 if (ml) 1307 apps = eina_list_merge(apps, ml);
1334 {
1335 ecore_list_first_goto(ml);
1336 while ((desk = ecore_list_next(ml)))
1337 apps = eina_list_append(apps, desk);
1338 ecore_list_destroy(ml);
1339 }
1340 }
1341 } 1308 }
1342 1309
1343 if (!always) 1310 if (!always)
@@ -1358,27 +1325,23 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1358 */ 1325 */
1359 if (eina_list_count(mlist) <= 1) 1326 if (eina_list_count(mlist) <= 1)
1360 { 1327 {
1328 char *file;
1361 char pcwd[4096]; 1329 char pcwd[4096];
1362 Ecore_List *files_list = NULL; 1330 Eina_List *files_list = NULL;
1363 1331
1364 need_dia = 1; 1332 need_dia = 1;
1365 if (mlist) desk = e_exehist_mime_desktop_get(mlist->data); 1333 if (mlist) desk = e_exehist_mime_desktop_get(mlist->data);
1366 getcwd(pcwd, sizeof(pcwd)); 1334 getcwd(pcwd, sizeof(pcwd));
1367 chdir(e_fm2_real_path_get(fwin->fm_obj)); 1335 chdir(e_fm2_real_path_get(fwin->fm_obj));
1368 1336
1369 files_list = ecore_list_new(); 1337 files_list = NULL;
1370 ecore_list_free_cb_set(files_list, free); 1338 EINA_LIST_FOREACH(files, l, ici)
1371 for (l = files; l; l = l->next)
1372 {
1373 ici = l->data;
1374 if (_e_fwin_file_is_exec(ici) == E_FWIN_EXEC_NONE) 1339 if (_e_fwin_file_is_exec(ici) == E_FWIN_EXEC_NONE)
1375 ecore_list_append(files_list, strdup(ici->file)); 1340 files_list = eina_list_append(files_list, strdup(ici->file));
1376 } 1341 EINA_LIST_FOREACH(files, l, ici)
1377 for (l = files; l; l = l->next)
1378 { 1342 {
1379 E_Fwin_Exec_Type ext; 1343 E_Fwin_Exec_Type ext;
1380 1344
1381 ici = l->data;
1382 ext = _e_fwin_file_is_exec(ici); 1345 ext = _e_fwin_file_is_exec(ici);
1383 if (ext != E_FWIN_EXEC_NONE) 1346 if (ext != E_FWIN_EXEC_NONE)
1384 { 1347 {
@@ -1399,18 +1362,19 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1399 need_dia = 0; 1362 need_dia = 0;
1400 } 1363 }
1401 } 1364 }
1402 ecore_list_destroy(files_list); 1365 EINA_LIST_FREE(files_list, file)
1366 free(file);
1403 1367
1404 chdir(pcwd); 1368 chdir(pcwd);
1405 if (!need_dia) 1369 if (!need_dia)
1406 { 1370 {
1407 if (apps) eina_list_free(apps); 1371 apps = eina_list_free(apps);
1408 eina_list_free(mlist); 1372 mlist = eina_list_free(mlist);
1409 return; 1373 return;
1410 } 1374 }
1411 } 1375 }
1412 } 1376 }
1413 if (mlist) eina_list_free(mlist); 1377 mlist = eina_list_free(mlist);
1414 1378
1415 fad = E_NEW(E_Fwin_Apps_Dialog, 1); 1379 fad = E_NEW(E_Fwin_Apps_Dialog, 1);
1416 if (fwin->win) 1380 if (fwin->win)
@@ -1462,7 +1426,7 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1462 e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1); 1426 e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
1463 } 1427 }
1464 1428
1465 if (l) eina_list_free(l); 1429 l = eina_list_free(l);
1466 1430
1467 of = e_widget_framelist_add(evas, _("All Applications"), 0); 1431 of = e_widget_framelist_add(evas, _("All Applications"), 0);
1468 o = e_widget_ilist_add(evas, 24, 24, &(fad->app2)); 1432 o = e_widget_ilist_add(evas, 24, 24, &(fad->app2));
@@ -1472,29 +1436,22 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Eina_List *files, int always)
1472 edje_freeze(); 1436 edje_freeze();
1473 e_widget_ilist_freeze(o); 1437 e_widget_ilist_freeze(o);
1474 cats = efreet_util_desktop_name_glob_list("*"); 1438 cats = efreet_util_desktop_name_glob_list("*");
1475 ecore_list_sort(cats, ECORE_COMPARE_CB(_e_fwin_dlg_cb_desk_sort), ECORE_SORT_MIN); 1439 cats = eina_list_sort(cats, 0, _e_fwin_dlg_cb_desk_sort);
1476 ecore_list_first_goto(cats); 1440 EINA_LIST_FREE(cats, desk)
1477 while ((desk = ecore_list_next(cats)))
1478 {
1479 if (!eina_list_data_find(l, desk)) 1441 if (!eina_list_data_find(l, desk))
1480 l = eina_list_append(l, desk); 1442 l = eina_list_append(l, desk);
1481 } 1443 l = eina_list_sort(l, -1, _e_fwin_dlg_cb_desk_list_sort);
1482 if (cats) ecore_list_destroy(cats);
1483 if (l) l = eina_list_sort(l, -1, _e_fwin_dlg_cb_desk_list_sort);
1484 1444
1485 /* reuse mlist var here */ 1445 /* reuse mlist var here */
1486 for (mlist = l; mlist; mlist = mlist->next) 1446 EINA_LIST_FREE(mlist, desk)
1487 { 1447 {
1488 Evas_Object *icon = NULL; 1448 Evas_Object *icon = NULL;
1489 1449
1490 desk = mlist->data;
1491 if (!desk) continue; 1450 if (!desk) continue;
1492 icon = e_util_desktop_icon_add(desk, 24, evas); 1451 icon = e_util_desktop_icon_add(desk, 24, evas);
1493 e_widget_ilist_append(o, icon, desk->name, NULL, NULL, 1452 e_widget_ilist_append(o, icon, desk->name, NULL, NULL,
1494 efreet_util_path_to_file_id(desk->orig_path)); 1453 efreet_util_path_to_file_id(desk->orig_path));
1495 } 1454 }
1496 if (mlist) eina_list_free(mlist);
1497 if (l) eina_list_free(l);
1498 1455
1499 e_widget_ilist_go(o); 1456 e_widget_ilist_go(o);
1500 e_widget_ilist_thaw(o); 1457 e_widget_ilist_thaw(o);
diff --git a/src/modules/gadman/e_mod_gadman.c b/src/modules/gadman/e_mod_gadman.c
index 498b6f536..f45598d10 100644
--- a/src/modules/gadman/e_mod_gadman.c
+++ b/src/modules/gadman/e_mod_gadman.c
@@ -45,8 +45,6 @@ Manager *Man = NULL;
45void 45void
46gadman_init(E_Module *m) 46gadman_init(E_Module *m)
47{ 47{
48 Eina_List *l;