forked from enlightenment/enlightenment
'everything' module:
- dirbrowse: '..' or '/' + <tab> goes to parent resp root dir SVN revision: 41295
This commit is contained in:
parent
c3576b941b
commit
234db9b3a3
|
@ -180,6 +180,7 @@ EAPI void evry_plugin_unregister(Evry_Plugin *p);
|
|||
EAPI void evry_action_register(Evry_Action *act);
|
||||
EAPI void evry_action_unregister(Evry_Action *act);
|
||||
EAPI void evry_plugin_async_update(Evry_Plugin *plugin, int state);
|
||||
EAPI void evry_clear_input(void);
|
||||
|
||||
EAPI int evry_plug_apps_init(void);
|
||||
EAPI int evry_plug_apps_shutdown(void);
|
||||
|
|
|
@ -370,6 +370,16 @@ evry_plugin_async_update(Evry_Plugin *p, int action)
|
|||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evry_clear_input(void)
|
||||
{
|
||||
if (cur_state->input[0] != 0)
|
||||
{
|
||||
cur_state->input[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* local subsystem functions */
|
||||
static int
|
||||
_evry_cb_plugin_sort(const void *data1, const void *data2)
|
||||
|
@ -389,6 +399,13 @@ _evry_push_state(void)
|
|||
|
||||
s = cur_state;
|
||||
|
||||
if (update_timer)
|
||||
{
|
||||
_evry_matches_update(s->cur_plugin);
|
||||
ecore_timer_del(update_timer);
|
||||
update_timer = NULL;
|
||||
}
|
||||
|
||||
if (s)
|
||||
{
|
||||
if (!s->cur_plugin || !s->sel_item)
|
||||
|
@ -838,6 +855,13 @@ _evry_plugin_action(int finished)
|
|||
{
|
||||
Evry_State *s = cur_state;
|
||||
|
||||
if (update_timer)
|
||||
{
|
||||
_evry_matches_update(s->cur_plugin);
|
||||
ecore_timer_del(update_timer);
|
||||
update_timer = NULL;
|
||||
}
|
||||
|
||||
if (s->cur_plugin == action_selector)
|
||||
{
|
||||
/* set cur_action and start plugins for second parameter (if required)*/
|
||||
|
@ -960,7 +984,7 @@ _evry_show_items(Evry_Plugin *p)
|
|||
|
||||
/* TODO add option */
|
||||
|
||||
if (!s->initial && !s->sel_item && p->items)
|
||||
if (/*!s->initial &&*/!s->sel_item && p->items)
|
||||
{
|
||||
s->sel_item = p->items->data;
|
||||
_evry_item_sel(s->sel_item);
|
||||
|
|
|
@ -303,10 +303,8 @@ _item_add(Evry_Plugin *p, Efreet_Desktop *desktop, char *file, int prio)
|
|||
|
||||
/* ignore screensaver.. */
|
||||
EINA_LIST_FOREACH(desktop->categories, l, cat)
|
||||
{
|
||||
if (cat && !strcmp(cat, "Screensaver"))
|
||||
return;
|
||||
}
|
||||
if (cat && !strcmp(cat, "Screensaver"))
|
||||
return;
|
||||
|
||||
file = desktop->exec;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ struct _State
|
|||
{
|
||||
const char *directory;
|
||||
Eina_List *items;
|
||||
int command;
|
||||
};
|
||||
|
||||
static int _begin(Evry_Plugin *p, Evry_Item *it);
|
||||
|
@ -58,6 +59,12 @@ _begin(Evry_Plugin *p, Evry_Item *it)
|
|||
{
|
||||
State *s;
|
||||
|
||||
if (stack)
|
||||
{
|
||||
s = stack->data;
|
||||
if (s->command) evry_clear_input();
|
||||
}
|
||||
|
||||
if (it)
|
||||
{
|
||||
if (!it->uri || !ecore_file_is_dir(it->uri))
|
||||
|
@ -141,8 +148,13 @@ _fetch(Evry_Plugin *p, const char *input)
|
|||
{
|
||||
if (!strncmp(input, "/", 1))
|
||||
{
|
||||
directory = "/";
|
||||
input = input + 1;
|
||||
it = E_NEW(Evry_Item, 1);
|
||||
it->uri = eina_stringshare_add("/");
|
||||
it->label = eina_stringshare_add("/");
|
||||
p->items = eina_list_append(p->items, it);
|
||||
s->command = 1;
|
||||
return 1;
|
||||
|
||||
}
|
||||
else if (!strncmp(input, "..", 2))
|
||||
{
|
||||
|
@ -151,6 +163,8 @@ _fetch(Evry_Plugin *p, const char *input)
|
|||
char *tmp;
|
||||
int prio = 0;
|
||||
|
||||
if (!strcmp(s->directory, "/")) return 0;
|
||||
|
||||
snprintf(dir, 4096, "%s", s->directory);
|
||||
end = strrchr(dir, '/');
|
||||
|
||||
|
@ -174,6 +188,8 @@ _fetch(Evry_Plugin *p, const char *input)
|
|||
it->priority = prio;
|
||||
p->items = eina_list_append(p->items, it);
|
||||
|
||||
s->command = 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue