diff options
author | David Walter Seikel | 2014-05-04 17:14:18 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-04 17:14:18 +1000 |
commit | 86719f3016e41bf6389dd08d577c02c9921321f5 (patch) | |
tree | 9289824f10465b6e39dc4ac5942e3a794e1be6a2 /src | |
parent | New fangWin and Widget structures, and modify fangWin stuff to use them. (diff) | |
download | SledjHamr-86719f3016e41bf6389dd08d577c02c9921321f5.zip SledjHamr-86719f3016e41bf6389dd08d577c02c9921321f5.tar.gz SledjHamr-86719f3016e41bf6389dd08d577c02c9921321f5.tar.bz2 SledjHamr-86719f3016e41bf6389dd08d577c02c9921321f5.tar.xz |
Work around Elm entry hang on exit bug in chat.
Diffstat (limited to 'src')
-rw-r--r-- | src/extantz/chat.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/extantz/chat.c b/src/extantz/chat.c index ef40d08..d71e8bb 100644 --- a/src/extantz/chat.c +++ b/src/extantz/chat.c | |||
@@ -1,6 +1,15 @@ | |||
1 | #include "extantz.h" | 1 | #include "extantz.h" |
2 | 2 | ||
3 | 3 | ||
4 | // TODO - This is to work around a bug in Elm entry, remove it when the bug is fixed. | ||
5 | // The bug is that editable entry widgets cause the app to hang on exit. | ||
6 | void _on_entry_del(void *data, Evas_Object *obj, void *event_info) | ||
7 | { | ||
8 | // fangWin *me = data; | ||
9 | |||
10 | elm_entry_editable_set(obj, EINA_FALSE); | ||
11 | } | ||
12 | |||
4 | fangWin *chat_add(globals *ourGlobals) | 13 | fangWin *chat_add(globals *ourGlobals) |
5 | { | 14 | { |
6 | fangWin *me; | 15 | fangWin *me; |
@@ -29,18 +38,18 @@ fangWin *chat_add(globals *ourGlobals) | |||
29 | eo_unref(en); | 38 | eo_unref(en); |
30 | 39 | ||
31 | en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win); | 40 | en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win); |
41 | wid = widgetAdd(me); | ||
42 | wid->obj = en; | ||
43 | wid->on_del = _on_entry_del; | ||
32 | elm_object_text_set(en, ""); | 44 | elm_object_text_set(en, ""); |
33 | eo_do(en, | 45 | eo_do(en, |
34 | elm_obj_entry_scrollable_set(EINA_TRUE), | 46 | elm_obj_entry_scrollable_set(EINA_TRUE), |
35 | // TODO - Setting editable to TRUE is what hangs up extantz on exit. | 47 | elm_obj_entry_editable_set(EINA_TRUE), |
36 | // elm_obj_entry_editable_set(EINA_TRUE), | ||
37 | elm_obj_entry_editable_set(EINA_FALSE), | ||
38 | evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), | 48 | evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), |
39 | evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL), | 49 | evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL), |
40 | evas_obj_visibility_set(EINA_TRUE) | 50 | evas_obj_visibility_set(EINA_TRUE) |
41 | ); | 51 | ); |
42 | elm_box_pack_end(bx, en); | 52 | elm_box_pack_end(bx, en); |
43 | eo_unref(en); | ||
44 | 53 | ||
45 | evas_object_show(bx); | 54 | evas_object_show(bx); |
46 | eo_unref(bx); | 55 | eo_unref(bx); |