aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/extantz/purkle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/extantz/purkle.c')
-rw-r--r--src/extantz/purkle.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/extantz/purkle.c b/src/extantz/purkle.c
new file mode 100644
index 0000000..590a84e
--- /dev/null
+++ b/src/extantz/purkle.c
@@ -0,0 +1,43 @@
1#include "extantz.h"
2
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.
6static void _on_entry_del(void *data, Evas_Object *obj, void *event_info)
7{
8// winFang *me = data;
9
10 elm_entry_editable_set(obj, EINA_FALSE);
11}
12
13winFang *purkleAdd(globals *ourGlobals)
14{
15 winFang *me;
16 Widget *wid;
17 Evas_Object *en;
18
19 me = winFangAdd(ourGlobals->mainWindow, 30, 520, ourGlobals->win_w / 3, ourGlobals->win_h / 3, "chatter box", "purkle");
20
21 en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win,
22 elm_obj_entry_scrollable_set(EINA_TRUE),
23 elm_obj_entry_editable_set(EINA_FALSE),
24 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
25 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL),
26 evas_obj_visibility_set(EINA_TRUE)
27 );
28 elm_object_text_set(en, "History is shown here");
29 elm_box_pack_end(me->box, en);
30 eo_unref(en);
31
32 wid = widgetAdd(me, ELM_OBJ_ENTRY_CLASS, me->win, "");
33 wid->on_del = _on_entry_del;
34 eo_do(wid->obj,
35 elm_obj_entry_scrollable_set(EINA_TRUE),
36 elm_obj_entry_editable_set(EINA_TRUE)
37 );
38 elm_box_pack_end(me->box, wid->obj);
39
40 evas_object_show(me->box);
41
42 return me;
43}