forked from enlightenment/enlightenment
parent
644ff46ecd
commit
eaaa60e655
|
@ -5619,7 +5619,9 @@ _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
|
||||||
free(sd->typebuf.buf);
|
free(sd->typebuf.buf);
|
||||||
sd->typebuf.buf = ts;
|
sd->typebuf.buf = ts;
|
||||||
_e_fm2_typebuf_match(obj, 0);
|
_e_fm2_typebuf_match(obj, 0);
|
||||||
if ((ch[0] == '/') && (sd->typebuf.buf) && ((len > 1) || (sd->typebuf.buf[0] != '~')))
|
if (ch[0] == '/')
|
||||||
|
{
|
||||||
|
if (sd->typebuf.buf[0] != '~')
|
||||||
{
|
{
|
||||||
if (e_util_strcmp(sd->dev, "desktop") && ecore_file_is_dir(sd->typebuf.buf))
|
if (e_util_strcmp(sd->dev, "desktop") && ecore_file_is_dir(sd->typebuf.buf))
|
||||||
{
|
{
|
||||||
|
@ -5628,6 +5630,19 @@ _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
|
||||||
sd->typebuf.setting = EINA_FALSE;
|
sd->typebuf.setting = EINA_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!memcmp(sd->typebuf.buf, "~/", 2))
|
||||||
|
{
|
||||||
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "%s/%s", getenv("HOME"), sd->typebuf.buf + 2);
|
||||||
|
if (e_util_strcmp(sd->dev, "desktop") && ecore_file_is_dir(buf))
|
||||||
|
{
|
||||||
|
sd->typebuf.setting = EINA_TRUE;
|
||||||
|
e_fm2_path_set(obj, "~/", sd->typebuf.buf + 1);
|
||||||
|
sd->typebuf.setting = EINA_FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
edje_object_part_text_set(sd->overlay, "e.text.typebuf_label", sd->typebuf.buf);
|
edje_object_part_text_set(sd->overlay, "e.text.typebuf_label", sd->typebuf.buf);
|
||||||
evas_object_smart_callback_call(sd->obj, "typebuf_changed", sd->typebuf.buf);
|
evas_object_smart_callback_call(sd->obj, "typebuf_changed", sd->typebuf.buf);
|
||||||
}
|
}
|
||||||
|
@ -5652,7 +5667,9 @@ _e_fm2_typebuf_char_backspace(Evas_Object *obj)
|
||||||
sd->typebuf.buf[p] = 0;
|
sd->typebuf.buf[p] = 0;
|
||||||
_e_fm2_typebuf_match(obj, 0);
|
_e_fm2_typebuf_match(obj, 0);
|
||||||
len--;
|
len--;
|
||||||
if ((dec == '/') && (sd->typebuf.buf) && ((len > 1) || (sd->typebuf.buf[0] != '~')))
|
if (dec == '/')
|
||||||
|
{
|
||||||
|
if ((len > 1) || (sd->typebuf.buf[0] != '~'))
|
||||||
{
|
{
|
||||||
if (e_util_strcmp(sd->dev, "desktop") && ecore_file_is_dir(sd->typebuf.buf))
|
if (e_util_strcmp(sd->dev, "desktop") && ecore_file_is_dir(sd->typebuf.buf))
|
||||||
{
|
{
|
||||||
|
@ -5661,6 +5678,19 @@ _e_fm2_typebuf_char_backspace(Evas_Object *obj)
|
||||||
sd->typebuf.setting = EINA_FALSE;
|
sd->typebuf.setting = EINA_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!memcmp(sd->typebuf.buf, "~/", 2))
|
||||||
|
{
|
||||||
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "%s/%s", getenv("HOME"), sd->typebuf.buf + 2);
|
||||||
|
if (e_util_strcmp(sd->dev, "desktop") && ecore_file_is_dir(buf))
|
||||||
|
{
|
||||||
|
sd->typebuf.setting = EINA_TRUE;
|
||||||
|
e_fm2_path_set(obj, "~/", sd->typebuf.buf + 1);
|
||||||
|
sd->typebuf.setting = EINA_FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
edje_object_part_text_set(sd->overlay, "e.text.typebuf_label", sd->typebuf.buf);
|
edje_object_part_text_set(sd->overlay, "e.text.typebuf_label", sd->typebuf.buf);
|
||||||
evas_object_smart_callback_call(sd->obj, "typebuf_changed", sd->typebuf.buf);
|
evas_object_smart_callback_call(sd->obj, "typebuf_changed", sd->typebuf.buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue