* 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
devs/princeamd/enlightenment-0.17-elive
Cedric BAIL 14 years ago
parent e0cfef818f
commit db419867dd
  1. 199
      src/bin/e_config.c
  2. 137
      src/bin/e_configure.c
  3. 10
      src/bin/e_eap_editor.c
  4. 13
      src/bin/e_exec.c
  5. 2
      src/bin/e_exec.h
  6. 36
      src/bin/e_fm.c
  7. 102
      src/bin/e_fm_main.c
  8. 2
      src/bin/e_fm_mime.c
  9. 5
      src/bin/e_gadcon.c
  10. 3
      src/bin/e_init_main.c
  11. 5
      src/bin/e_int_border_menu.c
  12. 18
      src/bin/e_int_config_modules.c
  13. 42
      src/bin/e_int_menus.c
  14. 88
      src/bin/e_intl.c
  15. 6
      src/bin/e_main.c
  16. 2
      src/bin/e_menu.c
  17. 25
      src/bin/e_module.c
  18. 13
      src/bin/e_prefix.c
  19. 4
      src/bin/e_utils.c
  20. 78
      src/modules/battery/batget.c
  21. 33
      src/modules/battery/e_mod_main.c
  22. 3
      src/modules/conf/e_mod_main.c
  23. 73
      src/modules/conf_applications/e_int_config_apps.c
  24. 8
      src/modules/conf_display/e_int_config_display.c
  25. 4
      src/modules/conf_fonts/e_int_config_fonts.c
  26. 51
      src/modules/conf_icon_theme/e_int_config_icon_themes.c
  27. 4
      src/modules/conf_mousebindings/e_int_config_mousebindings.c
  28. 3
      src/modules/conf_window_remembers/e_int_config_remembers.c
  29. 157
      src/modules/exebuf/e_exebuf.c
  30. 131
      src/modules/fileman/e_fwin.c
  31. 2
      src/modules/gadman/e_mod_gadman.c
  32. 16
      src/modules/ibar/e_mod_config.c
  33. 115
      src/modules/illume/e_cfg.c
  34. 26
      src/modules/illume/e_flaunch.c
  35. 138
      src/modules/illume/e_kbd.c
  36. 221
      src/modules/illume/e_kbd_int.c
  37. 16
      src/modules/illume/e_mod_gad_bluetooth.c
  38. 16
      src/modules/illume/e_mod_gad_usb.c
  39. 140
      src/modules/illume/e_mod_win.c
  40. 45
      src/modules/temperature/e_mod_config.c
  41. 29
      src/modules/temperature/e_mod_main.c
  42. 2
      src/modules/temperature/e_mod_main.h
  43. 74
      src/modules/temperature/tempget.c
  44. 17
      src/modules/wizard/e_mod_main.c
  45. 11
      src/modules/wizard/page_030.c
  46. 13
      src/modules/wizard/page_070.c
  47. 24
      src/modules/wizard/page_080.c
  48. 4
      src/preload/e_precache.c

@ -1074,7 +1074,7 @@ static int _cb_sort_files(char *f1, char *f2)
EAPI Eina_List *
e_config_profile_list(void)
{
Ecore_List *files;
Eina_List *files;
char buf[PATH_MAX];
const char *homedir;
const char *dir;
@ -1087,16 +1087,15 @@ e_config_profile_list(void)
{
char *file;
ecore_list_sort(files, ECORE_COMPARE_CB(_cb_sort_files), ECORE_SORT_MIN);
ecore_list_first_goto(files);
while ((file = ecore_list_current(files)))
files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
EINA_LIST_FREE(files, file)
{
snprintf(buf, sizeof(buf), "%s/.e/e/config/%s", homedir, file);
if (ecore_file_is_dir(buf))
flist = eina_list_append(flist, strdup(file));
ecore_list_next(files);
flist = eina_list_append(flist, file);
else
free(file);
}
ecore_list_destroy(files);
}
dir = e_prefix_data_get();
snprintf(buf, sizeof(buf), "%s/data/config", dir);
@ -1105,24 +1104,24 @@ e_config_profile_list(void)
{
char *file;
ecore_list_sort(files, ECORE_COMPARE_CB(_cb_sort_files), ECORE_SORT_MIN);
ecore_list_first_goto(files);
while ((file = ecore_list_current(files)))
files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
EINA_LIST_FREE(files, file)
{
const char *tmp;
Eina_List *l;
snprintf(buf, sizeof(buf), "%s/data/config/%s", dir, file);
if (ecore_file_is_dir(buf))
{
Eina_List *l;
EINA_LIST_FOREACH(flist, l, tmp)
if (!strcmp(file, tmp)) break;
for (l = flist; l; l = l->next)
{
if (!strcmp(file, l->data)) break;
}
if (!l) flist = eina_list_append(flist, strdup(file));
if (!l) flist = eina_list_append(flist, file);
else free(file);
}
ecore_list_next(files);
else
free(file);
}
ecore_list_destroy(files);
}
return flist;
}
@ -1141,7 +1140,7 @@ e_config_profile_add(const char *prof)
EAPI void
e_config_profile_del(const char *prof)
{
Ecore_List *files;
Eina_List *files;
char buf[4096];
const char *homedir;
@ -1152,15 +1151,13 @@ e_config_profile_del(const char *prof)
{
char *file;
ecore_list_first_goto(files);
while ((file = ecore_list_current(files)))
EINA_LIST_FREE(files, file)
{
snprintf(buf, sizeof(buf), "%s/.e/e/config/%s/%s",
homedir, prof, file);
ecore_file_unlink(buf);
ecore_list_next(files);
free(file);
}
ecore_list_destroy(files);
}
snprintf(buf, sizeof(buf), "%s/.e/e/config/%s", homedir, prof);
ecore_file_rmdir(buf);
@ -1417,181 +1414,127 @@ _e_config_save_cb(void *data)
static void
_e_config_free(E_Config *ecf)
{
if (!ecf) return;
while (ecf->modules)
{
E_Config_Binding_Signal *ebs;
E_Config_Binding_Mouse *ebm;
E_Config_Binding_Wheel *ebw;
E_Config_Syscon_Action *sca;
E_Config_Binding_Key *ebk;
E_Font_Fallback *eff;
E_Config_Module *em;
E_Font_Default *efd;
E_Config_Theme *et;
E_Color_Class *cc;
E_Path_Dir *epd;
E_Remember *rem;
em = ecf->modules->data;
ecf->modules = eina_list_remove_list(ecf->modules, ecf->modules);
if (!ecf) return;
EINA_LIST_FREE(ecf->modules, em)
{
if (em->name) eina_stringshare_del(em->name);
E_FREE(em);
}
while (ecf->font_fallbacks)
EINA_LIST_FREE(ecf->font_fallbacks, eff)
{
E_Font_Fallback *eff;
eff = ecf->font_fallbacks->data;
ecf->font_fallbacks = eina_list_remove_list(ecf->font_fallbacks, ecf->font_fallbacks);
if (eff->name) eina_stringshare_del(eff->name);
E_FREE(eff);
}
while (ecf->font_defaults)
EINA_LIST_FREE(ecf->font_defaults, efd)
{
E_Font_Default *efd;
efd = ecf->font_defaults->data;
ecf->font_defaults = eina_list_remove_list(ecf->font_defaults, ecf->font_defaults);
if (efd->text_class) eina_stringshare_del(efd->text_class);
if (efd->font) eina_stringshare_del(efd->font);
E_FREE(efd);
}
while (ecf->themes)
EINA_LIST_FREE(ecf->themes, et)
{
E_Config_Theme *et;
et = ecf->themes->data;
ecf->themes = eina_list_remove_list(ecf->themes, ecf->themes);
if (et->category) eina_stringshare_del(et->category);
if (et->file) eina_stringshare_del(et->file);
E_FREE(et);
}
while (ecf->mouse_bindings)
EINA_LIST_FREE(ecf->mouse_bindings, ebm)
{
E_Config_Binding_Mouse *eb;
eb = ecf->mouse_bindings->data;
ecf->mouse_bindings = eina_list_remove_list(ecf->mouse_bindings, ecf->mouse_bindings);
if (eb->action) eina_stringshare_del(eb->action);
if (eb->params) eina_stringshare_del(eb->params);
E_FREE(eb);
if (ebm->action) eina_stringshare_del(ebm->action);
if (ebm->params) eina_stringshare_del(ebm->params);
E_FREE(ebm);
}
while (ecf->key_bindings)
EINA_LIST_FREE(ecf->key_bindings, ebk)
{
E_Config_Binding_Key *eb;
eb = ecf->key_bindings->data;
ecf->key_bindings = eina_list_remove_list(ecf->key_bindings, ecf->key_bindings);
if (eb->key) eina_stringshare_del(eb->key);
if (eb->action) eina_stringshare_del(eb->action);
if (eb->params) eina_stringshare_del(eb->params);
E_FREE(eb);
if (ebk->key) eina_stringshare_del(ebk->key);
if (ebk->action) eina_stringshare_del(ebk->action);
if (ebk->params) eina_stringshare_del(ebk->params);
E_FREE(ebk);
}
while (ecf->signal_bindings)
EINA_LIST_FREE(ecf->signal_bindings, ebs)
{
E_Config_Binding_Signal *eb;
eb = ecf->signal_bindings->data;
ecf->signal_bindings = eina_list_remove_list(ecf->signal_bindings, ecf->signal_bindings);
if (eb->signal) eina_stringshare_del(eb->signal);
if (eb->source) eina_stringshare_del(eb->source);
if (eb->action) eina_stringshare_del(eb->action);
if (eb->params) eina_stringshare_del(eb->params);
E_FREE(eb);
if (ebs->signal) eina_stringshare_del(ebs->signal);
if (ebs->source) eina_stringshare_del(ebs->source);
if (ebs->action) eina_stringshare_del(ebs->action);
if (ebs->params) eina_stringshare_del(ebs->params);
E_FREE(ebs);
}
while (ecf->wheel_bindings)
EINA_LIST_FREE(ecf->wheel_bindings, ebw)
{
E_Config_Binding_Wheel *eb;
eb = ecf->wheel_bindings->data;
ecf->wheel_bindings = eina_list_remove_list(ecf->wheel_bindings, ecf->wheel_bindings);
if (eb->action) eina_stringshare_del(eb->action);
if (eb->params) eina_stringshare_del(eb->params);
E_FREE(eb);
if (ebw->action) eina_stringshare_del(ebw->action);
if (ebw->params) eina_stringshare_del(ebw->params);
E_FREE(ebw);
}
while (ecf->path_append_data)
EINA_LIST_FREE(ecf->path_append_data, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_data->data;
ecf->path_append_data = eina_list_remove_list(ecf->path_append_data, ecf->path_append_data);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_images)
EINA_LIST_FREE(ecf->path_append_images, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_images->data;
ecf->path_append_images = eina_list_remove_list(ecf->path_append_images, ecf->path_append_images);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_fonts)
EINA_LIST_FREE(ecf->path_append_fonts, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_fonts->data;
ecf->path_append_fonts = eina_list_remove_list(ecf->path_append_fonts, ecf->path_append_fonts);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_themes)
EINA_LIST_FREE(ecf->path_append_themes, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_themes->data;
ecf->path_append_themes = eina_list_remove_list(ecf->path_append_themes, ecf->path_append_themes);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_init)
EINA_LIST_FREE(ecf->path_append_init, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_init->data;
ecf->path_append_init = eina_list_remove_list(ecf->path_append_init, ecf->path_append_init);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_icons)
EINA_LIST_FREE(ecf->path_append_icons, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_icons->data;
ecf->path_append_icons = eina_list_remove_list(ecf->path_append_icons, ecf->path_append_icons);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_modules)
EINA_LIST_FREE(ecf->path_append_modules, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_modules->data;
ecf->path_append_modules = eina_list_remove_list(ecf->path_append_modules, ecf->path_append_modules);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_backgrounds)
EINA_LIST_FREE(ecf->path_append_backgrounds, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_backgrounds->data;
ecf->path_append_backgrounds = eina_list_remove_list(ecf->path_append_backgrounds, ecf->path_append_backgrounds);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->path_append_messages)
EINA_LIST_FREE(ecf->path_append_messages, epd)
{
E_Path_Dir *epd;
epd = ecf->path_append_messages->data;
ecf->path_append_messages = eina_list_remove_list(ecf->path_append_messages, ecf->path_append_messages);
if (epd->dir) eina_stringshare_del(epd->dir);
E_FREE(epd);
}
while (ecf->remembers)
EINA_LIST_FREE(ecf->remembers, rem)
{
E_Remember *rem;
rem = ecf->remembers->data;
ecf->remembers = eina_list_remove_list(ecf->remembers, ecf->remembers);
if (rem->name) eina_stringshare_del(rem->name);
if (rem->class) eina_stringshare_del(rem->class);
if (rem->title) eina_stringshare_del(rem->title);
if (rem->role) eina_stringshare_del(rem->role);
if (rem->prop.border) eina_stringshare_del(rem->prop.border);
if (rem->prop.command) eina_stringshare_del(rem->prop.command);
E_FREE(rem);
}
while (ecf->color_classes)
EINA_LIST_FREE(ecf->color_classes, cc)
{
E_Color_Class *cc;
cc = ecf->color_classes->data;
ecf->color_classes = eina_list_remove_list(ecf->color_classes, ecf->color_classes);
if (cc->name) eina_stringshare_del(cc->name);
E_FREE(cc);
}
@ -1611,17 +1554,13 @@ _e_config_free(E_Config *ecf)
if (ecf->wallpaper_import_last_path) eina_stringshare_del(ecf->wallpaper_import_last_path);
if (ecf->theme_default_border_style) eina_stringshare_del(ecf->theme_default_border_style);
if (ecf->desklock_custom_desklock_cmd) eina_stringshare_del(ecf->desklock_custom_desklock_cmd);
while (ecf->syscon.actions)
EINA_LIST_FREE(ecf->syscon.actions, sca)
{
E_Config_Syscon_Action *sca;
sca = ecf->syscon.actions->data;
if (sca->action) eina_stringshare_del(sca->action);
if (sca->params) eina_stringshare_del(sca->params);
if (sca->button) eina_stringshare_del(sca->button);
if (sca->icon) eina_stringshare_del(sca->icon);
E_FREE(sca);
ecf->syscon.actions = eina_list_remove_list(ecf->syscon.actions, ecf->syscon.actions);
}
E_FREE(ecf);
}

@ -27,22 +27,22 @@ e_configure_init(void)
static void
_e_configure_efreet_desktop_update(void)
{
Ecore_List *settings_desktops, *system_desktops;
Eina_List *settings_desktops, *system_desktops;
Eina_List *remove_items = NULL;
Eina_List *remove_cats = NULL;
Eina_List *l;
Efreet_Desktop *desktop;
Eina_List *l, *ll, *remove_items = NULL, *remove_cats = NULL;
E_Configure_Cat *ecat;
void *data;
char buf[1024];
/* remove anything with a desktop entry */
for (l = e_configure_registry; l; l = l->next)
{
E_Configure_Cat *ecat;
ecat = l->data;
for (ll = ecat->items; ll; ll = ll->next)
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
{
E_Configure_It *eci;
Eina_List *ll;
eci = ll->data;
EINA_LIST_FOREACH(ecat->items, ll, eci)
if (eci->desktop)
{
snprintf(buf, sizeof(buf), "%s/%s", ecat->cat, eci->item);
@ -50,18 +50,15 @@ _e_configure_efreet_desktop_update(void)
remove_cats = eina_list_append(remove_cats, strdup(ecat->cat));
}
}
}
while (remove_items)
EINA_LIST_FREE(remove_items, data)
{
e_configure_registry_item_del(remove_items->data);
free(remove_items->data);
remove_items = eina_list_remove_list(remove_items, remove_items);
e_configure_registry_item_del(data);
free(data);
}
while (remove_cats)
EINA_LIST_FREE(remove_cats, data)
{
e_configure_registry_category_del(remove_cats->data);
free(remove_cats->data);
remove_cats = eina_list_remove_list(remove_cats, remove_cats);
e_configure_registry_category_del(data);
free(data);
}
/* get desktops */
@ -70,8 +67,7 @@ _e_configure_efreet_desktop_update(void)
if ((!settings_desktops) || (!system_desktops)) return;
/* get ones in BOTH lists */
ecore_list_first_goto(settings_desktops);
while ((desktop = ecore_list_next(settings_desktops)))
EINA_LIST_FOREACH(settings_desktops, l, desktop)
{
char *s;
char *cfg_cat_name;
@ -82,7 +78,7 @@ _e_configure_efreet_desktop_update(void)
char *label;
int cfg_pri;
if (!ecore_list_goto(system_desktops, desktop)) continue;
if (!eina_list_data_find(system_desktops, desktop)) continue;
cfg_cat = NULL;
cfg_icon = NULL;
cfg_cat_cfg = NULL;
@ -237,61 +233,51 @@ e_configure_registry_generic_item_add(const char *path, int pri, const char *lab
EAPI void
e_configure_registry_item_del(const char *path)
{
E_Configure_Cat *ecat;
Eina_List *l;
char *cat;
const char *item;
char *cat;
/* path is "category/item" */
cat = ecore_file_dir_get(path);
if (!cat) return;
item = ecore_file_file_get(path);
for (l = e_configure_registry; l; l = l->next)
{
E_Configure_Cat *ecat;
ecat = l->data;
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
if (!strcmp(cat, ecat->cat))
{
Eina_List *ll;
for (ll = ecat->items; ll; ll = ll->next)
{
E_Configure_It *eci;
Eina_List *ll;
eci = ll->data;
EINA_LIST_FOREACH(ecat->items, ll, eci)
if (!strcmp(item, eci->item))
{
ecat->items = eina_list_remove_list(ecat->items, ll);
eina_stringshare_del(eci->item);
eina_stringshare_del(eci->label);
eina_stringshare_del(eci->icon);
if (eci->icon_file) eina_stringshare_del(eci->icon_file);
if (eci->desktop) efreet_desktop_free(eci->desktop);
free(eci);
goto done;
}
}
goto done;
break;
}
break;
}
done:
free(cat);
}
EAPI void
e_configure_registry_category_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon)
{
E_Configure_Cat *ecat2;
E_Configure_Cat *ecat;
Eina_List *l;
/* if it exists - ignore this */
for (l = e_configure_registry; l; l = l->next)
{
E_Configure_Cat *ecat2;
ecat2 = l->data;
EINA_LIST_FOREACH(e_configure_registry, l, ecat2)
if (!strcmp(ecat2->cat, path)) return;
}
ecat = E_NEW(E_Configure_Cat, 1);
if (!ecat) return;
@ -301,46 +287,37 @@ e_configure_registry_category_add(const char *path, int pri, const char *label,
ecat->label = eina_stringshare_add(label);
if (icon_file) ecat->icon_file = eina_stringshare_add(icon_file);
if (icon) ecat->icon = eina_stringshare_add(icon);
for (l = e_configure_registry; l; l = l->next)
{
E_Configure_Cat *ecat2;
ecat2 = l->data;
EINA_LIST_FOREACH(e_configure_registry, l, ecat2)
if (ecat2->pri > ecat->pri)
{
e_configure_registry = eina_list_prepend_relative_list(e_configure_registry, ecat, l);
return;
}
}
e_configure_registry = eina_list_append(e_configure_registry, ecat);
}
EAPI void
e_configure_registry_category_del(const char *path)
{
E_Configure_Cat *ecat;
Eina_List *l;
char *cat;
cat = ecore_file_dir_get(path);
if (!cat) return;
for (l = e_configure_registry; l; l = l->next)
{
E_Configure_Cat *ecat;
ecat = l->data;
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
if (!strcmp(cat, ecat->cat))
{
if (ecat->items) goto done;
if (ecat->items) break;
e_configure_registry = eina_list_remove_list(e_configure_registry, l);
eina_stringshare_del(ecat->cat);
eina_stringshare_del(ecat->label);
if (ecat->icon) eina_stringshare_del(ecat->icon);
if (ecat->icon_file) eina_stringshare_del(ecat->icon_file);
free(ecat);
goto done;
}
break;
}
done:
free(cat);
}
@ -352,6 +329,7 @@ static struct {
EAPI void
e_configure_registry_call(const char *path, E_Container *con, const char *params)
{
E_Configure_Cat *ecat;
Eina_List *l;
char *cat;
const char *item;
@ -360,20 +338,13 @@ e_configure_registry_call(const char *path, E_Container *con, const char *params
cat = ecore_file_dir_get(path);
if (!cat) return;
item = ecore_file_file_get(path);
for (l = e_configure_registry; l; l = l->next)
{
E_Configure_Cat *ecat;
ecat = l->data;
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
if (!strcmp(cat, ecat->cat))
{
Eina_List *ll;
for (ll = ecat->items; ll; ll = ll->next)
{
E_Configure_It *eci;
Eina_List *ll;
eci = ll->data;
EINA_LIST_FOREACH(ecat->items, ll, eci)
if (!strcmp(item, eci->item))
{
if (eci->func) eci->func(con, params);
@ -389,13 +360,11 @@ e_configure_registry_call(const char *path, E_Container *con, const char *params
e_exec(e_util_zone_current_get(con->manager),
eci->desktop, NULL, NULL, "config");
}
goto done;
}
}
goto done;
break;
}
break;
}
done:
free(cat);
}
@ -410,6 +379,7 @@ e_configure_registry_custom_desktop_exec_callback_set(void (*func) (const void *
EAPI int
e_configure_registry_exists(const char *path)
{
E_Configure_Cat *ecat;
Eina_List *l;
char *cat;
const char *item;
@ -419,35 +389,26 @@ e_configure_registry_exists(const char *path)
cat = ecore_file_dir_get(path);
if (!cat) return 0;
item = ecore_file_file_get(path);
for (l = e_configure_registry; l; l = l->next)
{
E_Configure_Cat *ecat;
ecat = l->data;
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
if (!strcmp(cat, ecat->cat))
{
E_Configure_It *eci;
Eina_List *ll;
if (!item)
{
ret = 1;
goto done;
break;
}
for (ll = ecat->items; ll; ll = ll->next)
{
E_Configure_It *eci;
eci = ll->data;
EINA_LIST_FOREACH(ecat->items, ll, eci)
if (!strcmp(item, eci->item))
{
ret = 1;
goto done;
break;
}
break;
}
goto done;
}
}
done:
free(cat);
return ret;
}

@ -358,6 +358,7 @@ _e_desktop_edit_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfd
{
E_Desktop_Edit *editor;
Efreet_Desktop *desktop;
char *str;
editor = cfdata->editor;
desktop = editor->desktop;
@ -375,11 +376,12 @@ _e_desktop_edit_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfd
IFFREE(cfdata->desktop->startup_wm_class);
IFDUP(cfdata->startup_wm_class, cfdata->desktop->startup_wm_class);
if (cfdata->desktop->categories)
ecore_list_destroy(cfdata->desktop->categories);
EINA_LIST_FREE(cfdata->desktop->categories, str)
eina_stringshare_del(str);
cfdata->desktop->categories = efreet_desktop_string_list_parse(cfdata->categories);
if (cfdata->desktop->mime_types)
ecore_list_destroy(cfdata->desktop->mime_types);
EINA_LIST_FREE(cfdata->desktop->mime_types, str)
eina_stringshare_del(str);
cfdata->desktop->mime_types = efreet_desktop_string_list_parse(cfdata->mimes);
IFFREE(cfdata->desktop->icon);

@ -98,7 +98,7 @@ e_exec_shutdown(void)
EAPI E_Exec_Instance *
e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
Ecore_List *files, const char *launch_method)
Eina_List *files, const char *launch_method)
{
E_Exec_Launch *launch;
E_Exec_Instance *inst = NULL;
@ -367,15 +367,12 @@ static Evas_Bool
_e_exec_startup_id_pid_find(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *value, void *data)
{
E_Exec_Search *search;
Eina_List *instances, *l;
E_Exec_Instance *inst;
Eina_List *l;
search = data;
instances = value;
for (l = instances; l; l = l->next)
{
E_Exec_Instance *inst;
inst = l->data;
EINA_LIST_FOREACH(value, l, inst)
if (((search->startup_id > 0) && (search->startup_id == inst->startup_id)) ||
((inst->exe) && (search->pid > 1) &&
(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 __
search->desktop = inst->desktop;
return 0;
}
}
return 1;
}

@ -20,7 +20,7 @@ struct _E_Exec_Instance
EAPI int e_exec_init(void);
EAPI int e_exec_shutdown(void);
EAPI E_Exec_Instance *e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Ecore_List *files, const char *launch_method);
EAPI E_Exec_Instance *e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method);
EAPI Efreet_Desktop *e_exec_startup_id_pid_find(int startup_id, pid_t pid);

@ -2911,30 +2911,26 @@ static void
_e_fm2_queue_free(Evas_Object *obj)
{
E_Fm2_Smart_Data *sd;
E_Fm2_Icon *ic;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
/* just free the icons in the queue and the queue itself */
while (sd->queue)
{
_e_fm2_icon_free(sd->queue->data);
sd->queue = eina_list_remove_list(sd->queue, sd->queue);
}
EINA_LIST_FREE(sd->queue, ic)
_e_fm2_icon_free(ic);
}
static void
_e_fm2_regions_free(Evas_Object *obj)
{
E_Fm2_Smart_Data *sd;
E_Fm2_Region *rg;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
/* free up all regions */
while (sd->regions.list)
{
_e_fm2_region_free(sd->regions.list->data);
sd->regions.list = eina_list_remove_list(sd->regions.list, sd->regions.list);
}
EINA_LIST_FREE(sd->regions.list, rg)
_e_fm2_region_free(rg);
}
static void
@ -4217,12 +4213,8 @@ _e_fm2_region_free(E_Fm2_Region *rg)
{
E_Fm2_Icon *ic;
while (rg->list)
{
ic = rg->list->data;
EINA_LIST_FREE(rg->list, ic)
ic->region = NULL;
rg->list = eina_list_remove_list(rg->list, rg->list);
}
free(rg);
}
@ -7195,19 +7187,13 @@ _e_fm2_context_list_sort(const void *data1, const void *data2)
static void
_e_fm2_icon_menu_post_cb(void *data, E_Menu *m)
{
E_Fm2_Context_Menu_Data *md;
E_Fm2_Icon *ic;
ic = data;
ic->menu = NULL;
while (_e_fm2_menu_contexts)
{
E_Fm2_Context_Menu_Data *md;
md = _e_fm2_menu_contexts->data;
_e_fm2_menu_contexts = eina_list_remove_list(_e_fm2_menu_contexts,
_e_fm2_menu_contexts);
EINA_LIST_FREE(_e_fm2_menu_contexts, md)
E_FREE(md);
}
}
static void
@ -8153,10 +8139,8 @@ _e_fm2_live_process_end(Evas_Object *obj)
E_Fm2_Action *a;
sd = evas_object_smart_data_get(obj);
while (sd->live.actions)
EINA_LIST_FREE(sd->live.actions, a)
{
a = sd->live.actions->data;
sd->live.actions = eina_list_remove_list(sd->live.actions, sd->live.actions);
eina_stringshare_del(a->file);
eina_stringshare_del(a->file2);
eina_stringshare_del(a->finf.lnk);

@ -305,7 +305,8 @@ static void
_e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error)
{
E_Hal_Manager_Get_All_Devices_Return *ret = reply_data;
char *device;
Eina_List *l;
char *udi;
if (!ret || !ret->strings) return;
@ -315,13 +316,9 @@ _e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error)
return;
}
ecore_list_first_goto(ret->strings);
while ((device = ecore_list_next(ret->strings)))
EINA_LIST_FOREACH(ret->strings, l, udi)
{
// printf("DB INIT DEV+: %s\n", device);
char *udi;
udi = device;
// printf("DB INIT DEV+: %s\n", udi);
e_hal_device_query_capability(_e_dbus_conn, udi, "storage",
_e_dbus_cb_store_is, strdup(udi));
e_hal_device_query_capability(_e_dbus_conn, udi, "volume",
@ -333,6 +330,7 @@ static void
_e_dbus_cb_dev_store(void *user_data, void *reply_data, DBusError *error)
{
E_Hal_Manager_Find_Device_By_Capability_Return *ret = reply_data;
Eina_List *l;
char *device;
if (!ret || !ret->strings) return;
@ -343,8 +341,7 @@ _e_dbus_cb_dev_store(void *user_data, void *reply_data, DBusError *error)
return;
}
ecore_list_first_goto(ret->strings);
while ((device = ecore_list_next(ret->strings)))
EINA_LIST_FOREACH(ret->strings, l, device)
{
// printf("DB STORE+: %s\n", device);
e_storage_add(device);
@ -355,6 +352,7 @@ static void
_e_dbus_cb_dev_vol(void *user_data, void *reply_data, DBusError *error)
{
E_Hal_Manager_Find_Device_By_Capability_Return *ret = reply_data;
Eina_List *l;
char *device;
if (!ret || !ret->strings) return;
@ -365,8 +363,7 @@ _e_dbus_cb_dev_vol(void *user_data, void *reply_data, DBusError *error)
return;
}
ecore_list_first_goto(ret->strings);
while ((device = ecore_list_next(ret->strings)))
EINA_LIST_FOREACH(ret->strings, l, device)
{
// printf("DB VOL+: %s\n", device);
e_volume_add(device);
@ -856,7 +853,7 @@ e_volume_mount(E_Volume *v)
{
char buf[256];
char *mount_point;
Ecore_List *opt = NULL;
Eina_List *opt = NULL;
if (!v || !v->mount_point || strncmp(v->mount_point, "/media/", 7))
return;
@ -868,13 +865,12 @@ e_volume_mount(E_Volume *v)
// || (!strcmp(v->fstype, "iso9660")) || (!strcmp(v->fstype, "udf"))
)
{
opt = ecore_list_new();
snprintf(buf, sizeof(buf), "uid=%i", (int)getuid());
ecore_list_append(opt, buf);
opt = eina_list_append(opt, buf);
}
e_hal_device_volume_mount(_e_dbus_conn, v->udi, mount_point,
v->fstype, opt, NULL, v);
if (opt) ecore_list_destroy(opt);
opt = eina_list_free(opt);
}
static void
@ -1077,12 +1073,7 @@ _e_fm_monitor_start_try(E_Fm_Task *task)
}
fclose(f);
/* append whats left */
while (files)
{
f2 = eina_list_append(f2, files->data);
files = eina_list_remove_list(files, files);
}
files = f2;
files = eina_list_merge(f2, files);
}
}
ed->fq = files;
@ -1119,15 +1110,12 @@ _e_fm_monitor_start_try(E_Fm_Task *task)
static void
_e_fm_monitor_end(int id, const char *path)
{
Eina_List *l;
E_Fm_Task *task;
for (l = _e_dirs; l; l = l->next)
{
Eina_List *l;
E_Dir *ed;
EINA_LIST_FOREACH(_e_dirs, l, ed)
/* look for the dire entry to stop monitoring */
ed = l->data;
if ((id == ed->id) && (!strcmp(ed->dir, path)))
{
/* if this is not the real monitoring node - unref the
@ -1156,7 +1144,6 @@ _e_fm_monitor_end(int id, const char *path)
_e_dirs = eina_list_remove_list(_e_dirs, l);
break;
}
}
task = _e_fm_task_get(id);
if (task) _e_fm_task_remove(task);
@ -1173,18 +1160,13 @@ _e_fm_task_get(int id)
static Eina_List *
_e_fm_task_node_get(int id)
{
Eina_List *l = _e_fm_tasks;
E_Fm_Task *task;
Eina_List *l;
while (l)
{
task = eina_list_data_get(l);
EINA_LIST_FOREACH(_e_fm_tasks, l, task)
if (task->id == id)
return l;
l = eina_list_next(l);
}
return NULL;
}
@ -1722,11 +1704,7 @@ _e_cb_recent_clean(void *data)
ed = data;
ed->cleaning = 1;
t_now = ecore_time_get();
for (l = ed->recent_mods; l;)
{
m = l->data;
pl = l;
l = l->next;
EINA_LIST_FOREACH_SAFE(ed->recent_mods, pl, l, m)
if ((m->mod) && ((t_now - m->timestamp) >= DEF_MOD_BACKOFF))
{
ed->recent_mods = eina_list_remove_list(ed->recent_mods, pl);
@ -1734,7 +1712,6 @@ _e_cb_recent_clean(void *data)
eina_stringshare_del(m->path);
free(m);
}
}
ed->cleaning = 0;
if (ed->recent_mods) return 1;
ed->recent_clean = NULL;
@ -2020,18 +1997,15 @@ static char *
_e_str_list_remove(Eina_List **list, char *str)
{
Eina_List *l;
for (l = *list; l; l = l->next)
{
char *s;
s = l->data;
EINA_LIST_FOREACH(*list, l, s)
if (!strcmp(s, str))
{
*list = eina_list_remove_list(*list, l);
return s;
}
}
return NULL;
}
@ -2050,6 +2024,7 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
{
FILE *forder;
Eina_List *files = NULL, *l;
char *str;
forder = fopen(order, "r");
if (forder)
@ -2067,23 +2042,21 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
fclose(forder);
}
/* remove dest file from .order - if there */
for (l = files; l; l = l->next)
{
if (!strcmp(l->data, file))
EINA_LIST_FOREACH(files, l, str)
if (!strcmp(str, file))
{
free(l->data);
free(str);
files = eina_list_remove_list(files, l);
break;
}
}
/* now insert dest into list or replace entry */
for (l = files; l; l = l->next)
EINA_LIST_FOREACH(files, l, str)
{
if (!strcmp(l->data, relative))
if (!strcmp(str, relative))
{
if (after == 2) /* replace */
{
free(l->data);
free(str);
l->data = strdup(file);
}
else if (after == 0) /* before */
@ -2101,11 +2074,10 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
forder = fopen(order, "w");
if (forder)
{
while (files)
EINA_LIST_FREE(files, str)
{
fprintf(forder, "%s\n", (char *)files->data);
free(files->data);
files = eina_list_remove_list(files, files);
fprintf(forder, "%s\n", str);
free(str);
}
fclose(forder);
}
@ -2115,24 +2087,20 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
static void
_e_dir_del(E_Dir *ed)
{
void *data;
E_Mod *m;
eina_stringshare_del(ed->dir);
if (ed->idler) ecore_idler_del(ed->idler);
if (ed->recent_clean)
ecore_timer_del(ed->recent_clean);
while (ed->recent_mods)
EINA_LIST_FREE(ed->recent_mods, m)
{
E_Mod *m;
m = ed->recent_mods->data;
eina_stringshare_del(m->path);
free(m);
ed->recent_mods = eina_list_remove_list(ed->recent_mods, ed->recent_mods);
}
while (ed->fq)
{
free(ed->fq->data);
ed->fq = eina_list_remove_list(ed->fq, ed->fq);
}
EINA_LIST_FREE(ed->fq, data)
free(data);
free(ed);
}

@ -359,7 +359,7 @@ e_fm2_mime_handler_glob_handlers_call_all(Evas_Object *obj, const char *path, co
}
/* run a handlers test function */
EAPI Evas_Bool
EAPI Eina_Bool
e_fm2_mime_handler_test(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const char *path)
{
if ((!handler) || (!obj) || (!path)) return 0;

@ -3473,11 +3473,12 @@ _e_gadcon_layout_smart_width_smart_sort_reverse_cb(const void *d1, const void *d
void
_e_gadcon_layout_smart_gadcons_width_adjust(E_Smart_Data *sd, int min, int cur)
{
E_Gadcon_Layout_Item *bi2 = NULL;
E_Gadcon_Layout_Item *bi = NULL;
Eina_List *l, *l2;
int need, limit, reduce_total, reduce;
int max_size;
int c;
Eina_List *l, *l2;
E_Gadcon_Layout_Item *bi, *bi2;
if (sd->horizontal)
{

@ -444,6 +444,7 @@ _e_init_evas_new(Ecore_X_Window root, int w, int h, Ecore_X_Window *winret)
Ecore_Evas *ee;
Evas *e;
Eina_List *l;
const char *path;
if ((engine == 0) || (engine == 1))
{
@ -479,7 +480,7 @@ _e_init_evas_new(Ecore_X_Window root, int w, int h, Ecore_X_Window *winret)
evas_image_cache_set(e, 4096 * 1024);
evas_font_cache_set(e, 512 * 1024);
for (l = fpath; l; l = l->next) evas_font_path_append(e, l->data);
EINA_LIST_FOREACH(fpath, l, path) evas_font_path_append(e, l->data);
if (font_hinting == 0)
{

@ -1095,7 +1095,8 @@ _e_border_menu_cb_ibar_add_pre(void *data, E_Menu *m, E_Menu_Item *mi)
{
E_Menu *sm;
E_Border *bd;
Ecore_List *dirs;
Eina_List *dirs;
Eina_List *l;
char buf[4096], *file;
const char *homedir;
@ -1106,7 +1107,7 @@ _e_border_menu_cb_ibar_add_pre(void *data, E_Menu *m, E_Menu_Item *mi)
if (!dirs) return;
sm = e_menu_new();
while ((file = ecore_list_next(dirs)))
EINA_LIST_FOREACH(dirs, l, file)
{
E_Menu_Item *smi;

@ -17,7 +17,7 @@ struct _CFModule
struct _CFType
{
const char *key, *name, *icon;
Evas_Hash *modules;
Eina_Hash *modules;
};
struct _CFTypes
@ -241,15 +241,16 @@ _fill_type_hash(void)
static void
_load_modules(const char *dir)
{
Ecore_List *files = NULL;
Eina_List *files = NULL;
Eina_List *l;
char *mod = NULL;
char *file;
if (!dir) return;
if (!(files = ecore_file_ls(dir))) return;
/* get all modules in this path_dir */
ecore_list_first_goto(files);
while ((mod = ecore_list_next(files)))
EINA_LIST_FOREACH(files, l, mod)
{
Efreet_Desktop *desk = NULL;
CFType *cft = NULL;
@ -312,7 +313,8 @@ _load_modules(const char *dir)
eina_hash_direct_add(cft->modules, cfm->short_name, cfm);
}
free(mod);
if (files) ecore_list_destroy(files);
EINA_LIST_FREE(files, file)
free(file);
}
static void
@ -494,17 +496,17 @@ _list_widget_load(Evas_Object *obj, Eina_List *list)
{
Evas *evas;
Eina_List *ml = NULL;
CFModule *mod;
if ((!obj) || (!list)) return;
evas = evas_object_evas_get(obj);
for (ml = list; ml; ml = ml->next)
EINA_LIST_FOREACH(list, ml, mod)
{
CFModule *mod = NULL;
Evas_Object *ic = NULL;