Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_desktop Modified Files: ecore_desktop.c ecore_desktop_icon.c ecore_desktop_menu.c ecore_desktop_paths.c Log Message: *API BREAK* see the discussion in the mailing list. misc and e_modules will follow =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -3 -r1.72 -r1.73 --- ecore_desktop.c 20 Feb 2007 10:12:45 -0000 1.72 +++ ecore_desktop.c 25 Jul 2007 17:00:55 -0000 1.73 @@ -60,8 +60,8 @@ ecore_hash_destroy(result); return NULL; } - ecore_hash_set_free_key(result, free); - ecore_hash_set_free_value(result, (Ecore_Free_Cb) ecore_hash_destroy); + ecore_hash_free_key_cb_set(result, free); + ecore_hash_free_value_cb_set(result, (Ecore_Free_Cb) ecore_hash_destroy); *buffer = '\0'; #ifdef DEBUG fprintf(stdout, "PARSING INI %s\n", file); @@ -87,8 +87,8 @@ current = ecore_hash_new(ecore_str_hash, ecore_str_compare); if (current) { - ecore_hash_set_free_key(current, free); - ecore_hash_set_free_value(current, free); + ecore_hash_free_key_cb_set(current, free); + ecore_hash_free_value_cb_set(current, free); ecore_hash_set(result, strdup(key), current); #ifdef DEBUG fprintf(stdout, " GROUP [%s]\n", key); @@ -222,7 +222,7 @@ { int size = 0; - value = (char *) ecore_file_get_file(result->original_path); + value = (char *) ecore_file_file_get(result->original_path); /* Figure out the eap_name. */ if (value) { @@ -275,7 +275,7 @@ { char *p; - value = (char *)ecore_file_get_file(tmp); /* In case the exe included a path. */ + value = (char *)ecore_file_file_get(tmp); /* In case the exe included a path. */ p = value; while ((*p != '\0') && (*p != ' ')) { @@ -322,7 +322,7 @@ char *dir; dir = - ecore_file_get_dir(result->original_path); + ecore_file_dir_get(result->original_path); if (dir) { sprintf(temp, "%s/%s", dir, result->icon); @@ -383,7 +383,7 @@ { char *tmp; - tmp = strdup(ecore_file_get_file(result->exec)); + tmp = strdup(ecore_file_file_get(result->exec)); if (tmp) { char *p2; @@ -534,8 +534,8 @@ desktop->group = ecore_hash_new(ecore_str_hash, ecore_str_compare); if (desktop->group) { - ecore_hash_set_free_key(desktop->group, free); - ecore_hash_set_free_value(desktop->group, free); + ecore_hash_free_key_cb_set(desktop->group, free); + ecore_hash_free_value_cb_set(desktop->group, free); } } } @@ -669,7 +669,7 @@ fprintf(f, "[Trash Info]\n"); else fprintf(f, "[Desktop Entry]\n"); - ecore_list_goto_first(list); + ecore_list_first_goto(list); while ((key = (char *)ecore_list_next(list))) { char *value; @@ -714,8 +714,8 @@ desktop_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare); if (desktop_cache) { - ecore_hash_set_free_key(desktop_cache, free); - ecore_hash_set_free_value(desktop_cache, + ecore_hash_free_key_cb_set(desktop_cache, free); + ecore_hash_free_value_cb_set(desktop_cache, (Ecore_Free_Cb) _ecore_desktop_destroy); } } @@ -847,7 +847,7 @@ result = ecore_list_new(); if (!result) return NULL; - ecore_list_set_free_cb(result, free); + ecore_list_free_cb_set(result, free); if (desktop->exec_params) params = strdup(desktop->exec_params); @@ -857,14 +857,14 @@ { char *file; - ecore_list_goto_first(files); + ecore_list_first_goto(files); while((file = ecore_list_next(files)) != NULL) printf("FILE FOR COMMAND IS - %s\n", file); } #endif if (files) - ecore_list_goto_first(files); + ecore_list_first_goto(files); /* FIXME: The string handling could be better, but it's good enough for now. */ do @@ -879,7 +879,7 @@ command = ecore_dlist_new(); if (!command) goto error; - ecore_dlist_set_free_cb(command, free); + ecore_dlist_free_cb_set(command, free); /* Grab a fresh copy of the params. The default is %F as per rasters request. */ if (params) free(params); if (desktop->exec_params) @@ -910,9 +910,9 @@ t = NULL; p = NULL; /* Check the bits for replacables. */ - if (!ecore_dlist_is_empty(command)) + if (!ecore_dlist_empty_is(command)) { - ecore_dlist_goto_first(command); + ecore_dlist_first_goto(command); while ((p = ecore_dlist_next(command)) != NULL) { int is_URL = 0, is_directory = 0, is_file = 0; @@ -1025,10 +1025,10 @@ * thus %d/%D would be ./ implicitly (but may need to be explicit * in the command line) */ - text = ecore_file_get_dir(file); + text = ecore_file_dir_get(file); } else if (is_file) - text = strdup(ecore_file_get_file(file)); + text = strdup(ecore_file_file_get(file)); else { /* FIXME: If the file is on the net, download @@ -1089,7 +1089,7 @@ if (params) { params[0] = '\0'; - ecore_dlist_goto_first(command); + ecore_dlist_first_goto(command); while ((p = ecore_dlist_next(command)) != NULL) { if (p[0] == '%') =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop_icon.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -3 -r1.47 -r1.48 --- ecore_desktop_icon.c 21 Dec 2006 03:36:27 -0000 1.47 +++ ecore_desktop_icon.c 25 Jul 2007 17:00:55 -0000 1.48 @@ -79,7 +79,7 @@ icon_size = "48x48"; if (icon_theme == NULL) icon_theme = "hicolor"; - ecore_list_goto_first(icons); + ecore_list_first_goto(icons); while ((icn = ecore_list_next(icons))) { char *ext; @@ -183,7 +183,7 @@ wanted_size = atoi(icon_size); /* Loop through the themes directories. */ - ecore_list_goto_first(theme->Directories); + ecore_list_first_goto(theme->Directories); while ((directory = ecore_list_next(theme->Directories)) != NULL) { if (directory->size) @@ -294,7 +294,7 @@ { char *inherits; - ecore_list_goto_first(theme->Inherits); + ecore_list_first_goto(theme->Inherits); while ((inherits = ecore_list_next(theme->Inherits)) != NULL) { found = _ecore_desktop_icon_find0(icon, icon_size, inherits, in_cache); @@ -386,8 +386,8 @@ icon_theme_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare); if (icon_theme_cache) { - ecore_hash_set_free_key(icon_theme_cache, free); - ecore_hash_set_free_value(icon_theme_cache, + ecore_hash_free_key_cb_set(icon_theme_cache, free); + ecore_hash_free_value_cb_set(icon_theme_cache, ECORE_FREE_CB(_ecore_desktop_icon_theme_destroy)); } } @@ -446,9 +446,9 @@ if (icon_theme[0] == '/') { theme_path = strdup(icon_theme); - theme_dir = ecore_file_get_dir(theme_path); + theme_dir = ecore_file_dir_get(theme_path); if (theme_dir) - icon_theme = ecore_file_get_file(theme_dir); + icon_theme = ecore_file_file_get(theme_dir); #ifdef DEBUG printf("LOADING THEME %s - %s\n", icon_theme, theme_path); #endif @@ -467,7 +467,7 @@ theme_path = ecore_desktop_paths_file_find(ecore_desktop_paths_icons, icn, 2, NULL, NULL); if (!theme_path) goto error; - theme_dir = ecore_file_get_dir(theme_path); + theme_dir = ecore_file_dir_get(theme_path); } if (!theme_path) goto error; result = calloc(1, sizeof(Ecore_Desktop_Icon_Theme)); @@ -506,9 +506,9 @@ if (!Directories) goto error; result->Directories = ecore_list_new(); if (!result->Directories) goto error; - ecore_list_set_free_cb(result->Directories, + ecore_list_free_cb_set(result->Directories, ECORE_FREE_CB(_ecore_desktop_icon_theme_directory_destroy)); - ecore_list_goto_first(Directories); + ecore_list_first_goto(Directories); while ((directory = ecore_list_next(Directories)) != NULL) { Ecore_Hash *sub_group; @@ -681,7 +681,7 @@ Ecore_Desktop_Icon_Theme_Directory *dir; char full_path[PATH_MAX]; - ecore_list_goto_first(icon_theme->Directories); + ecore_list_first_goto(icon_theme->Directories); while ((dir = ecore_list_next(icon_theme->Directories)) != NULL) { if (dir->icons) @@ -694,8 +694,8 @@ { Ecore_List *files; - ecore_hash_set_free_key(dir->icons, free); - ecore_hash_set_free_value(dir->icons, free); + ecore_hash_free_key_cb_set(dir->icons, free); + ecore_hash_free_value_cb_set(dir->icons, free); files = ecore_file_ls(dir->full_path); if (files) { =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop_menu.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -3 -r1.42 -r1.43 --- ecore_desktop_menu.c 26 Dec 2006 05:10:48 -0000 1.42 +++ ecore_desktop_menu.c 25 Jul 2007 17:00:55 -0000 1.43 @@ -248,8 +248,8 @@ /* Preperation. */ data.stack = ecore_desktop_tree_new(NULL); /* FIXME data.base and data.path leak */ - data.base = ecore_file_strip_ext(ecore_file_get_file(file)); - data.path = ecore_file_get_dir(file); + data.base = ecore_file_strip_ext(ecore_file_file_get(file)); + data.path = ecore_file_dir_get(file); if ((level == 0) && (merge_stack == NULL)) merge_stack = ecore_desktop_tree_new(NULL); #ifdef DEBUG @@ -658,10 +658,10 @@ apps = ecore_hash_new(ecore_str_hash, ecore_str_compare); if ((menu) && (rules) && (pool) && (apps)) { - ecore_hash_set_free_key(pool, free); - ecore_hash_set_free_value(pool, free); - ecore_hash_set_free_key(apps, free); - ecore_hash_set_free_value(apps, free); + ecore_hash_free_key_cb_set(pool, free); + ecore_hash_free_value_cb_set(pool, free); + ecore_hash_free_key_cb_set(apps, free); + ecore_hash_free_value_cb_set(apps, free); ecore_desktop_tree_extend(menu, "<MENU < > <> <>"); ecore_desktop_tree_extend(menu, "<MENU_PATH "); ecore_desktop_tree_add_hash(menu, pool); @@ -1052,7 +1052,7 @@ char t[PATH_MAX], *this_path; /* reverse the order of the dirs. */ - ecore_list_goto_first(paths); + ecore_list_first_goto(paths); while ((this_path = ecore_list_next(paths)) != NULL) { if (extra) @@ -1277,7 +1277,7 @@ */ merge_path[0] = '\0'; - ecore_list_goto_first(ecore_desktop_paths_config); + ecore_list_first_goto(ecore_desktop_paths_config); while ((xdg_path = ecore_list_next(ecore_desktop_paths_config)) != NULL) { if (found < 0) =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop_paths.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- ecore_desktop_paths.c 13 Nov 2006 14:20:43 -0000 1.40 +++ ecore_desktop_paths.c 25 Jul 2007 17:00:55 -0000 1.41 @@ -107,7 +107,7 @@ #ifdef GNOME_SUPPORT if (exit_handler) { - ecore_list_set_free_cb(gnome_data, free); + ecore_list_free_cb_set(gnome_data, free); _ecore_desktop_paths_exec_config(gnome_data, home, NULL, "gnome-config --datadir"); } @@ -120,7 +120,7 @@ char *this_config; char path[PATH_MAX]; - ecore_list_goto_first(config_list); + ecore_list_first_goto(config_list); while ((this_config = ecore_list_next(config_list)) != NULL) { @@ -213,13 +213,13 @@ temp_list = ecore_list_new(); if (temp_list) { - ecore_list_goto_first(ecore_desktop_paths_kde_legacy); + ecore_list_first_goto(ecore_desktop_paths_kde_legacy); while ((path = ecore_list_next(ecore_desktop_paths_kde_legacy)) != NULL) ecore_list_append(temp_list, path); - ecore_list_goto_first(temp_list); + ecore_list_first_goto(temp_list); while ((path = ecore_list_next(temp_list)) != NULL) { char *t1, *t2; @@ -312,16 +312,16 @@ E_FN_DEL(ecore_list_destroy, append_system_paths[i]); prepend_user_paths[i] = ecore_list_new(); if (prepend_user_paths[i]) - ecore_list_set_free_cb(prepend_user_paths[i], free); + ecore_list_free_cb_set(prepend_user_paths[i], free); prepend_system_paths[i] = ecore_list_new(); if (prepend_system_paths[i]) - ecore_list_set_free_cb(prepend_system_paths[i], free); + ecore_list_free_cb_set(prepend_system_paths[i], free); append_user_paths[i] = ecore_list_new(); if (append_user_paths[i]) - ecore_list_set_free_cb(append_user_paths[i], free); + ecore_list_free_cb_set(append_user_paths[i], free); append_system_paths[i] = ecore_list_new(); if (append_system_paths[i]) - ecore_list_set_free_cb(append_system_paths[i], free); + ecore_list_free_cb_set(append_system_paths[i], free); } } @@ -378,7 +378,7 @@ struct stat path_stat; if (!paths) return NULL; - ecore_list_goto_first(paths); + ecore_list_first_goto(paths); while ((this_path = ecore_list_next(paths)) != NULL) { if (path) @@ -431,7 +431,7 @@ paths = ecore_list_new(); if (!paths) return NULL; - ecore_list_set_free_cb(paths, free); + ecore_list_free_cb_set(paths, free); /* Don't sort them, as they are in preferred order from each source. */ /* Merge the results, there are probably some duplicates. */ @@ -455,7 +455,7 @@ { char *this_before; - ecore_list_goto_first(befores); + ecore_list_first_goto(befores); while ((this_before = ecore_list_next(befores)) != NULL) { _ecore_desktop_paths_massage_path(path, home, @@ -470,7 +470,7 @@ { char *this_path; - ecore_list_goto_first(prepend_user_paths[path_type]); + ecore_list_first_goto(prepend_user_paths[path_type]); while ((this_path = ecore_list_next(prepend_user_paths[path_type])) != NULL) { _ecore_desktop_paths_massage_path(path, home, this_path, NULL); @@ -490,14 +490,14 @@ { char *this_env; - ecore_list_goto_first(env_list); + ecore_list_first_goto(env_list); while ((this_env = ecore_list_next(env_list)) != NULL) { if (types) { char *this_type; - ecore_list_goto_first(types); + ecore_list_first_goto(types); while ((this_type = ecore_list_next(types)) != NULL) { _ecore_desktop_paths_massage_path(path, home, @@ -519,7 +519,7 @@ { char *this_path; - ecore_list_goto_first(append_user_paths[path_type]); + ecore_list_first_goto(append_user_paths[path_type]); while ((this_path = ecore_list_next(append_user_paths[path_type])) != NULL) { _ecore_desktop_paths_massage_path(path, home, this_path, NULL); @@ -531,7 +531,7 @@ { char *this_path; - ecore_list_goto_first(prepend_system_paths[path_type]); + ecore_list_first_goto(prepend_system_paths[path_type]); while ((this_path = ecore_list_next(prepend_system_paths[path_type])) != NULL) { _ecore_desktop_paths_massage_path(path, home, this_path, NULL); @@ -551,14 +551,14 @@ { char *this_env; - ecore_list_goto_first(env_list); + ecore_list_first_goto(env_list); while ((this_env = ecore_list_next(env_list)) != NULL) { if (types) { char *this_type; - ecore_list_goto_first(types); + ecore_list_first_goto(types); while ((this_type = ecore_list_next(types)) != NULL) { _ecore_desktop_paths_massage_path(path, home, @@ -580,7 +580,7 @@ { char *this_path; - ecore_list_goto_first(append_system_paths[path_type]); + ecore_list_first_goto(append_system_paths[path_type]); while ((this_path = ecore_list_next(append_system_paths[path_type])) != NULL) { _ecore_desktop_paths_massage_path(path, home, this_path, NULL); @@ -599,14 +599,14 @@ { char *this_gnome; - ecore_list_goto_first(gnome_data); + ecore_list_first_goto(gnome_data); while ((this_gnome = ecore_list_next(gnome_data)) != NULL) { if (types) { char *this_type; - ecore_list_goto_first(types); + ecore_list_first_goto(types); while ((this_type = ecore_list_next(types)) != NULL) { _ecore_desktop_paths_massage_path(path, home, @@ -625,10 +625,10 @@ { char *this_gnome, *this_type; - ecore_list_goto_first(gnome_data); + ecore_list_first_goto(gnome_data); while ((this_gnome = ecore_list_next(gnome_data)) != NULL) { - ecore_list_goto_first(gnome_extras); + ecore_list_first_goto(gnome_extras); while ((this_type = ecore_list_next(gnome_extras)) != NULL) { _ecore_desktop_paths_massage_path(path, home, @@ -643,7 +643,7 @@ { char *this_kde; - ecore_list_goto_first(kdes); + ecore_list_first_goto(kdes); while ((this_kde = ecore_list_next(kdes)) != NULL) { char cmd[128]; @@ -714,7 +714,7 @@ if (!paths) return; /* Check if we have it already. */ - ecore_list_goto_first(paths); + ecore_list_first_goto(paths); while ((this_path = ecore_list_next(paths)) != NULL) { if (strcmp(path, this_path) == 0) @@ -865,12 +865,12 @@ { char *this_config, *this_type; - ecore_list_goto_first(config_list); + ecore_list_first_goto(config_list); while ((this_config = ecore_list_next(config_list)) != NULL) { if (ced->types) { - ecore_list_goto_first(ced->types); + ecore_list_first_goto(ced->types); while ((this_type = ecore_list_next(ced->types)) != NULL) { @@ -915,8 +915,8 @@ if (!paths) return NULL; result = ecore_hash_new(ecore_str_hash, ecore_str_compare); if (!result) return NULL; - ecore_hash_set_free_key(result, free); - ecore_hash_set_free_value(result, free); + ecore_hash_free_key_cb_set(result, free); + ecore_hash_free_value_cb_set(result, free); path = strdup(paths); if (path) @@ -968,7 +968,7 @@ if (!paths) return NULL; result = ecore_list_new(); if (!result) return NULL; - ecore_list_set_free_cb(result, free); + ecore_list_free_cb_set(result, free); path = strdup(paths); if (path) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs