Add e_exehist_del, that permits to remove an element from saved history.

SVN revision: 37828
devs/princeamd/enlightenment-0.17-elive
Chidambar Zinnoury 14 years ago
parent 3202cba829
commit 884b9821ae
  1. 24
      src/bin/e_exehist.c
  2. 1
      src/bin/e_exehist.h

@ -93,6 +93,30 @@ e_exehist_add(const char *launch_method, const char *exe)
_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
e_exehist_clear(void)
{

@ -11,6 +11,7 @@ EAPI int e_exehist_init(void);
EAPI int e_exehist_shutdown(void);
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 int e_exehist_popularity_get(const char *exe);
EAPI double e_exehist_newest_run_get(const char *exe);

Loading…
Cancel
Save