aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2013-04-22 23:34:25 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2013-04-22 23:34:25 +0900
commitbeba98895a4be269c7b4ab3c8aa30c09852c101f (patch)
tree5f7eb5ec0504e9d78b342096d878d547e3abf3c8
parentevas/evas_gl - cast arguments properly according to the spec of the gles/gl A... (diff)
downloadefl-beba98895a4be269c7b4ab3c8aa30c09852c101f.tar.gz
edje/edje_entry : When selected word exists, selection is cleared and cursor remains on the current entry by additional key input.
-rw-r--r--ChangeLog5
-rw-r--r--NEWS1
-rw-r--r--data/libeo.so.1.7.99-gdb.py7
-rw-r--r--src/lib/edje/edje_entry.c45
4 files changed, 48 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ad1ad47d0..977431f40e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-22 WooHyun Jung
+
+ * Edje: When selected word exists, selection is cleared and cursor
+ remains on the current edje_entry by additional key input.
+
2013-04-19 Jihoon Kim (jihoon)
* Edje: Remove code to call ecore_imf_context_reset in case of pressing ESC, Return key
diff --git a/NEWS b/NEWS
index 7d301190b0..17ede5ab1c 100644
--- a/NEWS
+++ b/NEWS
@@ -251,3 +251,4 @@ Fixes:
* Evas: If an object goes to be hidden without replacing the cur/prev state info, the object context can be corrupted at the next show time. Now it replaces the cur/prev in that rare case.
* Evas: Fix evas gl_x11 in 16bpp and lower depths than 24/32 bpp.
* Edje: Fix useless ecore_imf_context_reset call in case of pressing ESC and Return key
+ * Edje: When selected word exists, selection is cleared and cursor remains on the current entry by additional key input.
diff --git a/data/libeo.so.1.7.99-gdb.py b/data/libeo.so.1.7.99-gdb.py
new file mode 100644
index 0000000000..5a3778f919
--- /dev/null
+++ b/data/libeo.so.1.7.99-gdb.py
@@ -0,0 +1,7 @@
+import sys
+
+eodir = '/usr/local/share/eo/gdb'
+if not eodir in sys.path:
+ sys.path.insert(0, eodir)
+
+import eo_gdb
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index f6611da469..193f712a78 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -464,18 +464,15 @@ _curs_jump_line(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en, int ln)
Evas_Coord lx, ly, lw, lh;
int last = _curs_line_last_get(c, o, en);
- if (ln < 0) ln = 0;
- else
- {
- if (ln > last) ln = last;
- }
+ if (ln < 0) return EINA_FALSE;
+ if (ln > last) return EINA_FALSE;
_curs_update_from_curs(c, o, en, &cx, &cy);
if (!evas_object_textblock_line_number_geometry_get(o, ln, &lx, &ly, &lw, &lh))
return EINA_FALSE;
if (evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
- return EINA_FALSE;
+ return EINA_TRUE;
evas_textblock_cursor_line_set(c, ln);
if (cx < (lx + (lw / 2)))
{
@@ -1340,9 +1337,16 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_compose_seq_reset(en);
if (multiline)
{
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
if (_curs_up(en->cursor, rp->object, en))
@@ -1362,9 +1366,16 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_compose_seq_reset(en);
if (multiline)
{
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
if (_curs_down(en->cursor, rp->object, en))
@@ -1382,9 +1393,16 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
(!strcmp(ev->keyname, "KP_Left") && !ev->string))
{
_compose_seq_reset(en);
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
if (evas_textblock_cursor_char_prev(en->cursor))
@@ -1403,9 +1421,16 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
(!strcmp(ev->keyname, "KP_Right") && !ev->string))
{
_compose_seq_reset(en);
+ if (en->have_selection &&
+ (evas_textblock_cursor_pos_get(en->sel_start) != evas_textblock_cursor_pos_get(en->sel_end)))
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
+ if (shift)
+ {
+ _sel_start(en->cursor, rp->object, en);
+ ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ }
else _sel_clear(ed, en->cursor, rp->object, en);
}
/* If control is pressed, go to the end of the word */