forked from enlightenment/enlightenment
'everything'
- improve the history sort - cleanups SVN revision: 42120
This commit is contained in:
parent
25b3f68249
commit
6d7d2889f5
|
@ -415,7 +415,7 @@ evry_plugin_async_update(Evry_Plugin *p, int action)
|
|||
if (s->plugin_auto_selected)
|
||||
_evry_plugin_select(s, agg);
|
||||
}
|
||||
agg->fetch(agg, s->input);
|
||||
agg->fetch(agg, s->input[0] ? s->input : NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1592,10 +1592,12 @@ _evry_matches_update(Evry_Selector *sel, int async)
|
|||
Eina_List *l;
|
||||
const char *input;
|
||||
|
||||
/* TODO cleanup plugins */
|
||||
EINA_LIST_FREE(s->cur_plugins, p);
|
||||
|
||||
if (strlen(s->input) > 0)
|
||||
input = s->input;
|
||||
/* if (strlen(s->input) > 0) */
|
||||
if (s->input[0])
|
||||
input = s->input;
|
||||
else
|
||||
input = NULL;
|
||||
|
||||
|
@ -1636,7 +1638,7 @@ _evry_matches_update(Evry_Selector *sel, int async)
|
|||
if (eina_list_count(s->cur_plugins) > 0)
|
||||
{
|
||||
s->cur_plugins = eina_list_prepend(s->cur_plugins, sel->aggregator);
|
||||
sel->aggregator->fetch(sel->aggregator, s->input);
|
||||
sel->aggregator->fetch(sel->aggregator, input);
|
||||
if (s->plugin_auto_selected)
|
||||
_evry_plugin_select(s, NULL);
|
||||
}
|
||||
|
|
|
@ -281,7 +281,6 @@ evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input)
|
|||
Eina_List *l;
|
||||
int cnt = 1;
|
||||
int matched;
|
||||
double now = ecore_time_get();
|
||||
|
||||
if (it->id)
|
||||
id = it->id;
|
||||
|
@ -296,7 +295,7 @@ evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input)
|
|||
{
|
||||
if (hi->plugin == it->plugin->name)
|
||||
{
|
||||
if ((!input[0]) || (!input[0] && !hi->input))
|
||||
if ((!input) || (!input && !hi->input))
|
||||
{
|
||||
cnt++;
|
||||
it->usage = hi->last_used;
|
||||
|
@ -319,7 +318,7 @@ evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input)
|
|||
if (matched) cnt++;
|
||||
}
|
||||
|
||||
it->usage += (double) hi->count * (hi->last_used / now);
|
||||
it->usage *= (double) hi->count;
|
||||
}
|
||||
}
|
||||
if (it->usage)
|
||||
|
|
|
@ -109,7 +109,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
/* first is aggregator itself */
|
||||
lp = s->cur_plugins->next;
|
||||
|
||||
if (input[0])
|
||||
if (input)
|
||||
{
|
||||
EINA_LIST_FOREACH(lp, l, pp)
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
}
|
||||
|
||||
/* always append items of action or object selector */
|
||||
if (!input[0] &&
|
||||
if ((!input) &&
|
||||
((p->selector == selectors[1]) ||
|
||||
(p->selector == selectors[2])))
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
|
||||
if (items) eina_list_free(items);
|
||||
|
||||
if (input[0])
|
||||
if (input)
|
||||
{
|
||||
EVRY_PLUGIN_ITEMS_SORT(p, _cb_sort);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue