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;
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;
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("");
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)
{