e17/evry: dont update selector when changed plugin is not in current state

SVN revision: 63024
This commit is contained in:
Hannes Janetzek 2011-08-31 11:12:56 +00:00
parent 29519a82a2
commit 8e3724f95d
1 changed files with 39 additions and 28 deletions

View File

@ -642,37 +642,41 @@ evry_plugin_update(Evry_Plugin *p, int action)
_evry_plugin_list_insert(s, p); _evry_plugin_list_insert(s, p);
} }
_evry_aggregator_fetch(s); if (sel->state == s)
/* select first plugin */
if ((!s->plugin) || (s->plugin_auto_selected) ||
!(eina_list_data_find(s->cur_plugins, s->plugin)))
{ {
_evry_plugin_select(s, NULL); _evry_aggregator_fetch(s);
}
if ((s->plugin && (sel->state == s)) && /* select first plugin */
/* plugin is current */ if ((!s->plugin) || (s->plugin_auto_selected) ||
((s->plugin == p) || !(eina_list_data_find(s->cur_plugins, s->plugin)))
/* plugin items are shown in aggregator */ {
((s->plugin == s->aggregator) && p->config->aggregate))) _evry_plugin_select(s, NULL);
{ }
_evry_selector_update(sel);
if (_evry_view_update(win, s)) if ((s->plugin && (sel->state == s)) &&
/* XXX when there is a case where view disappears /* plugin is current */
check this one! is swallow always visible ? */ ((s->plugin == p) ||
_evry_view_show(win, s->view, 0); /* plugin items are shown in aggregator */
} ((s->plugin == s->aggregator) && p->config->aggregate)))
{
_evry_selector_update(sel);
/* switch back to subject selector when no current items */ if (_evry_view_update(win, s))
if ((sel == SUBJ_SEL) && /* XXX when there is a case where view disappears
(!(s->plugin) || !(s->plugin->items)) && check this one! is swallow always visible ? */
(CUR_SEL == ACTN_SEL)) _evry_view_show(win, s->view, 0);
{ }
_evry_selectors_switch(win, -1);
_evry_clear(SUBJ_SEL); /* switch back to subject selector when no current items */
if ((sel == SUBJ_SEL) &&
(!(s->plugin) || !(s->plugin->items)) &&
(CUR_SEL == ACTN_SEL))
{
_evry_selectors_switch(win, -1);
_evry_clear(SUBJ_SEL);
}
} }
} }
else if (action == EVRY_UPDATE_REFRESH) else if (action == EVRY_UPDATE_REFRESH)
{ {
@ -1725,7 +1729,9 @@ evry_browse_back(Evry_Selector *sel)
_evry_state_pop(sel, 0); _evry_state_pop(sel, 0);
s = sel->state; s = sel->state;
/* _evry_aggregator_fetch(s); */ /* _evry_aggregator_fetch(s); */
_evry_selector_update(sel); _evry_selector_update(sel);
if (sel == SUBJ_SEL) if (sel == SUBJ_SEL)
_evry_selector_update_actions(ACTN_SEL); _evry_selector_update_actions(ACTN_SEL);
@ -2548,8 +2554,7 @@ _evry_state_clear(Evry_Window *win)
if (s->delete_me) if (s->delete_me)
{ {
if (s->view) if (s->view) s->view->destroy(s->view);
s->view->destroy(s->view);
s->clear_timer = NULL; s->clear_timer = NULL;
E_FREE(s->inp); E_FREE(s->inp);
E_FREE(s); E_FREE(s);
@ -2573,6 +2578,12 @@ _evry_state_clear(Evry_Window *win)
static void static void
_evry_view_hide(Evry_Window *win, Evry_View *v, int slide) _evry_view_hide(Evry_Window *win, Evry_View *v, int slide)
{ {
if (v->state->delete_me)
{
_evry_state_clear(win);
return;
}
_evry_state_clear(win); _evry_state_clear(win);
if (!v) return; if (!v) return;