limit hist to 500 - it seems i had some incredibly huge history file and it

was causign my e to pause often... :)


SVN revision: 32555
This commit is contained in:
Carsten Haitzler 2007-11-10 23:37:35 +00:00
parent 8ab0fc06b2
commit 5868fed6fc
1 changed files with 25 additions and 0 deletions

View File

@ -303,7 +303,32 @@ _e_exehist_limit(void)
{
/* go from first item in hist on and either delete all items before a
* specific timestamp, or if the list count > limit then delete items
*
* for now - limit to 500
*/
if (_e_exehist)
{
while (evas_list_count(_e_exehist->history) > 500)
{
E_Exehist_Item *ei;
ei = _e_exehist->history->data;
if (ei->exe) evas_stringshare_del(ei->exe);
if (ei->launch_method) evas_stringshare_del(ei->launch_method);
free(ei);
_e_exehist->history = evas_list_remove_list(_e_exehist->history, _e_exehist->history);
}
while (evas_list_count(_e_exehist->mimes) > 500)
{
E_Exehist_Item *ei;
ei = _e_exehist->mimes->data;
if (ei->exe) evas_stringshare_del(ei->exe);
if (ei->launch_method) evas_stringshare_del(ei->launch_method);
free(ei);
_e_exehist->mimes = evas_list_remove_list(_e_exehist->mimes, _e_exehist->mimes);
}
}
}
static int