forked from enlightenment/enlightenment
free ctx action list as we add so we don't have to loop twice
SVN revision: 75766
This commit is contained in:
parent
adc7b0bd98
commit
45803968c5
|
@ -8441,8 +8441,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
|
||||||
if (l)
|
if (l)
|
||||||
{
|
{
|
||||||
_e_fm2_icon_realpath(ic, buf, sizeof(buf));
|
_e_fm2_icon_realpath(ic, buf, sizeof(buf));
|
||||||
_e_fm2_context_menu_append(obj, buf, l, mn, ic);
|
_e_fm2_context_menu_append(obj, buf, l, mn, ic); // frees l
|
||||||
eina_list_free(l);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8455,8 +8454,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
|
||||||
if (l)
|
if (l)
|
||||||
{
|
{
|
||||||
_e_fm2_icon_realpath(ic, buf, sizeof(buf));
|
_e_fm2_icon_realpath(ic, buf, sizeof(buf));
|
||||||
_e_fm2_context_menu_append(obj, buf, l, mn, ic);
|
_e_fm2_context_menu_append(obj, buf, l, mn, ic); // frees l
|
||||||
eina_list_free(l);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8494,14 +8492,13 @@ static void
|
||||||
_e_fm2_context_menu_append(Evas_Object *obj, const char *path, Eina_List *l, E_Menu *mn, E_Fm2_Icon *ic)
|
_e_fm2_context_menu_append(Evas_Object *obj, const char *path, Eina_List *l, E_Menu *mn, E_Fm2_Icon *ic)
|
||||||
{
|
{
|
||||||
E_Fm2_Mime_Handler *handler;
|
E_Fm2_Mime_Handler *handler;
|
||||||
const Eina_List *ll;
|
|
||||||
Eina_Bool added = EINA_FALSE;
|
Eina_Bool added = EINA_FALSE;
|
||||||
|
|
||||||
if (!l) return;
|
if (!l) return;
|
||||||
|
|
||||||
l = eina_list_sort(l, -1, _e_fm2_context_list_sort);
|
l = eina_list_sort(l, -1, _e_fm2_context_list_sort);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(l, ll, handler)
|
EINA_LIST_FREE(l, handler)
|
||||||
{
|
{
|
||||||
E_Fm2_Context_Menu_Data *md = NULL;
|
E_Fm2_Context_Menu_Data *md = NULL;
|
||||||
E_Menu_Item *mi;
|
E_Menu_Item *mi;
|
||||||
|
|
Loading…
Reference in New Issue