#include "e_mod_main.h"
#define MAX_ITEMS 50
+#define MAX_SHOWN 500
#define TERM_ACTION_DIR "%s"
typedef struct _Plugin Plugin;
d->files = eina_list_append(d->files, file);
- if (cnt > MAX_ITEMS)
- break;
+ if (cnt > MAX_ITEMS) break;
}
}
Evry_Item *item;
Evry_Item_File *f;
char *filename, *path, *mime;
- int cnt = eina_list_count(p->base.items);
+ int cnt = 0;
Eina_List *l;
p->thread = NULL;
-
EINA_LIST_FREE(d->files, item)
{
evry_util_file_detail_set(file);
- if (cnt >= MAX_ITEMS) continue;
- cnt += _append_file(p, file);
- item->priority = cnt;
+ /* if (cnt >= MAX_ITEMS) continue;
+ * cnt += _append_file(p, file);
+ * item->priority = cnt; */
}
if (d->files)
p->thread = ecore_thread_run(_scan_func, _scan_end_func, _scan_cancel_func, d);
else
E_FREE(d);
-
- EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
+ p->files = eina_list_sort(p->files, -1, _cb_sort);
+
+ EVRY_PLUGIN_ITEMS_CLEAR(p);
+
+ EINA_LIST_FOREACH(p->files, l, f)
+ {
+ if (cnt >= MAX_SHOWN) break;
+ cnt += _append_file(p, f);
+ EVRY_ITEM(f)->priority = cnt;
+ }
+
evry_plugin_async_update(EVRY_PLUGIN(p), EVRY_ASYNC_UPDATE_ADD);
}
EINA_LIST_FOREACH(p->files, l, file)
{
- if (cnt <= MAX_ITEMS)
- {
- cnt += _append_file(p, file);
- EVRY_ITEM(file)->priority = cnt;
- }
+ if (cnt >= MAX_SHOWN) break;
+ cnt += _append_file(p, file);
+ EVRY_ITEM(file)->priority = cnt;
}
if (!EVRY_PLUGIN(p)->items)
return o;
}
-
static int
_open_folder_check(Evry_Action *act __UNUSED__, const Evry_Item *it)
{
evry_conf->cycle_mode = 0;
evry_conf->history_sort_mode = 0;
}
-
-
- /* if (evry_conf->conf_subjects) eina_list_free(evry_conf->conf_subjects);
- * if (evry_conf->conf_actions) eina_list_free(evry_conf->conf_actions);
- * if (evry_conf->conf_objects) eina_list_free(evry_conf->conf_objects);
- * evry_conf->conf_subjects = NULL;
- * evry_conf->conf_actions = NULL;
- * evry_conf->conf_objects = NULL; */
}
p->type = type;
p->type_in = (type_in ? eina_stringshare_add(type_in) : NULL);
p->type_out = (type_out ? eina_stringshare_add(type_out) : NULL);
- /* p->trigger = (trigger ? eina_stringshare_add(trigger) : NULL); */
- /* p->icon = (icon ? eina_stringshare_add(icon) : NULL); */
p->begin = begin;
p->cleanup = cleanup;
p->fetch = fetch;
p->icon_get = icon_get;
- /* p->action = action; */
p->aggregate = EINA_TRUE;
p->async_fetch = EINA_FALSE;
p->free = cb_free;
if (p->label) eina_stringshare_del(p->label);
if (p->type_in) eina_stringshare_del(p->type_in);
if (p->type_out) eina_stringshare_del(p->type_out);
- /* if (p->trigger) eina_stringshare_del(p->trigger); */
- /* if (p->icon) eina_stringshare_del(p->icon); */
if (p->free)
p->free(p);
pc->priority = priority ? priority : 100;;
pc->plugin = p;
confs = eina_list_append(confs, pc);
- /* return NULL */
}
- /* if (plugin->trigger && !pc->trigger)
- * pc->trigger = eina_stringshare_add(plugin->trigger); */
-
p->config = pc;
evry_conf->plugins = eina_list_sort(evry_conf->plugins,
eina_list_count(evry_conf->plugins),