forked from enlightenment/enlightenment
Add e_exehist_del, that permits to remove an element from saved history.
SVN revision: 37828
This commit is contained in:
parent
3202cba829
commit
884b9821ae
|
@ -93,6 +93,30 @@ e_exehist_add(const char *launch_method, const char *exe)
|
||||||
_e_exehist_unload_queue();
|
_e_exehist_unload_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_exehist_del(const char *exe)
|
||||||
|
{
|
||||||
|
E_Exehist_Item *ei;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
_e_exehist_load();
|
||||||
|
if (!_e_exehist) return;
|
||||||
|
for (l = _e_exehist->history; l; l = l->next)
|
||||||
|
{
|
||||||
|
ei = l->data;
|
||||||
|
if ((ei->exe) && (!strcmp(exe, ei->exe)))
|
||||||
|
{
|
||||||
|
if (ei->exe) eina_stringshare_del(ei->exe);
|
||||||
|
if (ei->launch_method) eina_stringshare_del(ei->launch_method);
|
||||||
|
free(ei);
|
||||||
|
_e_exehist->history = eina_list_remove_list(_e_exehist->history,
|
||||||
|
l);
|
||||||
|
_e_exehist_changes++;
|
||||||
|
_e_exehist_unload_queue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_exehist_clear(void)
|
e_exehist_clear(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,7 @@ EAPI int e_exehist_init(void);
|
||||||
EAPI int e_exehist_shutdown(void);
|
EAPI int e_exehist_shutdown(void);
|
||||||
|
|
||||||
EAPI void e_exehist_add(const char *launch_method, const char *exe);
|
EAPI void e_exehist_add(const char *launch_method, const char *exe);
|
||||||
|
EAPI void e_exehist_del(const char *exe);
|
||||||
EAPI void e_exehist_clear(void);
|
EAPI void e_exehist_clear(void);
|
||||||
EAPI int e_exehist_popularity_get(const char *exe);
|
EAPI int e_exehist_popularity_get(const char *exe);
|
||||||
EAPI double e_exehist_newest_run_get(const char *exe);
|
EAPI double e_exehist_newest_run_get(const char *exe);
|
||||||
|
|
Loading…
Reference in New Issue