aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/purkle/purkle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/purkle/purkle.c')
-rw-r--r--src/purkle/purkle.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/purkle/purkle.c b/src/purkle/purkle.c
index 7bd47e7..2ee4964 100644
--- a/src/purkle/purkle.c
+++ b/src/purkle/purkle.c
@@ -4,36 +4,20 @@
4#include "winFang.h" 4#include "winFang.h"
5 5
6 6
7// TODO - This is to work around a bug in Elm entry, remove it when the bug is fixed.
8// The bug is that editable entry widgets cause the app to hang on exit.
9static void _on_entry_del(void *data, Evas_Object *obj, void *event_info)
10{
11// winFang *me = data;
12
13 elm_entry_editable_set(obj, EINA_FALSE);
14}
15
16static winFang *purkleAdd(winFang *parent, int w, int h, EPhysics_World *world) 7static winFang *purkleAdd(winFang *parent, int w, int h, EPhysics_World *world)
17{ 8{
18 winFang *me; 9 winFang *me;
19 Widget *wid; 10 Widget *wid;
20 Evas_Object *en;
21 11
22 me = winFangAdd(parent, 30, 590, w, h, "chatter box", "purkle", world); 12 me = winFangAdd(parent, 30, 590, w, h, "chatter box", "purkle", world);
23 13
24 en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win, 14 wid = widgetAdd(me, WT_TEXTBOX, "History is shown here", -1, -1, -1, -1);
15 eo_do(wid->obj,
25 elm_obj_entry_scrollable_set(EINA_TRUE), 16 elm_obj_entry_scrollable_set(EINA_TRUE),
26 elm_obj_entry_editable_set(EINA_FALSE), 17 elm_obj_entry_editable_set(EINA_FALSE)
27 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
28 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL),
29 evas_obj_visibility_set(EINA_TRUE)
30 ); 18 );
31 elm_object_text_set(en, "History is shown here");
32 elm_layout_box_append(me->win, WF_BOX, en);
33 eo_unref(en);
34 19
35 wid = widgetAdd(me, ELM_OBJ_ENTRY_CLASS, "", -1, -1, -1, -1); 20 wid = widgetAdd(me, WT_ENTRY, "", -1, -1, -1, -1);
36 wid->on_del = _on_entry_del;
37 eo_do(wid->obj, 21 eo_do(wid->obj,
38 elm_obj_entry_scrollable_set(EINA_TRUE), 22 elm_obj_entry_scrollable_set(EINA_TRUE),
39 elm_obj_entry_editable_set(EINA_TRUE) 23 elm_obj_entry_editable_set(EINA_TRUE)
@@ -45,7 +29,7 @@ static winFang *purkleAdd(winFang *parent, int w, int h, EPhysics_World *world)
45} 29}
46 30
47static const char *ourName = "purkle"; 31static const char *ourName = "purkle";
48int skang, _M; 32static int skang, _M;
49 33
50int luaopen_purkle(lua_State *L) 34int luaopen_purkle(lua_State *L)
51{ 35{