if (text)
{
Edje_Entry_Change_Info *info = NULL;
-
+
if (changeinfo)
{
info = calloc(1, sizeof(*info));
{
info->insert = EINA_TRUE;
info->change.insert.content = eina_stringshare_add(text);
- info->change.insert.plain_length =
+ info->change.insert.plain_length =
eina_unicode_utf8_get_len(info->change.insert.content);
}
}
}
static Edje_Entry_Change_Info *
-_text_filter_text_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c,
+_text_filter_text_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c,
const char *text,
const char *fmtpre, const char *fmtpost,
Eina_Bool clearsel, Eina_Bool changeinfo)
{
char *markup_text;
Edje_Entry_Change_Info *info = NULL;
-
+
markup_text = evas_textblock_text_utf8_to_markup(NULL, text2);
free(text2);
if (markup_text)
if (text2)
{
Edje_Entry_Change_Info *info;
-
+
info = _text_filter_markup_prepend_internal(ed, en, c, text2,
fmtpre, fmtpost,
clearsel, changeinfo);
}
static void
-_sel_enable(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED,
- Evas_Object *o EINA_UNUSED, Entry *en)
+_sel_enable(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED,
+ Evas_Object *o EINA_UNUSED, Entry *en)
{
if (en->have_selection) return;
en->have_selection = EINA_TRUE;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
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);
}
}
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
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);
}
}
_compose_seq_reset(en);
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);
}
if (evas_textblock_cursor_char_prev(en->cursor))
if (control) evas_textblock_cursor_word_start(en->cursor);
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);
}
_edje_emit(ed, "entry,key,left", rp->part->name);
_compose_seq_reset(en);
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);
}
/* If control is pressed, go to the end of the word */
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
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);
}
_edje_emit(ed, "entry,key,right", rp->part->name);
_curs_lin_start(en->cursor, rp->object, en);
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);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (shift ||
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/>");
}
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/>");
}
_anchors_get(en->cursor, rp->object, en);
if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) &&
_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,
"+ password=off",
"- password",
if (free_string) free(string);
}
end:
- if (!cursor_changed &&
+ if (!cursor_changed &&
(old_cur_pos != evas_textblock_cursor_pos_get(en->cursor)))
_edje_emit(ed, "cursor,changed", rp->part->name);
Entry *en = NULL;
char *commit_str = event_info;
Edje_Entry_Change_Info *info = NULL;
-
+
if ((!rp)) return;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
else
{
info = _text_filter_text_prepend(ed, en, en->cursor, commit_str,
- NULL, NULL,
+ NULL, NULL,
EINA_TRUE, EINA_TRUE);
}
_edje_password_show_last)
{
Edje_Entry_Change_Info *info;
-
+
_edje_entry_hide_visible_password(ed, en->rp);
info = _text_filter_text_prepend(ed, en, en->cursor,
eina_strbuf_string_get(buf),