'everything' fix bug in sorting of 'all' list.
- added 'subtype' to Evry_Item SVN revision: 48125
This commit is contained in:
parent
f578d2218f
commit
90517199bc
|
@ -255,8 +255,8 @@ _scan_end_func(void *data)
|
||||||
evry_util_file_detail_set(file);
|
evry_util_file_detail_set(file);
|
||||||
|
|
||||||
if (cnt >= MAX_ITEMS) continue;
|
if (cnt >= MAX_ITEMS) continue;
|
||||||
|
|
||||||
cnt += _append_file(p, file);
|
cnt += _append_file(p, file);
|
||||||
|
item->priority = cnt;
|
||||||
}
|
}
|
||||||
if (d->files)
|
if (d->files)
|
||||||
p->thread = ecore_thread_run(_scan_func, _scan_end_func, _scan_cancel_func, d);
|
p->thread = ecore_thread_run(_scan_func, _scan_end_func, _scan_cancel_func, d);
|
||||||
|
@ -264,6 +264,7 @@ _scan_end_func(void *data)
|
||||||
E_FREE(d);
|
E_FREE(d);
|
||||||
|
|
||||||
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
||||||
|
|
||||||
evry_plugin_async_update(EVRY_PLUGIN(p), EVRY_ASYNC_UPDATE_ADD);
|
evry_plugin_async_update(EVRY_PLUGIN(p), EVRY_ASYNC_UPDATE_ADD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,11 +488,14 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
||||||
else
|
else
|
||||||
p->input = eina_stringshare_add(input);
|
p->input = eina_stringshare_add(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(p->files, l, file)
|
EINA_LIST_FOREACH(p->files, l, file)
|
||||||
{
|
{
|
||||||
if (cnt >= MAX_ITEMS);
|
if (cnt <= MAX_ITEMS)
|
||||||
cnt += _append_file(p, file);
|
{
|
||||||
|
cnt += _append_file(p, file);
|
||||||
|
EVRY_ITEM(file)->priority = cnt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EVRY_PLUGIN(p)->items)
|
if (!EVRY_PLUGIN(p)->items)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
#define EVRY_API_VERSION 3
|
#define EVRY_API_VERSION 4
|
||||||
|
|
||||||
#define EVRY_ACTION_OTHER 0
|
#define EVRY_ACTION_OTHER 0
|
||||||
#define EVRY_ACTION_FINISHED 1
|
#define EVRY_ACTION_FINISHED 1
|
||||||
|
@ -136,6 +136,9 @@ struct _Evry_Item
|
||||||
* was performed on a file with a specific mimetype */
|
* was performed on a file with a specific mimetype */
|
||||||
const char *context;
|
const char *context;
|
||||||
|
|
||||||
|
/* optional */
|
||||||
|
const char *subtype;
|
||||||
|
|
||||||
/* do not set by plugin! */
|
/* do not set by plugin! */
|
||||||
Evry_Item *next;
|
Evry_Item *next;
|
||||||
Eina_Bool selected;
|
Eina_Bool selected;
|
||||||
|
|
|
@ -309,7 +309,7 @@ evry_item_new(Evry_Item *base, Evry_Plugin *p, const char *label, void (*cb_free
|
||||||
it->free = cb_free;
|
it->free = cb_free;
|
||||||
|
|
||||||
it->ref = 1;
|
it->ref = 1;
|
||||||
it->usage = -1;
|
/* it->usage = -1; */
|
||||||
|
|
||||||
#ifdef CHECK_REFS
|
#ifdef CHECK_REFS
|
||||||
item_cnt++;
|
item_cnt++;
|
||||||
|
|
|
@ -41,7 +41,12 @@ _cb_sort_recent(const void *data1, const void *data2)
|
||||||
(it2->plugin->config->priority + it2->priority));
|
(it2->plugin->config->priority + it2->priority));
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
if (it1->plugin == it2->plugin)
|
||||||
|
return (it1->priority - it2->priority);
|
||||||
|
|
||||||
|
return strcmp(it1->label, it2->label);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -72,7 +77,7 @@ _cb_sort(const void *data1, const void *data2)
|
||||||
if ((it1->plugin == it2->plugin) &&
|
if ((it1->plugin == it2->plugin) &&
|
||||||
(it1->priority - it2->priority))
|
(it1->priority - it2->priority))
|
||||||
return (it1->priority - it2->priority);
|
return (it1->priority - it2->priority);
|
||||||
|
|
||||||
if (it1->fuzzy_match || it2->fuzzy_match)
|
if (it1->fuzzy_match || it2->fuzzy_match)
|
||||||
{
|
{
|
||||||
if (it1->fuzzy_match && !it2->fuzzy_match)
|
if (it1->fuzzy_match && !it2->fuzzy_match)
|
||||||
|
@ -88,8 +93,8 @@ _cb_sort(const void *data1, const void *data2)
|
||||||
if (it1->plugin->config->priority - it2->plugin->config->priority)
|
if (it1->plugin->config->priority - it2->plugin->config->priority)
|
||||||
return (it1->plugin->config->priority - it2->plugin->config->priority);
|
return (it1->plugin->config->priority - it2->plugin->config->priority);
|
||||||
|
|
||||||
if (it1->priority - it2->priority)
|
/* if (it1->priority - it2->priority)
|
||||||
return (it1->priority - it2->priority);
|
* return (it1->priority - it2->priority); */
|
||||||
|
|
||||||
return strcasecmp(it1->label, it2->label);
|
return strcasecmp(it1->label, it2->label);
|
||||||
}
|
}
|
||||||
|
@ -138,6 +143,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
||||||
* if (!plugin->changed)
|
* if (!plugin->changed)
|
||||||
* return 1; */
|
* return 1; */
|
||||||
/* printf("aggreator changed\n"); */
|
/* printf("aggreator changed\n"); */
|
||||||
|
|
||||||
|
|
||||||
EVRY_PLUGIN_ITEMS_FREE(p);
|
EVRY_PLUGIN_ITEMS_FREE(p);
|
||||||
|
|
||||||
|
|
|
@ -717,7 +717,7 @@ _pan_item_select(Evas_Object *obj, Item *it, int scroll)
|
||||||
{
|
{
|
||||||
double now = ecore_time_get();
|
double now = ecore_time_get();
|
||||||
|
|
||||||
if (now - sd->last_select < 0.05 && sd->sel_pos == sd->sel_pos_to)
|
if (now - sd->last_select < 0.1 && sd->sel_pos == sd->sel_pos_to)
|
||||||
{
|
{
|
||||||
sd->scroll_align = sd->scroll_align_to;
|
sd->scroll_align = sd->scroll_align_to;
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,6 @@ _tabs_update(Tab_View *v)
|
||||||
v->timer = ecore_timer_add(0.1, _timer_cb, v);
|
v->timer = ecore_timer_add(0.1, _timer_cb, v);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("width %d\n", w);
|
|
||||||
|
|
||||||
/* remove tabs for not active plugins */
|
/* remove tabs for not active plugins */
|
||||||
e_box_freeze(v->o_tabs);
|
e_box_freeze(v->o_tabs);
|
||||||
|
|
Loading…
Reference in New Issue