diff --git a/src/modules/everything-files/e_mod_main.c b/src/modules/everything-files/e_mod_main.c index b19945b6b..423a3df02 100644 --- a/src/modules/everything-files/e_mod_main.c +++ b/src/modules/everything-files/e_mod_main.c @@ -6,6 +6,7 @@ #include "e_mod_main.h" #define MAX_ITEMS 50 +#define MAX_SHOWN 500 #define TERM_ACTION_DIR "%s" typedef struct _Plugin Plugin; @@ -147,8 +148,7 @@ _scan_func(void *data) d->files = eina_list_append(d->files, file); - if (cnt > MAX_ITEMS) - break; + if (cnt > MAX_ITEMS) break; } } @@ -209,11 +209,10 @@ _scan_end_func(void *data) 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) { @@ -254,17 +253,26 @@ _scan_end_func(void *data) 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); } @@ -491,11 +499,9 @@ _fetch(Evry_Plugin *plugin, const char *input) 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) @@ -525,7 +531,6 @@ _icon_get(Evry_Plugin *p __UNUSED__, const Evry_Item *it, Evas *e) return o; } - static int _open_folder_check(Evry_Action *act __UNUSED__, const Evry_Item *it) { diff --git a/src/modules/everything/e_mod_main.c b/src/modules/everything/e_mod_main.c index d69318958..61a22fb95 100644 --- a/src/modules/everything/e_mod_main.c +++ b/src/modules/everything/e_mod_main.c @@ -248,14 +248,6 @@ _config_init() 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; */ } @@ -395,13 +387,10 @@ evry_plugin_new(Evry_Plugin *base, const char *name, const char *label, int type 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; @@ -425,8 +414,6 @@ evry_plugin_free(Evry_Plugin *p, int free_pointer) 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); @@ -504,12 +491,8 @@ evry_plugin_register(Evry_Plugin *p, int priority) 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), diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c index aa0fb40c1..71c3863aa 100644 --- a/src/modules/everything/evry.c +++ b/src/modules/everything/evry.c @@ -1313,6 +1313,8 @@ _evry_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event) Evry_State *s = selector->state; const char *key = NULL, *old; + if (!s) return 1; + win->request_selection = EINA_FALSE; ev = event; diff --git a/src/modules/everything/evry_plug_view_thumb.c b/src/modules/everything/evry_plug_view_thumb.c index d7b28c643..5bd8cbf30 100644 --- a/src/modules/everything/evry_plug_view_thumb.c +++ b/src/modules/everything/evry_plug_view_thumb.c @@ -286,12 +286,12 @@ _e_smart_reconfigure_do(void *data) sd->cy = 0; redo = 1; } - if (redo) - { - recursion = 1; - _e_smart_reconfigure_do(obj); - recursion = 0; - } + /* if (redo) + * { + * recursion = 1; + * _e_smart_reconfigure_do(obj); + * recursion = 0; + * } */ changed = 1; } @@ -778,7 +778,7 @@ _pan_item_select(Evas_Object *obj, Item *it, int scroll) align = (cur - dist); } } - + /* edje_object_signal_emit(sd->cur_item->frame, "e,state,selected", "e"); */ align *= it->h; } else