Enlightenment CVS committal Author : devilhorns Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_fm.c Log Message: Don't evas_list_free the returned mime handlers list. This fixes bug #255 =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v retrieving revision 1.224 retrieving revision 1.225 diff -u -3 -r1.224 -r1.225 --- e_fm.c 27 Oct 2007 15:55:27 -0000 1.224 +++ e_fm.c 28 Oct 2007 18:44:24 -0000 1.225 @@ -6447,18 +6447,23 @@ { /* see if we have any mime handlers registered for this file */ l = e_fm2_mime_handler_mime_handlers_get(ic->info.mime); - snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, ic->info.file); - _e_fm2_context_menu_append(obj, buf, l, mn, ic); - if (l) evas_list_free(l); + if (l) + { + snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, ic->info.file); + _e_fm2_context_menu_append(obj, buf, l, mn, ic); + } } /* see if we have any glob handlers registered for this file */ snprintf(buf, sizeof(buf), "*%s", strrchr(ic->info.file, '.')); l = e_fm2_mime_handler_glob_handlers_get(buf); - snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, ic->info.file); - _e_fm2_context_menu_append(obj, buf, l, mn, ic); - if (l) evas_list_free(l); - + if (l) + { + snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, ic->info.file); + _e_fm2_context_menu_append(obj, buf, l, mn, ic); + evas_list_free(l); + } + if (sd->icon_menu.end.func) sd->icon_menu.end.func(sd->icon_menu.end.data, sd->obj, mn, &(ic->info)); } @@ -6493,20 +6498,20 @@ _e_fm2_context_menu_append(Evas_Object *obj, const char *path, Evas_List *l, E_Menu *mn, E_Fm2_Icon *ic) { Evas_List *ll = NULL; - E_Menu_Item *mi; if (!l) return; - + l = evas_list_sort(l, -1, _e_fm2_context_list_sort); - + for (ll = l; ll; ll = ll->next) { E_Fm2_Mime_Handler *handler = NULL; E_Fm2_Context_Menu_Data *md = NULL; - - handler = ll->data; - if ((!handler) || (!e_fm2_mime_handler_test(handler, obj, path))) continue; + E_Menu_Item *mi; + handler = ll->data; + if ((!handler) || (!e_fm2_mime_handler_test(handler, obj, path)) || + (!handler->label)) continue; if (ll == l) { /* only append the separator if this is the first item */ @@ -6518,10 +6523,9 @@ md = E_NEW(E_Fm2_Context_Menu_Data, 1); if (!md) continue; - _e_fm2_menu_contexts = evas_list_append(_e_fm2_menu_contexts, md); - md->icon = ic; md->handler = handler; + _e_fm2_menu_contexts = evas_list_append(_e_fm2_menu_contexts, md); mi = e_menu_item_new(mn); e_menu_item_label_set(mi, handler->label); ------------------------------------------------------------------------- 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