forked from enlightenment/enlightenment
fix efm typebuf navigation when using relative directories instead of absolute paths, also fix tab completion
SVN revision: 74217
This commit is contained in:
parent
f780d740ce
commit
fe3f5c44e9
|
@ -5582,6 +5582,7 @@ _e_fm2_typebuf_match(Evas_Object *obj, int next)
|
|||
_e_fm2_icon_desel_any(obj);
|
||||
if (sel)
|
||||
{
|
||||
if (!ic_match) ic_match = eina_list_data_get(sel);
|
||||
_e_fm2_icon_make_visible(eina_list_data_get(sel));
|
||||
EINA_LIST_FREE(sel, ic)
|
||||
_e_fm2_icon_select(ic);
|
||||
|
@ -5650,7 +5651,7 @@ _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
|
|||
_e_fm2_typebuf_match(obj, 0);
|
||||
if (ch[0] == '/')
|
||||
{
|
||||
if (sd->typebuf.buf[0] != '~')
|
||||
if (sd->typebuf.buf[0] == '/')
|
||||
{
|
||||
if (e_util_strcmp(sd->dev, "desktop") && e_util_strcmp(sd->dev, "favorites") && ecore_file_is_dir(sd->typebuf.buf))
|
||||
{
|
||||
|
@ -5659,6 +5660,18 @@ _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
|
|||
sd->typebuf.setting = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else if (sd->typebuf.buf[0] != '~')
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, sd->typebuf.buf);
|
||||
if (e_util_strcmp(sd->dev, "desktop") && e_util_strcmp(sd->dev, "favorites") && ecore_file_is_dir(buf))
|
||||
{
|
||||
sd->typebuf.setting = EINA_TRUE;
|
||||
e_fm2_path_set(obj, sd->dev, buf);
|
||||
sd->typebuf.setting = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else if (!memcmp(sd->typebuf.buf, "~/", 2))
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
@ -5700,7 +5713,7 @@ _e_fm2_typebuf_char_backspace(Evas_Object *obj)
|
|||
if (len) _e_fm2_typebuf_match(obj, 0);
|
||||
if (dec == '/')
|
||||
{
|
||||
if ((len > 1) || (sd->typebuf.buf[0] != '~'))
|
||||
if ((len > 1) || (sd->typebuf.buf[0] == '/'))
|
||||
{
|
||||
if (e_util_strcmp(sd->dev, "desktop") && e_util_strcmp(sd->dev, "favorites") && ecore_file_is_dir(sd->typebuf.buf))
|
||||
{
|
||||
|
@ -5709,6 +5722,18 @@ _e_fm2_typebuf_char_backspace(Evas_Object *obj)
|
|||
sd->typebuf.setting = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else if ((len > 1) || (sd->typebuf.buf[0] != '~'))
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, sd->typebuf.buf);
|
||||
if (e_util_strcmp(sd->dev, "desktop") && e_util_strcmp(sd->dev, "favorites") && ecore_file_is_dir(buf))
|
||||
{
|
||||
sd->typebuf.setting = EINA_TRUE;
|
||||
e_fm2_path_set(obj, sd->dev, buf);
|
||||
sd->typebuf.setting = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else if (!memcmp(sd->typebuf.buf, "~/", 2))
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
|
Loading…
Reference in New Issue