From 12fcc3075e3eb035e3d7fefb30c1d087a312bc48 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 6 May 2014 23:24:58 +1000 Subject: All winFangs now get a complimentary box. --- src/extantz/chat.c | 15 ++++----------- src/extantz/files.c | 18 +++++------------- src/extantz/woMan.c | 15 +++++---------- 3 files changed, 14 insertions(+), 34 deletions(-) (limited to 'src/extantz') diff --git a/src/extantz/chat.c b/src/extantz/chat.c index 4c18e53..c19b936 100644 --- a/src/extantz/chat.c +++ b/src/extantz/chat.c @@ -14,16 +14,10 @@ winFang *chat_add(globals *ourGlobals) { winFang *me; Widget *wid; - Evas_Object *bx, *en; + Evas_Object *en; me = winFangAdd(ourGlobals->mainWindow, 30, 520, ourGlobals->win_w / 3, ourGlobals->win_h / 3, "chatter box", "chat"); - bx = eo_add(ELM_OBJ_BOX_CLASS, me->win, - evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), - evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) - ); - elm_win_resize_object_add(me->win, bx); - en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win, elm_obj_entry_scrollable_set(EINA_TRUE), elm_obj_entry_editable_set(EINA_FALSE), @@ -32,7 +26,7 @@ winFang *chat_add(globals *ourGlobals) evas_obj_visibility_set(EINA_TRUE) ); elm_object_text_set(en, "History is shown here"); - elm_box_pack_end(bx, en); + elm_box_pack_end(me->box, en); eo_unref(en); wid = widgetAdd(me, ELM_OBJ_ENTRY_CLASS, me->win, ""); @@ -41,10 +35,9 @@ winFang *chat_add(globals *ourGlobals) elm_obj_entry_scrollable_set(EINA_TRUE), elm_obj_entry_editable_set(EINA_TRUE) ); - elm_box_pack_end(bx, wid->obj); + elm_box_pack_end(me->box, wid->obj); - evas_object_show(bx); - eo_unref(bx); + evas_object_show(me->box); return me; } diff --git a/src/extantz/files.c b/src/extantz/files.c index 948c261..7dd08fa 100644 --- a/src/extantz/files.c +++ b/src/extantz/files.c @@ -144,18 +144,11 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa { winFang *me; Widget *wid; - Evas_Object *bx, *vbox, *fs, *bt, *rd = NULL, *rdg = NULL, *hoversel; + Evas_Object *vbox, *fs, *bt, *rd = NULL, *rdg = NULL, *hoversel; me = winFangAdd(ourGlobals->mainWindow, ourGlobals->win_w - 380, ourGlobals->win_w - 530, 350, 500, "file selector", "files"); - bx = eo_add(ELM_OBJ_BOX_CLASS, me->win, - elm_obj_box_homogeneous_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) - ); - elm_win_resize_object_add(me->win, bx); - - wid = widgetAdd(me, ELM_OBJ_FILESELECTOR_CLASS, bx, NULL); + wid = widgetAdd(me, ELM_OBJ_FILESELECTOR_CLASS, me->box, NULL); fs = wid->obj; wid->data = ourGlobals; wid->on_del = _on_fs_del; @@ -165,7 +158,7 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa elm_interface_fileselector_expandable_set(EINA_TRUE), elm_interface_fileselector_folder_only_set(EINA_FALSE) ); - elm_box_pack_end(bx, fs); + elm_box_pack_end(me->box, fs); elm_fileselector_path_set(fs, path); elm_fileselector_is_save_set(fs, save); @@ -271,11 +264,10 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa elm_box_pack_end(vbox, bt); eo_unref(bt); - elm_box_pack_end(bx, vbox); + elm_box_pack_end(me->box, vbox); evas_object_show(vbox); - evas_object_show(bx); + evas_object_show(me->box); eo_unref(vbox); - eo_unref(bx); winFangHide(me); return me; diff --git a/src/extantz/woMan.c b/src/extantz/woMan.c index 8215253..cd1d5c8 100644 --- a/src/extantz/woMan.c +++ b/src/extantz/woMan.c @@ -154,18 +154,13 @@ static void _grid_sel_cb(void *data, Evas_Object *obj, void *event_info) winFang *woMan_add(globals *ourGlobals) { winFang *me; - Evas_Object *bx, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; + Evas_Object *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; Elm_Object_Item *tb_it, *menu_it, *tab_it; char buf[PATH_MAX]; int i; me = winFangAdd(ourGlobals->mainWindow, 30, 150, ourGlobals->win_w / 3, ourGlobals->win_h / 3, "virtual world manager", "woMan"); - bx = elm_box_add(me->win); - elm_win_resize_object_add(me->win, bx); - evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); - // A tab thingy. tb = elm_toolbar_add(me->win); evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0); @@ -189,7 +184,7 @@ winFang *woMan_add(globals *ourGlobals) elm_menu_item_add(menu, menu_it, NULL, "debug settings", NULL, NULL); // The toolbar needs to be packed into the box AFTER the menus are added. - elm_box_pack_end(bx, tb); + elm_box_pack_end(me->box, tb); evas_object_show(tb); gridList = elm_genlist_add(me->win); @@ -272,7 +267,7 @@ winFang *woMan_add(globals *ourGlobals) tab = viewerList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Viewers", _promote, tab_it); tab = _content_image_new(me->win, strdup(buf)); tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Landmarks", _promote, tab_it); tab = gridList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Grids", _promote, tab_it); - elm_box_pack_end(bx, nf); + elm_box_pack_end(me->box, nf); bt = eo_add(ELM_OBJ_BUTTON_CLASS, me->win, // evas_obj_text_set("Login"), @@ -282,9 +277,9 @@ winFang *woMan_add(globals *ourGlobals) ); elm_object_text_set(bt, "Login"); // No eo interface for this that I can find. // evas_object_smart_callback_add(bt, "clicked", NULL, NULL); - elm_box_pack_end(bx, bt); + elm_box_pack_end(me->box, bt); eo_unref(bt); - evas_object_show(bx); + evas_object_show(me->box); return me; } -- cgit v1.1