forked from enlightenment/enlightenment
- show plugin actions for non-toplevel plugins
- fix alt+w shortcut for 'return' SVN revision: 49165
This commit is contained in:
parent
3aec0866d3
commit
131a5b9fca
|
@ -261,6 +261,12 @@ _check_border(Evry_Action *act, const Evry_Item *it)
|
|||
E_Border *bd = bi->border;
|
||||
E_Zone *zone = e_util_zone_current_get(e_manager_current_get());
|
||||
|
||||
if (!bd)
|
||||
{
|
||||
ERR("no border");
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case BORDER_CLOSE:
|
||||
|
@ -302,6 +308,12 @@ _act_border(Evry_Action *act)
|
|||
E_Zone *zone = e_util_zone_current_get(e_manager_current_get());
|
||||
int focus = 0;
|
||||
|
||||
if (!bd)
|
||||
{
|
||||
ERR("no border");
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case BORDER_CLOSE:
|
||||
|
|
|
@ -1677,8 +1677,7 @@ evry_selectors_switch(int dir)
|
|||
|
||||
if ((CUR_SEL)->update_timer)
|
||||
{
|
||||
if ((CUR_SEL == SUBJ_SEL) ||
|
||||
(CUR_SEL == ACTN_SEL))
|
||||
if ((CUR_SEL == SUBJ_SEL) || (CUR_SEL == ACTN_SEL))
|
||||
{
|
||||
_evry_matches_update(CUR_SEL, 0);
|
||||
_evry_selector_update(CUR_SEL);
|
||||
|
@ -1894,6 +1893,7 @@ _evry_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
else if (!strcmp(ev->key, "w"))
|
||||
{
|
||||
ev->key = "Return";
|
||||
ev->modifiers = 0;
|
||||
}
|
||||
else if (evry_conf->quick_nav == 1)
|
||||
{
|
||||
|
|
|
@ -62,31 +62,33 @@ _begin(Evry_Plugin *plugin, const Evry_Item *it)
|
|||
|
||||
GET_PLUGIN(p, plugin);
|
||||
|
||||
if (CHECK_TYPE(it, EVRY_TYPE_PLUGIN))
|
||||
return NULL;
|
||||
|
||||
EINA_LIST_FOREACH(evry_conf->actions, l, act)
|
||||
if (!(CHECK_TYPE(it, EVRY_TYPE_PLUGIN)))
|
||||
{
|
||||
if (((!act->it1.type) ||
|
||||
(CHECK_TYPE(it, act->it1.type)) ||
|
||||
(CHECK_SUBTYPE(it, act->it1.type))) &&
|
||||
(!act->check_item || act->check_item(act, it)))
|
||||
EINA_LIST_FOREACH(evry_conf->actions, l, act)
|
||||
{
|
||||
/* if (act->base.plugin) */
|
||||
if (!((!act->it1.type) ||
|
||||
(CHECK_TYPE(it, act->it1.type)) ||
|
||||
(CHECK_SUBTYPE(it, act->it1.type))))
|
||||
{
|
||||
p->actions = eina_list_remove(p->actions, act);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (act->check_item && !(act->check_item(act, it)))
|
||||
{
|
||||
p->actions = eina_list_remove(p->actions, act);
|
||||
continue;
|
||||
}
|
||||
|
||||
act->base.plugin = plugin;
|
||||
act->it1.item = it;
|
||||
EVRY_ITEM(act)->hi = NULL;
|
||||
|
||||
if (!eina_list_data_find_list(p->actions, act))
|
||||
{
|
||||
act->it1.item = it;
|
||||
EVRY_ITEM(act)->hi = NULL;
|
||||
p->actions = eina_list_append(p->actions, act);
|
||||
}
|
||||
continue;
|
||||
p->actions = eina_list_append(p->actions, act);
|
||||
}
|
||||
p->actions = eina_list_remove(p->actions, act);
|
||||
}
|
||||
|
||||
/* FIXME this requires plugins to always provide an item..*/
|
||||
if (it->plugin)
|
||||
{
|
||||
EINA_LIST_FOREACH(it->plugin->actions, l, act)
|
||||
|
@ -101,7 +103,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *it)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!p->actions) return NULL;
|
||||
|
||||
return plugin;
|
||||
|
@ -294,9 +296,9 @@ evry_action_free(Evry_Action *act)
|
|||
Evry_Action *
|
||||
evry_action_find(const char *name)
|
||||
{
|
||||
Evry_Action *act = NULL;
|
||||
Evry_Action *act = NULL;
|
||||
Eina_List *l;
|
||||
|
||||
|
||||
const char *n = eina_stringshare_add(name);
|
||||
|
||||
EINA_LIST_FOREACH(evry_conf->actions, l, act)
|
||||
|
@ -304,6 +306,6 @@ evry_action_find(const char *name)
|
|||
break;
|
||||
|
||||
eina_stringshare_del(n);
|
||||
|
||||
|
||||
return act;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue