forked from enlightenment/efl
edje_entry: fix formatting
This commit is contained in:
parent
9dffb4eed8
commit
8261f03d85
|
@ -532,7 +532,7 @@ _sel_start(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_sel_enable(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED,
|
_sel_enable(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED,
|
||||||
Evas_Object *o EINA_UNUSED, Entry *en)
|
Evas_Object *o EINA_UNUSED, Entry *en)
|
||||||
{
|
{
|
||||||
if (en->have_selection) return;
|
if (en->have_selection) return;
|
||||||
en->have_selection = EINA_TRUE;
|
en->have_selection = EINA_TRUE;
|
||||||
|
@ -1353,7 +1353,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
if (en->select_allow)
|
if (en->select_allow)
|
||||||
{
|
{
|
||||||
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
||||||
else _sel_clear(ed, en->cursor, rp->object, en);
|
else _sel_clear(ed, en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1375,7 +1375,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
if (en->select_allow)
|
if (en->select_allow)
|
||||||
{
|
{
|
||||||
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
||||||
else _sel_clear(ed, en->cursor, rp->object, en);
|
else _sel_clear(ed, en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1388,7 +1388,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
_compose_seq_reset(en);
|
_compose_seq_reset(en);
|
||||||
if (en->select_allow)
|
if (en->select_allow)
|
||||||
{
|
{
|
||||||
if (shift) _sel_start(en->cursor, rp->object, en);
|
if (shift) _sel_start(en->cursor, rp->object, en);
|
||||||
else _sel_clear(ed, en->cursor, rp->object, en);
|
else _sel_clear(ed, en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
if (evas_textblock_cursor_char_prev(en->cursor))
|
if (evas_textblock_cursor_char_prev(en->cursor))
|
||||||
|
@ -1397,7 +1397,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
if (control) evas_textblock_cursor_word_start(en->cursor);
|
if (control) evas_textblock_cursor_word_start(en->cursor);
|
||||||
if (en->select_allow)
|
if (en->select_allow)
|
||||||
{
|
{
|
||||||
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
||||||
else _sel_clear(ed, en->cursor, rp->object, en);
|
else _sel_clear(ed, en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
_edje_emit(ed, "entry,key,left", rp->part->name);
|
_edje_emit(ed, "entry,key,left", rp->part->name);
|
||||||
|
@ -1409,7 +1409,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
_compose_seq_reset(en);
|
_compose_seq_reset(en);
|
||||||
if (en->select_allow)
|
if (en->select_allow)
|
||||||
{
|
{
|
||||||
if (shift) _sel_start(en->cursor, rp->object, en);
|
if (shift) _sel_start(en->cursor, rp->object, en);
|
||||||
else _sel_clear(ed, en->cursor, rp->object, en);
|
else _sel_clear(ed, en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
/* If control is pressed, go to the end of the word */
|
/* If control is pressed, go to the end of the word */
|
||||||
|
@ -1418,7 +1418,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
if (en->select_allow)
|
if (en->select_allow)
|
||||||
{
|
{
|
||||||
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
||||||
else _sel_clear(ed, en->cursor, rp->object, en);
|
else _sel_clear(ed, en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
_edje_emit(ed, "entry,key,right", rp->part->name);
|
_edje_emit(ed, "entry,key,right", rp->part->name);
|
||||||
|
@ -1514,7 +1514,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
_curs_lin_start(en->cursor, rp->object, en);
|
_curs_lin_start(en->cursor, rp->object, en);
|
||||||
if (en->select_allow)
|
if (en->select_allow)
|
||||||
{
|
{
|
||||||
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
if (shift) _sel_extend(ed, en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
_edje_emit(ed, "entry,key,home", rp->part->name);
|
_edje_emit(ed, "entry,key,home", rp->part->name);
|
||||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
|
@ -1696,12 +1696,12 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
if (shift ||
|
if (shift ||
|
||||||
evas_object_textblock_legacy_newline_get(rp->object))
|
evas_object_textblock_legacy_newline_get(rp->object))
|
||||||
{
|
{
|
||||||
_text_filter_format_prepend(ed, en, en->cursor, "br");
|
_text_filter_format_prepend(ed, en, en->cursor, "br");
|
||||||
info->change.insert.content = eina_stringshare_add("<br/>");
|
info->change.insert.content = eina_stringshare_add("<br/>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_text_filter_format_prepend(ed, en, en->cursor, "ps");
|
_text_filter_format_prepend(ed, en, en->cursor, "ps");
|
||||||
info->change.insert.content = eina_stringshare_add("<ps/>");
|
info->change.insert.content = eina_stringshare_add("<ps/>");
|
||||||
}
|
}
|
||||||
_anchors_get(en->cursor, rp->object, en);
|
_anchors_get(en->cursor, rp->object, en);
|
||||||
|
@ -1754,7 +1754,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) &&
|
if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) &&
|
||||||
_edje_password_show_last)
|
_edje_password_show_last)
|
||||||
{
|
{
|
||||||
_edje_entry_hide_visible_password(ed, en->rp);
|
_edje_entry_hide_visible_password(ed, en->rp);
|
||||||
info = _text_filter_text_prepend(ed, en, en->cursor, string,
|
info = _text_filter_text_prepend(ed, en, en->cursor, string,
|
||||||
"+ password=off",
|
"+ password=off",
|
||||||
"- password",
|
"- password",
|
||||||
|
@ -3864,7 +3864,7 @@ _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
info = _text_filter_text_prepend(ed, en, en->cursor, commit_str,
|
info = _text_filter_text_prepend(ed, en, en->cursor, commit_str,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
EINA_TRUE, EINA_TRUE);
|
EINA_TRUE, EINA_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue