'everything' mo' fix

SVN revision: 48268
This commit is contained in:
Hannes Janetzek 2010-04-24 02:11:14 +00:00
parent 4e1d229714
commit 0ac03dd26b
2 changed files with 26 additions and 19 deletions

View File

@ -117,16 +117,16 @@ _fetch(Evry_Plugin *plugin, const char *input)
int i, cnt = 0; int i, cnt = 0;
Eina_List *items = NULL; Eina_List *items = NULL;
const char *context = NULL; const char *context = NULL;
if (input && !input[0]) input = NULL;
plugin->changed = 1; plugin->changed = 1;
s = p->selector->state;
if (!s || !s->cur_plugins || !s->cur_plugins->next)
return 0;
EVRY_PLUGIN_ITEMS_FREE(p); EVRY_PLUGIN_ITEMS_FREE(p);
s = p->selector->state;
if (!s || !s->cur_plugins)
return 0;
/* get current 'context' ... */ /* get current 'context' ... */
for (i = 1; i < 3; i++) for (i = 1; i < 3; i++)
{ {
@ -138,9 +138,15 @@ _fetch(Evry_Plugin *plugin, const char *input)
} }
} }
lp = s->cur_plugins; if (eina_list_data_find_list(s->cur_plugins, plugin))
lp = s->cur_plugins->next;
else
lp = s->cur_plugins;
if ((lp) && (eina_list_count(lp) == 1)) if (lp && lp->data && lp->data == plugin)
lp = s->cur_plugins->next;
if ((lp) && (!lp->next))
{ {
pp = lp->data; pp = lp->data;
@ -156,7 +162,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
} }
else if (input) else if (input)
{ {
EINA_LIST_FOREACH(lp, l, pp) EINA_LIST_FOREACH(lp, l, pp)
{ {
if (!pp->aggregate) continue; if (!pp->aggregate) continue;

View File

@ -668,6 +668,9 @@ _animator(void *data)
{ {
sd->slide = sd->slide_to; sd->slide = sd->slide_to;
sd->sliding = 0; sd->sliding = 0;
if (sd->view->mode == VIEW_MODE_THUMB &&
sd->cur_item &&sd->cur_item->frame)
edje_object_signal_emit(sd->cur_item->frame, "e,state,selected", "e");
if (sd->clearing) if (sd->clearing)
{ {
@ -784,7 +787,9 @@ _pan_item_select(Evas_Object *obj, Item *it, int scroll)
else else
{ {
if (sd->view->zoom < 2) if (sd->view->zoom < 2)
edje_object_signal_emit(sd->cur_item->frame, "e,state,selected", "e"); {
edje_object_signal_emit(sd->cur_item->frame, "e,state,selected", "e");
}
if ((it->y + it->h) - sd->cy > sd->h) if ((it->y + it->h) - sd->cy > sd->h)
align = it->y - (2 - sd->view->zoom) * it->h; align = it->y - (2 - sd->view->zoom) * it->h;
@ -1057,11 +1062,11 @@ _view_update(Evry_View *view, int slide)
v_it->pos = pos; v_it->pos = pos;
/* TODO no needed */ /* TODO no needed */
/* if (p_it == v->state->cur_item) */ if (p_it == v->state->cur_item)
if (p_it->selected) /* if (p_it->selected) */
{ {
sd->cur_item = v_it; sd->cur_item = v_it;
v_it->selected = EINA_TRUE; v_it->selected = EINA_TRUE;
} }
if (pos > first_vis && pos < last_vis) if (pos > first_vis && pos < last_vis)
@ -1069,21 +1074,17 @@ _view_update(Evry_View *view, int slide)
} }
pos++; pos++;
} }
if (v_items) eina_list_free(v_items);
sd->items = eina_list_sort(sd->items, eina_list_count(sd->items), _sort_cb); sd->items = eina_list_sort(sd->items, -1, _sort_cb);
if (!sd->cur_item && sd->items) sd->cur_item = sd->items->data;
if (update || !last_vis || v->plugin != p) if (update || !last_vis || v->plugin != p)
{ {
v->plugin = p; v->plugin = p;
sd->update = EINA_TRUE; sd->update = EINA_TRUE;
_update_frame(v->span); _update_frame(v->span);
} }
if (v_items) eina_list_free(v_items);
v->tabs->update(v->tabs); v->tabs->update(v->tabs);
if (evry_conf->scroll_animate) if (evry_conf->scroll_animate)