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)
|
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;
|
if (p->items) return 1;
|
||||||
|
|
||||||
|
|
|
@ -59,10 +59,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *item)
|
||||||
static void
|
static void
|
||||||
_list_free(Evry_Plugin *plugin)
|
_list_free(Evry_Plugin *plugin)
|
||||||
{
|
{
|
||||||
Evry_Item *it;
|
|
||||||
|
|
||||||
EINA_LIST_FREE(plugin->items, it)
|
|
||||||
evry_item_free(it);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -80,10 +77,9 @@ static void
|
||||||
_cleanup(Evry_Plugin *plugin)
|
_cleanup(Evry_Plugin *plugin)
|
||||||
{
|
{
|
||||||
PLUGIN(p, plugin);
|
PLUGIN(p, plugin);
|
||||||
/* Plugin *p = (Plugin*) plugin; */
|
|
||||||
Efreet_Desktop *desktop;
|
Efreet_Desktop *desktop;
|
||||||
|
|
||||||
_list_free(plugin);
|
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||||
|
|
||||||
EINA_LIST_FREE(p->apps_mime, desktop)
|
EINA_LIST_FREE(p->apps_mime, desktop)
|
||||||
efreet_desktop_free(desktop);
|
efreet_desktop_free(desktop);
|
||||||
|
@ -236,14 +232,15 @@ static int
|
||||||
_fetch(Evry_Plugin *plugin, const char *input)
|
_fetch(Evry_Plugin *plugin, const char *input)
|
||||||
{
|
{
|
||||||
PLUGIN(p, plugin);
|
PLUGIN(p, plugin);
|
||||||
/* Plugin *p = (Plugin*) plugin; */
|
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Efreet_Desktop *desktop;
|
Efreet_Desktop *desktop;
|
||||||
|
Evry_Item *it;
|
||||||
char *file;
|
char *file;
|
||||||
|
int prio = 0;
|
||||||
|
|
||||||
p->added = eina_hash_string_small_new(NULL);
|
p->added = eina_hash_string_small_new(NULL);
|
||||||
|
|
||||||
_list_free(plugin);
|
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||||
|
|
||||||
/* add apps for a given mimetype */
|
/* add apps for a given mimetype */
|
||||||
if (plugin->type == type_action)
|
if (plugin->type == type_action)
|
||||||
|
@ -340,20 +337,14 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
||||||
|
|
||||||
eina_hash_free(p->added);
|
eina_hash_free(p->added);
|
||||||
|
|
||||||
if (plugin->items)
|
if (!plugin->items) return 0;
|
||||||
{
|
|
||||||
int prio = 0;
|
|
||||||
Evry_Item *it;
|
|
||||||
|
|
||||||
l = plugin->items;
|
EVRY_PLUGIN_ITEMS_SORT(plugin, _cb_sort);
|
||||||
plugin->items = eina_list_sort(l, eina_list_count(l), _cb_sort);
|
|
||||||
EINA_LIST_FOREACH(plugin->items, l, it)
|
|
||||||
it->priority = prio++;
|
|
||||||
|
|
||||||
return 1;
|
EINA_LIST_FOREACH(plugin->items, l, it)
|
||||||
}
|
it->priority = prio++;
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
|
|
|
@ -134,14 +134,11 @@ _fetch(Evry_Plugin *p, const char *input)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->items)
|
if (!p->items) return 0;
|
||||||
{
|
|
||||||
p->items = eina_list_sort(p->items, eina_list_count(p->items), _cb_sort);
|
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
|
|
|
@ -171,13 +171,11 @@ _fetch(Evry_Plugin *p, const char *input)
|
||||||
_act_cb_border_close,
|
_act_cb_border_close,
|
||||||
"window-close", input);
|
"window-close", input);
|
||||||
|
|
||||||
if (eina_list_count(p->items) > 0)
|
if (!p->items) return 0;
|
||||||
{
|
|
||||||
p->items = eina_list_sort(p->items, eina_list_count(p->items), _cb_sort);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -96,7 +96,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *item)
|
||||||
p->base.items = NULL;
|
p->base.items = NULL;
|
||||||
p->file = file;
|
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;
|
it->browseable = EINA_TRUE;
|
||||||
|
|
||||||
p->items = eina_list_append(p->items, it);
|
p->items = eina_list_append(p->items, it);
|
||||||
|
@ -170,7 +170,7 @@ _action(Evry_Plugin *plugin, const Evry_Item *item)
|
||||||
{
|
{
|
||||||
PLUGIN(p, plugin);
|
PLUGIN(p, plugin);
|
||||||
|
|
||||||
if (p->prev)
|
if (p->prev && p->prev->file)
|
||||||
{
|
{
|
||||||
Import *import;
|
Import *import;
|
||||||
Item *it = (Item*) item;
|
Item *it = (Item*) item;
|
||||||
|
|
Loading…
Reference in New Issue