diff options
author | David Walter Seikel | 2014-05-08 07:03:38 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-08 07:03:38 +1000 |
commit | 1d7b6e9233967f7cde1c8872678b2db1bab8c539 (patch) | |
tree | dc2f2c964eb0c5dd8c09bcf0f2431735802446c8 /src/extantz/purkle.c | |
parent | Introducing purkle. B-) (diff) | |
download | SledjHamr-1d7b6e9233967f7cde1c8872678b2db1bab8c539.zip SledjHamr-1d7b6e9233967f7cde1c8872678b2db1bab8c539.tar.gz SledjHamr-1d7b6e9233967f7cde1c8872678b2db1bab8c539.tar.bz2 SledjHamr-1d7b6e9233967f7cde1c8872678b2db1bab8c539.tar.xz |
Switch to purkle is complete.
Diffstat (limited to 'src/extantz/purkle.c')
-rw-r--r-- | src/extantz/purkle.c | 43 |
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. | ||
6 | static 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 | |||
13 | winFang *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 | } | ||