forked from enlightenment/enlightenment
dont sort parent dirs by usage
cleanups SVN revision: 48906
This commit is contained in:
parent
caacbb82df
commit
523a1fbe07
|
@ -645,7 +645,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *it)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_folder_item_add(Plugin *p, const char *path)
|
_folder_item_add(Plugin *p, const char *path, int prio)
|
||||||
{
|
{
|
||||||
Evry_Item_File *file;
|
Evry_Item_File *file;
|
||||||
|
|
||||||
|
@ -653,6 +653,8 @@ _folder_item_add(Plugin *p, const char *path)
|
||||||
file->path = eina_stringshare_add(path);
|
file->path = eina_stringshare_add(path);
|
||||||
file->mime = eina_stringshare_ref(_mime_dir);
|
file->mime = eina_stringshare_ref(_mime_dir);
|
||||||
EVRY_ITEM(file)->browseable = EINA_TRUE;
|
EVRY_ITEM(file)->browseable = EINA_TRUE;
|
||||||
|
EVRY_ITEM(file)->priority = prio;
|
||||||
|
EVRY_ITEM(file)->usage = -1;
|
||||||
p->files = eina_list_append(p->files, file);
|
p->files = eina_list_append(p->files, file);
|
||||||
EVRY_PLUGIN_ITEM_APPEND(p, file);
|
EVRY_PLUGIN_ITEM_APPEND(p, file);
|
||||||
}
|
}
|
||||||
|
@ -745,6 +747,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
||||||
{
|
{
|
||||||
char *dir;
|
char *dir;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
int prio = 0;
|
||||||
|
|
||||||
if (strncmp(p->directory, "/", 1))
|
if (strncmp(p->directory, "/", 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -753,13 +756,13 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
||||||
|
|
||||||
strncpy(buf, p->directory, PATH_MAX);
|
strncpy(buf, p->directory, PATH_MAX);
|
||||||
|
|
||||||
_folder_item_add(p, p->directory);
|
_folder_item_add(p, p->directory, prio++);
|
||||||
|
|
||||||
while (strlen(buf) > 1)
|
while (strlen(buf) > 1)
|
||||||
{
|
{
|
||||||
buf[PATH_MAX - 1] = 0;
|
buf[PATH_MAX - 1] = 0;
|
||||||
dir = dirname(buf);
|
dir = dirname(buf);
|
||||||
_folder_item_add(p, dir);
|
_folder_item_add(p, dir, prio++);
|
||||||
strncpy(buf, dir, PATH_MAX);
|
strncpy(buf, dir, PATH_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ struct _Plugin
|
||||||
{
|
{
|
||||||
Evry_Plugin base;
|
Evry_Plugin base;
|
||||||
int type;
|
int type;
|
||||||
/* Evry_Selector **selectors; */
|
|
||||||
Evry_Window *win;
|
Evry_Window *win;
|
||||||
|
|
||||||
Evry_Item *warning;
|
Evry_Item *warning;
|
||||||
|
@ -218,13 +217,6 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
||||||
if (items) eina_list_free(items);
|
if (items) eina_list_free(items);
|
||||||
if (lp) eina_list_free(lp);
|
if (lp) eina_list_free(lp);
|
||||||
|
|
||||||
|
|
||||||
/* EINA_LIST_FOREACH(p->base.items, l, it)
|
|
||||||
* {
|
|
||||||
* if(CHECK_TYPE(it, EVRY_TYPE_FILE))
|
|
||||||
* printf("%d %1.20f %s\n", it->fuzzy_match, it->usage, it->label);
|
|
||||||
* } */
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,11 +247,11 @@ evry_aggregator_new(Evry_Window *win, int type)
|
||||||
|
|
||||||
if (evry_plugin_register(p, type, -1))
|
if (evry_plugin_register(p, type, -1))
|
||||||
{
|
{
|
||||||
|
if (type == EVRY_PLUGIN_SUBJECT)
|
||||||
p->config->view_mode = VIEW_MODE_THUMB;
|
p->config->view_mode = VIEW_MODE_THUMB;
|
||||||
}
|
}
|
||||||
|
|
||||||
GET_PLUGIN(pa, p);
|
GET_PLUGIN(pa, p);
|
||||||
/* pa->selectors = win->selectors; */
|
|
||||||
pa->win = win;
|
pa->win = win;
|
||||||
pa->type = type;
|
pa->type = type;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue