forked from enlightenment/enlightenment
'everything' module: fix segv in wallpaper module
- cleanups SVN revision: 41934
This commit is contained in:
parent
b851ab4fc9
commit
c950586507
|
@ -105,7 +105,7 @@ _fetch(Evry_Plugin *p, const char *input)
|
|||
}
|
||||
|
||||
if (input)
|
||||
p->items = eina_list_sort(p->items, eina_list_count(p->items), _cb_sort);
|
||||
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
||||
|
||||
if (p->items) return 1;
|
||||
|
||||
|
|
|
@ -59,10 +59,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *item)
|
|||
static void
|
||||
_list_free(Evry_Plugin *plugin)
|
||||
{
|
||||
Evry_Item *it;
|
||||
|
||||
EINA_LIST_FREE(plugin->items, it)
|
||||
evry_item_free(it);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -80,10 +77,9 @@ static void
|
|||
_cleanup(Evry_Plugin *plugin)
|
||||
{
|
||||
PLUGIN(p, plugin);
|
||||
/* Plugin *p = (Plugin*) plugin; */
|
||||
Efreet_Desktop *desktop;
|
||||
|
||||
_list_free(plugin);
|
||||
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||
|
||||
EINA_LIST_FREE(p->apps_mime, desktop)
|
||||
efreet_desktop_free(desktop);
|
||||
|
@ -236,14 +232,15 @@ static int
|
|||
_fetch(Evry_Plugin *plugin, const char *input)
|
||||
{
|
||||
PLUGIN(p, plugin);
|
||||
/* Plugin *p = (Plugin*) plugin; */
|
||||
Eina_List *l;
|
||||
Efreet_Desktop *desktop;
|
||||
Evry_Item *it;
|
||||
char *file;
|
||||
int prio = 0;
|
||||
|
||||
p->added = eina_hash_string_small_new(NULL);
|
||||
|
||||
_list_free(plugin);
|
||||
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||
|
||||
/* add apps for a given mimetype */
|
||||
if (plugin->type == type_action)
|
||||
|
@ -340,20 +337,14 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
|
||||
eina_hash_free(p->added);
|
||||
|
||||
if (plugin->items)
|
||||
{
|
||||
int prio = 0;
|
||||
Evry_Item *it;
|
||||
if (!plugin->items) return 0;
|
||||
|
||||
l = plugin->items;
|
||||
plugin->items = eina_list_sort(l, eina_list_count(l), _cb_sort);
|
||||
EINA_LIST_FOREACH(plugin->items, l, it)
|
||||
it->priority = prio++;
|
||||
EVRY_PLUGIN_ITEMS_SORT(plugin, _cb_sort);
|
||||
|
||||
return 1;
|
||||
}
|
||||
EINA_LIST_FOREACH(plugin->items, l, it)
|
||||
it->priority = prio++;
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
|
|
@ -134,14 +134,11 @@ _fetch(Evry_Plugin *p, const char *input)
|
|||
}
|
||||
}
|
||||
|
||||
if (p->items)
|
||||
{
|
||||
p->items = eina_list_sort(p->items, eina_list_count(p->items), _cb_sort);
|
||||
if (!p->items) return 0;
|
||||
|
||||
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
|
|
@ -171,13 +171,11 @@ _fetch(Evry_Plugin *p, const char *input)
|
|||
_act_cb_border_close,
|
||||
"window-close", input);
|
||||
|
||||
if (eina_list_count(p->items) > 0)
|
||||
{
|
||||
p->items = eina_list_sort(p->items, eina_list_count(p->items), _cb_sort);
|
||||
return 1;
|
||||
}
|
||||
if (!p->items) return 0;
|
||||
|
||||
return 0;
|
||||
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -96,7 +96,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *item)
|
|||
p->base.items = NULL;
|
||||
p->file = file;
|
||||
|
||||
it = evry_item_new(NULL, plugin, _("Set as Wallpaper"), NULL);
|
||||
it = evry_item_new(NULL, EVRY_PLUGIN(p), _("Set as Wallpaper"), NULL);
|
||||
it->browseable = EINA_TRUE;
|
||||
|
||||
p->items = eina_list_append(p->items, it);
|
||||
|
@ -170,7 +170,7 @@ _action(Evry_Plugin *plugin, const Evry_Item *item)
|
|||
{
|
||||
PLUGIN(p, plugin);
|
||||
|
||||
if (p->prev)
|
||||
if (p->prev && p->prev->file)
|
||||
{
|
||||
Import *import;
|
||||
Item *it = (Item*) item;
|
||||
|
|
Loading…
Reference in New Issue