forked from enlightenment/enlightenment
fix bug causing wrong types set in history. and fix old history in cleanup function
SVN revision: 48507
This commit is contained in:
parent
9f3565e816
commit
46ada2a38b
|
@ -224,9 +224,10 @@ _scan_func(void *data)
|
|||
|
||||
if (!EVRY_ITEM(file)->browseable)
|
||||
{
|
||||
if (d->second_run)
|
||||
usleep(2500);
|
||||
|
||||
#if _BSD_SOURCE || _XOPEN_SOURCE >= 500
|
||||
/* let main process do its thing while reading mimetypes */
|
||||
usleep(1000);
|
||||
#endif
|
||||
if ((mime = efreet_mime_type_get(file->path)))
|
||||
{
|
||||
file->mime = mime;
|
||||
|
@ -692,6 +693,8 @@ _hist_items_add_cb(const Eina_Hash *hash, const void *key, void *data, void *fda
|
|||
if (!hi)
|
||||
return EINA_TRUE;
|
||||
|
||||
DBG("add %s %s %s", hi->type, type, (char *) key);
|
||||
|
||||
EINA_LIST_FOREACH(p->files, ll, file)
|
||||
if (!strcmp(file->path, key))
|
||||
return EINA_TRUE;
|
||||
|
|
|
@ -84,7 +84,7 @@ evry_type_register(const char *type)
|
|||
EAPI const char *
|
||||
evry_type_get(Evry_Type type)
|
||||
{
|
||||
const char *ret = eina_list_nth(_evry_types, type - 1);
|
||||
const char *ret = eina_list_nth(_evry_types, type);
|
||||
if (!ret)
|
||||
return eina_stringshare_add("");
|
||||
|
||||
|
|
|
@ -106,6 +106,40 @@ _hist_cleanup_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata
|
|||
hi->last_used = d->time - SEVEN_DAYS/2;
|
||||
}
|
||||
|
||||
/* XXX fix history - remove later */
|
||||
if (!hi->type || !strcmp(hi->type, "NONE") || !strcmp(hi->type, ""))
|
||||
{
|
||||
hi->count = 0;
|
||||
}
|
||||
if (hi->count && hi->plugin)
|
||||
{
|
||||
if (!strcmp(hi->plugin, "Files"))
|
||||
{
|
||||
if (hi->type) eina_stringshare_del(hi->type);
|
||||
hi->type = eina_stringshare_add("FILE");
|
||||
}
|
||||
else if (!strcmp(hi->plugin, "Tracker"))
|
||||
{
|
||||
if (hi->type) eina_stringshare_del(hi->type);
|
||||
hi->type = eina_stringshare_add("FILE");
|
||||
}
|
||||
else if (!strcmp(hi->plugin, "Applications"))
|
||||
{
|
||||
if (hi->type) eina_stringshare_del(hi->type);
|
||||
hi->type = eina_stringshare_add("APPLICATION");
|
||||
}
|
||||
else if (!strcmp(hi->plugin, "Open With..."))
|
||||
{
|
||||
if (hi->type) eina_stringshare_del(hi->type);
|
||||
hi->type = eina_stringshare_add("APPLICATION");
|
||||
}
|
||||
else if (!strcmp(hi->plugin, "Settings"))
|
||||
{
|
||||
if (hi->type) eina_stringshare_del(hi->type);
|
||||
hi->type = eina_stringshare_add("E_SETTINGS");
|
||||
}
|
||||
}
|
||||
|
||||
/* item is transient or too old */
|
||||
if (!hi->count || hi->transient)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue