added function to find actions

SVN revision: 48687
This commit is contained in:
Hannes Janetzek 2010-05-08 20:30:15 +00:00
parent 6287c98b4b
commit 311f5a8701
2 changed files with 22 additions and 0 deletions

View File

@ -546,6 +546,8 @@ EAPI void evry_action_register(Evry_Action *act, int priority);
EAPI void evry_action_unregister(Evry_Action *act);
EAPI void evry_view_register(Evry_View *view, int priority);
EAPI void evry_view_unregister(Evry_View *view);
EAPI Evry_Action *evry_action_find(const char *name);
EAPI void evry_history_load(void);
EAPI void evry_history_unload(void);

View File

@ -267,3 +267,23 @@ evry_action_free(Evry_Action *act)
evry_item_free(EVRY_ITEM(act));
}
/* TODO assign actions to plugins othersie there will be too liitle
names soon */
EAPI Evry_Action *
evry_action_find(const char *name)
{
Evry_Action *act = NULL;
Eina_List *l;
const char *n = eina_stringshare_add(name);
EINA_LIST_FOREACH(evry_conf->actions, l, act)
if (act->name == n)
break;
eina_stringshare_del(n);
return act;
}