/**
* @param desktop: the desktop entry
- * @param files: an ecore list of file names to execute, as either absolute paths,
+ * @param files: an eina list of file names to execute, as either absolute paths,
* relative paths, or uris
* @param func: a callback to call for each prepared command line
* @param data: user data passed to the callback
/**
* @param desktop: the desktop entry
- * @param files an ecore list of local files, as absolute paths, local paths, or file:// uris (or NULL to get exec string with no files appended)
- * @return Returns an ecore list of exec strings
+ * @param files an eina list of local files, as absolute paths, local paths, or file:// uris (or NULL to get exec string with no files appended)
+ * @return Returns an eina list of exec strings
* @brief Get the command to use to execute a desktop entry
*
* The returned list and each of its elements must be freed.
/**
* @param desktop: the desktop entry
- * @param files: an ecore list of file names to execute, as either absolute paths,
+ * @param files: an eina list of file names to execute, as either absolute paths,
* relative paths, or uris
* @param cb_command: a callback to call for each prepared command line
* @param cb_progress: a callback to get progress for the downloads
} name; /**< The names for this menu */
Efreet_Desktop *directory; /**< The directory */
- Ecore_DList *directories; /**< All the directories set in the menu file */
+ Eina_List *directories; /**< All the directories set in the menu file */
Efreet_Menu_Move *current_move; /**< The current move */
Eina_List *app_pool; /**< application pool */
Eina_List *applications; /**< applications in this menu */
- Ecore_DList *directory_dirs; /**< .directory file directories */
+ Eina_List *directory_dirs; /**< .directory file directories */
Eina_Hash *directory_cache; /**< .directory dirs */
Eina_List *moves; /**< List of moves to be handled by the menu */
internal->applications = eina_list_free(internal->applications);
- IF_FREE_DLIST(internal->directories);
+ IF_FREE_LIST(internal->directories, free);
IF_FREE_LIST(internal->app_dirs, efreet_menu_app_dir_free);
IF_FREE_LIST(internal->app_pool, efreet_menu_desktop_free);
- IF_FREE_DLIST(internal->directory_dirs);
+ IF_FREE_LIST(internal->directory_dirs, free);
IF_FREE_HASH(internal->directory_cache);
IF_FREE_LIST(internal->moves, efreet_menu_move_free);
efreet_menu_handle_menu(Efreet_Menu_Internal *internal, Efreet_Xml *xml)
{
Efreet_Xml *child;
+ Eina_List *l;
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml);
- ecore_list_last_goto(xml->children);
- while ((child = ecore_dlist_previous(xml->children)))
+ EINA_LIST_REVERSE_FOREACH(xml->children, l, child)
{
cb = eina_hash_find(efreet_menu_handle_cbs, child->tag);
if (cb)
if (!path) return 0;
/* we've already got this guy in our list we can skip it */
- if (ecore_list_find(parent->directory_dirs, ECORE_COMPARE_CB(strcmp), path))
+ if (eina_list_search_unsorted(parent->directory_dirs, EINA_COMPARE_CB(strcmp), path))
{
FREE(path);
return 1;
}
- ecore_dlist_prepend(parent->directory_dirs, path);
+ parent->directory_dirs = eina_list_prepend(parent->directory_dirs, path);
return 1;
}
"desktop-directories");
EINA_LIST_FOREACH(dirs, l, dir)
{
- if (ecore_list_find(parent->directory_dirs, ECORE_COMPARE_CB(strcmp), dir))
+ if (eina_list_search_unsorted(parent->directory_dirs, EINA_COMPARE_CB(strcmp), dir))
continue;
- ecore_dlist_prepend(parent->directory_dirs, strdup(dir));
+ parent->directory_dirs = eina_list_prepend(parent->directory_dirs, strdup(dir));
}
while (dirs)
if (!parent || !xml) return 0;
efreet_menu_create_directories_list(parent);
- ecore_dlist_prepend(parent->directories, strdup(xml->text));
+ parent->directories = eina_list_prepend(parent->directories, strdup(xml->text));
return 1;
}
/* add the legacy dir as a directory dir */
efreet_menu_create_directory_dirs_list(legacy_internal);
- ecore_dlist_append(legacy_internal->directory_dirs, strdup(path));
+ legacy_internal->directory_dirs = eina_list_append(legacy_internal->directory_dirs, strdup(path));
/* setup a filter for all the conforming .desktop files in the legacy
* dir */
efreet_menu_handle_move(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
{
Efreet_Xml *child;
+ Eina_List *l;
if (!parent || !xml) return 0;
efreet_menu_create_move_list(parent);
- ecore_list_first_goto(xml->children);
- while ((child = ecore_list_next(xml->children)))
+ EINA_LIST_FOREACH(xml->children, l, child)
{
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml);
efreet_menu_handle_layout(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
{
Efreet_Xml *child;
+ Eina_List *l;
if (!parent || !xml) return 0;
efreet_menu_create_layout_list(parent);
- ecore_list_first_goto(xml->children);
- while ((child = ecore_list_next(xml->children)))
+ EINA_LIST_FOREACH(xml->children, l, child)
{
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml, int def);
{
const char *val;
Efreet_Xml *child;
+ Eina_List *l;
if (!parent || !xml) return 0;
efreet_menu_create_default_layout_list(parent);
- ecore_list_first_goto(xml->children);
- while ((child = ecore_list_next(xml->children)))
+ EINA_LIST_FOREACH(xml->children, l, child)
{
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml, int def);
efreet_menu_handle_filter_op(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml)
{
Efreet_Xml *child;
+ Eina_List *l;
- ecore_list_first_goto(xml->children);
- while ((child = ecore_list_next(xml->children)))
+ EINA_LIST_FOREACH(xml->children, l, child)
{
int (*cb)(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml);
if (src->directories)
{
efreet_menu_create_directories_list(dest);
- ecore_dlist_prepend_list(dest->directories, src->directories);
+ dest->directories = eina_list_merge(src->directories, dest->directories);
+ src->directories = NULL;
}
if (src->app_dirs)
{
efreet_menu_create_app_dirs_list(dest);
dest->app_dirs = eina_list_merge(src->app_dirs, dest->app_dirs);
- src->app_dirs = NULL;
+ src->app_dirs = NULL;
}
if (src->directory_dirs)
{
efreet_menu_create_directory_dirs_list(dest);
- ecore_dlist_prepend_list(dest->directory_dirs, src->directory_dirs);
+ dest->directory_dirs = eina_list_merge(src->directory_dirs, dest->directory_dirs);
+ src->directory_dirs = NULL;
}
if (src->moves)
{
efreet_menu_create_move_list(dest);
dest->moves = eina_list_merge(src->moves, dest->moves);
- src->moves = NULL;
+ src->moves = NULL;
}
if (src->filters)
{
efreet_menu_create_filter_list(dest);
dest->filters = eina_list_merge(src->filters, dest->filters);
- src->filters = NULL;
+ src->filters = NULL;
}
if (src->sub_menus)
{
if (!internal || internal->directory_dirs) return;
- internal->directory_dirs = ecore_dlist_new();
- ecore_dlist_free_cb_set(internal->directory_dirs, free);
+ internal->directory_dirs = NULL;
}
static void
{
if (!internal || internal->directories) return;
- internal->directories = ecore_dlist_new();
- ecore_dlist_free_cb_set(internal->directories, free);
+ internal->directories = NULL;
}
static char *
efreet_menu_directory_dirs_process(Efreet_Menu_Internal *internal)
{
const char *path;
+ Eina_List *l;
if (internal->directory_dirs)
{
internal->directory_cache =
eina_hash_string_superfast_new(EINA_FREE_CB(efreet_desktop_free));
- ecore_dlist_last_goto(internal->directory_dirs);
- while ((path = ecore_dlist_previous(internal->directory_dirs)))
+ EINA_LIST_REVERSE_FOREACH(internal->directory_dirs, l, path)
efreet_menu_directory_dir_scan(path, NULL, internal->directory_cache);
}
if (internal->directories)
{
- ecore_dlist_last_goto(internal->directories);
- while ((path = ecore_dlist_previous(internal->directories)))
+ EINA_LIST_REVERSE_FOREACH(internal->directories, l, path)
{
internal->directory = efreet_menu_directory_get(internal, path);
if (internal->directory) break;