BOUNCE, SPRING (also made short name versions of the long ones
possible too).
+2011-05-19 Tom Hacohen (TAsn)
+
+ * Entry: Don't emit "cursor,changed" when setting the text, because
+ the cursor really didn't change, it's more like a new cursor.
+ Also, when setting position, don't do anything if position is as it
+ was.
// set text as markup
_sel_clear(en->cursor, rp->object, en);
evas_object_textblock_text_markup_set(rp->object, text);
+ _edje_entry_set_cursor_start(rp);
_anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,changed", rp->part->name);
+#if 0
+ /* Don't emit cursor changed cause it didn't. It's just init to 0. */
_edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_set_cursor_start(rp);
+#endif
}
void
/* We are updating according to the real cursor on purpose */
_anchors_get(en->cursor, rp->object, en);
_edje_emit(rp->edje, "entry,changed", rp->part->name);
-#if 0
- /* Cursor didn't really change, don't say it did. */
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
-#endif
_edje_entry_real_part_configure(rp);
}
Entry *en = rp->entry_data;
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
if (!c) return;
+ /* Abort if cursor position didn't really change */
+ if (evas_textblock_cursor_pos_get(c) == pos)
+ return;
+
evas_textblock_cursor_pos_set(c, pos);
_sel_update(c, rp->object, rp->entry_data);