aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcodewarrior <codewarrior>2005-11-07 00:19:58 +0000
committercodewarrior <codewarrior@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-11-07 00:19:58 +0000
commit63253b382486ab1576577f41a2de268cbf0187bc (patch)
treebf48889502ddb4531aba61aebd9751f192def518 /src
parentoops (diff)
downloadenlightenment-63253b382486ab1576577f41a2de268cbf0187bc.tar.gz
- raise change cb when we press backspace or delete
SVN revision: 18354
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_entry.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/bin/e_entry.c b/src/bin/e_entry.c
index 79cf8b764..011f978d2 100644
--- a/src/bin/e_entry.c
+++ b/src/bin/e_entry.c
@@ -774,9 +774,17 @@ _e_entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event)
obj = sd->entry_object;
if (strcmp(key_event->keyname, "BackSpace") == 0)
- e_editable_text_delete_char_before(obj);
+ {
+ e_editable_text_delete_char_before(obj);
+ if(sd->change_func)
+ sd->change_func(sd->change_data, obj, "");
+ }
else if (strcmp(key_event->keyname, "Delete") == 0)
- e_editable_text_delete_char_after(obj);
+ {
+ e_editable_text_delete_char_after(obj);
+ if(sd->change_func)
+ sd->change_func(sd->change_data, obj, "");
+ }
else if (strcmp(key_event->keyname, "Left") == 0)
e_editable_text_cursor_move_left(obj);
else if (strcmp(key_event->keyname, "Right") == 0)
@@ -792,7 +800,8 @@ _e_entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event)
if(key_event->string && strcmp(key_event->keyname, "Escape"))
{
if(*(key_event->string) >= 32 && *(key_event->string) <= 126)
- sd->change_func(sd->change_data, obj, (char *)key_event->string);
+ if(sd->change_func)
+ sd->change_func(sd->change_data, obj, (char *)key_event->string);
}
}
}
@@ -832,6 +841,9 @@ _e_entry_smart_add(Evas_Object *object)
sd = malloc(sizeof(E_Entry_Smart_Data));
if (!sd) return;
+ sd->change_func = NULL;
+ sd->change_data = NULL;
+
sd->entry_object = e_editable_text_add(evas);
evas_object_smart_member_add(sd->entry_object, object);