From 1d7b6e9233967f7cde1c8872678b2db1bab8c539 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 8 May 2014 07:03:38 +1000 Subject: Switch to purkle is complete. --- src/extantz/build.lua | 4 ++-- src/extantz/chat.c | 43 ------------------------------------------- src/extantz/extantz.c | 2 +- src/extantz/extantz.h | 4 ++-- src/extantz/purkle.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 src/extantz/chat.c create mode 100644 src/extantz/purkle.c (limited to 'src/extantz') diff --git a/src/extantz/build.lua b/src/extantz/build.lua index c50f4da..d15be35 100755 --- a/src/extantz/build.lua +++ b/src/extantz/build.lua @@ -18,11 +18,11 @@ LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' libs = libs .. ' -lIrrlicht -lGL -lbz2 -lGuiLua -lwinFang -lRunnr' removeFiles(dir, {'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', 'gears.o', 'ephysics_demo.o', 'Evas_3D_demo.o', '../../media/extantz.edj'}) -removeFiles(dir, {'../../extantz', 'camera.o', 'chat.o', 'files.o', 'scenri.o', 'woMan.o'}) +removeFiles(dir, {'../../extantz', 'camera.o', 'purkle.o', 'files.o', 'scenri.o', 'woMan.o'}) runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' extantz.edc ../../media/extantz.edj') runCommand('Irrlicht files', dir, 'g++ ' .. CFLAGS .. ' -ffast-math -c crappisspuke.cpp -o crappisspuke.o ' .. LDFLAGS) runCommand(nil, dir, 'g++ ' .. CFLAGS .. ' -ffast-math -c CDemo.cpp -o CDemo.o ' .. LDFLAGS) runCommand(nil, dir, 'g++ ' .. CFLAGS .. ' -ffast-math -c extantzCamera.cpp -o extantzCamera.o ' .. LDFLAGS) CFLAGS = CFLAGS .. ' -Wl,-export-dynamic' -compileFiles('../../extantz', dir, {'gears', 'ephysics_demo', 'camera', 'Evas_3D_demo', 'chat', 'files', 'scenri', 'woMan', 'extantz'}, 'crappisspuke.o CDemo.o extantzCamera.o') +compileFiles('../../extantz', dir, {'gears', 'ephysics_demo', 'camera', 'Evas_3D_demo', 'purkle', 'files', 'scenri', 'woMan', 'extantz'}, 'crappisspuke.o CDemo.o extantzCamera.o') diff --git a/src/extantz/chat.c b/src/extantz/chat.c deleted file mode 100644 index c19b936..0000000 --- a/src/extantz/chat.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "extantz.h" - - -// TODO - This is to work around a bug in Elm entry, remove it when the bug is fixed. -// The bug is that editable entry widgets cause the app to hang on exit. -void _on_entry_del(void *data, Evas_Object *obj, void *event_info) -{ -// winFang *me = data; - - elm_entry_editable_set(obj, EINA_FALSE); -} - -winFang *chat_add(globals *ourGlobals) -{ - winFang *me; - Widget *wid; - Evas_Object *en; - - me = winFangAdd(ourGlobals->mainWindow, 30, 520, ourGlobals->win_w / 3, ourGlobals->win_h / 3, "chatter box", "chat"); - - en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win, - elm_obj_entry_scrollable_set(EINA_TRUE), - elm_obj_entry_editable_set(EINA_FALSE), - evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), - evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL), - evas_obj_visibility_set(EINA_TRUE) - ); - elm_object_text_set(en, "History is shown here"); - elm_box_pack_end(me->box, en); - eo_unref(en); - - wid = widgetAdd(me, ELM_OBJ_ENTRY_CLASS, me->win, ""); - wid->on_del = _on_entry_del; - eo_do(wid->obj, - elm_obj_entry_scrollable_set(EINA_TRUE), - elm_obj_entry_editable_set(EINA_TRUE) - ); - elm_box_pack_end(me->box, wid->obj); - - evas_object_show(me->box); - - return me; -} diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index cf2d7b0..b8536e9 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c @@ -516,7 +516,7 @@ EAPI_MAIN int elm_main(int argc, char **argv) // overlay_add(&ourGlobals); woMan_add(&ourGlobals); - chat_add(&ourGlobals); + purkleAdd(&ourGlobals); ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); char *args[] = {"extantz", "-l", "test", "-foo", "COMBINED!", NULL}; GuiLuaDo(5, args, ourGlobals.mainWindow); diff --git a/src/extantz/extantz.h b/src/extantz/extantz.h index 4a12a06..c6e3393 100644 --- a/src/extantz/extantz.h +++ b/src/extantz/extantz.h @@ -2,7 +2,7 @@ #define _EXTANTZ_H_ #define USE_PHYSICS 1 -#define USE_IRR 1 +#define USE_IRR 0 #define USE_DEMO 1 #define DO_GEARS 0 @@ -256,9 +256,9 @@ Scene_Data *scenriAdd(Evas_Object *win); Evas_3D_Node *cameraAdd(Evas *evas, Scene_Data *scene, Evas_Object *win); Eina_Bool animateCamera(Scene_Data *scene); -winFang *chat_add(globals *ourGlobals); winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool save); void filesShow(winFang *me, Evas_Smart_Cb func, void *data); +winFang *purkleAdd(globals *ourGlobals); winFang *woMan_add(globals *ourGlobals); 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 @@ +#include "extantz.h" + + +// TODO - This is to work around a bug in Elm entry, remove it when the bug is fixed. +// The bug is that editable entry widgets cause the app to hang on exit. +static void _on_entry_del(void *data, Evas_Object *obj, void *event_info) +{ +// winFang *me = data; + + elm_entry_editable_set(obj, EINA_FALSE); +} + +winFang *purkleAdd(globals *ourGlobals) +{ + winFang *me; + Widget *wid; + Evas_Object *en; + + me = winFangAdd(ourGlobals->mainWindow, 30, 520, ourGlobals->win_w / 3, ourGlobals->win_h / 3, "chatter box", "purkle"); + + en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win, + elm_obj_entry_scrollable_set(EINA_TRUE), + elm_obj_entry_editable_set(EINA_FALSE), + evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), + evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL), + evas_obj_visibility_set(EINA_TRUE) + ); + elm_object_text_set(en, "History is shown here"); + elm_box_pack_end(me->box, en); + eo_unref(en); + + wid = widgetAdd(me, ELM_OBJ_ENTRY_CLASS, me->win, ""); + wid->on_del = _on_entry_del; + eo_do(wid->obj, + elm_obj_entry_scrollable_set(EINA_TRUE), + elm_obj_entry_editable_set(EINA_TRUE) + ); + elm_box_pack_end(me->box, wid->obj); + + evas_object_show(me->box); + + return me; +} -- cgit v1.1