Enlightenment CVS committal Author : englebass Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_int_config_modules.c e_int_menus.c e_module.c e_order.c e_utils.c Log Message: Update for changes in efreet. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_modules.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- e_int_config_modules.c 25 Jul 2007 17:00:50 -0000 1.57 +++ e_int_config_modules.c 26 Jul 2007 11:34:08 -0000 1.58 @@ -11,7 +11,7 @@ static int _sort_modules(void *data1, void *data2); static void _fill_all(E_Config_Dialog_Data *cfdata); static void _fill_loaded(E_Config_Dialog_Data *cfdata); -static const char *_get_icon(Efreet_Desktop *desk); +static char *_get_icon(Efreet_Desktop *desk); static E_Module *_get_module(E_Config_Dialog_Data *cfdata, const char *lbl); /* Callbacks */ @@ -264,8 +264,13 @@ desk = efreet_desktop_get(buf); if (!desk) continue; icon = _get_icon(desk); - if (icon) oc = e_util_icon_add(icon, evas); + if (icon) + { + oc = e_util_icon_add(icon, evas); + free(icon); + } e_widget_ilist_append(cfdata->o_all, oc, desk->name, NULL, NULL, NULL); + efreet_desktop_free(desk); } /* Unfreeze ilist */ @@ -312,8 +317,13 @@ desk = efreet_desktop_get(buf); if (!desk) continue; icon = _get_icon(desk); - if (icon) oc = e_util_icon_add(icon, evas); + if (icon) + { + oc = e_util_icon_add(icon, evas); + free(icon); + } e_widget_ilist_append(cfdata->o_loaded, oc, desk->name, NULL, NULL, NULL); + efreet_desktop_free(desk); } /* Unfreeze ilist */ @@ -329,10 +339,10 @@ e_widget_disabled_set(cfdata->b_configure, 1); } -static const char * +static char * _get_icon(Efreet_Desktop *desk) { - const char *icon; + char *icon; if (!desk) return NULL; if (desk->icon) @@ -345,7 +355,7 @@ path = ecore_file_dir_get(desk->orig_path); snprintf(buf, sizeof(buf), "%s/%s.edj", path, desk->icon); - icon = buf; + icon = strdup(buf); free(path); } return icon; @@ -373,7 +383,12 @@ if (!ecore_file_exists(buf)) continue; desk = efreet_desktop_get(buf); if (!desk) continue; - if (!strcmp(desk->name, lbl)) break; + if (!strcmp(desk->name, lbl)) + { + efreet_desktop_free(desk); + break; + } + efreet_desktop_free(desk); } return mod; } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_int_menus.c,v retrieving revision 1.219 retrieving revision 1.220 diff -u -3 -r1.219 -r1.220 --- e_int_menus.c 25 Jul 2007 17:00:50 -0000 1.219 +++ e_int_menus.c 26 Jul 2007 11:34:08 -0000 1.220 @@ -545,11 +545,12 @@ if (entry->icon) { - const char *file; + char *file; if (entry->icon[0] == '/') file = entry->icon; else file = efreet_icon_path_find(e_config->icon_theme, entry->icon, "24x24"); e_menu_item_icon_file_set(mi, file); + E_FREE(file); } if (entry->type == EFREET_MENU_ENTRY_SEPARATOR) e_menu_item_separator_set(mi, 1); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_module.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -3 -r1.80 -r1.81 --- e_module.c 25 Jul 2007 17:00:50 -0000 1.80 +++ e_module.c 26 Jul 2007 11:34:08 -0000 1.81 @@ -373,7 +373,7 @@ E_Dialog *dia; E_Border *bd; char buf[PATH_MAX]; - const char *icon = NULL; + char *icon = NULL; dia = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_module_dialog"); if (!dia) return; @@ -393,13 +393,14 @@ { snprintf(buf, sizeof(buf), "%s/%s.edj", e_module_dir_get(m), desktop->icon); - icon = buf; + icon = strdup(buf); } dia->icon_object = e_util_icon_add(icon, e_win_evas_get(dia->win)); edje_extern_object_min_size_set(dia->icon_object, 64, 64); edje_object_part_swallow(dia->bg_object, "e.swallow.icon", dia->icon_object); evas_object_show(dia->icon_object); } + if (desktop) efreet_desktop_free(desktop); } else e_dialog_icon_set(dia, "enlightenment/modules", 64); @@ -413,6 +414,7 @@ bd = dia->win->border; if (!bd) return; bd->internal_icon = evas_stringshare_add(icon); + free(icon); } /* local subsystem functions */ =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_order.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- e_order.c 25 Jul 2007 17:00:50 -0000 1.25 +++ e_order.c 26 Jul 2007 11:34:09 -0000 1.26 @@ -3,6 +3,8 @@ */ #include "e.h" +/* TODO: We need to free out efreet_desktop's! */ + /* local subsystem functions */ static void _e_order_free (E_Order *eo); static void _e_order_cb_monitor (void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -3 -r1.73 -r1.74 --- e_utils.c 24 Jul 2007 17:50:12 -0000 1.73 +++ e_utils.c 26 Jul 2007 11:34:09 -0000 1.74 @@ -852,9 +852,16 @@ if (icon_name[0] == '/') return e_util_icon_add(icon_name, evas); else { - const char *path; + Evas_Object *obj; + char *path; + path = efreet_icon_path_find(e_config->icon_theme, icon_name, size); - if (path) return e_util_icon_add(path, evas); + if (path) + { + obj = e_util_icon_add(path, evas); + free(path); + return obj; + } } return NULL; } @@ -862,11 +869,11 @@ EAPI void e_util_desktop_menu_item_icon_add(Efreet_Desktop *desktop, const char *size, E_Menu_Item *mi) { - const char *path = NULL; + char *path = NULL; if ((!desktop) || (!desktop->icon)) return; - if (desktop->icon[0] == '/') path = desktop->icon; + if (desktop->icon[0] == '/') path = strdup(desktop->icon); else path = efreet_icon_path_find(e_config->icon_theme, desktop->icon, size); if (path) @@ -883,6 +890,7 @@ } else e_menu_item_icon_file_set(mi, path); + free(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