yakov pushed a commit to branch master. http://git.enlightenment.org/tools/erigo.git/commit/?id=eae3a6ccda292590a7d1417e098bde8de26fef50
commit eae3a6ccda292590a7d1417e098bde8de26fef50 Author: Yakov Goldberg <yako...@samsung.com> Date: Wed Feb 25 12:32:45 2015 +0200 Eo: adapt code to follow eo_do new syntax - part 2 --- src/bin/egui_gui/cbview.c | 2 +- src/bin/egui_gui/dnd.c | 4 ++-- src/bin/egui_gui/editor.c | 23 +++++++++++++---------- src/bin/egui_gui/egui_logic.c | 2 +- src/lib/generator.c | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/bin/egui_gui/cbview.c b/src/bin/egui_gui/cbview.c index 23df147..50a92d8 100644 --- a/src/bin/egui_gui/cbview.c +++ b/src/bin/egui_gui/cbview.c @@ -516,7 +516,7 @@ _item_content_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EIN } else { - eo_do_ret(cb_item_box, wdgs, eo_key_data_get("cb_item_wdgs")); + eo_do(cb_item_box, wdgs = eo_key_data_get("cb_item_wdgs")); } eo_do(wdgs->cb_label, elm_obj_widget_part_text_set(NULL, cb_type_get(it_data->cb))); diff --git a/src/bin/egui_gui/dnd.c b/src/bin/egui_gui/dnd.c index 500e325..9519c0a 100644 --- a/src/bin/egui_gui/dnd.c +++ b/src/bin/egui_gui/dnd.c @@ -549,7 +549,7 @@ _target_info_new(Gui_Widget *wdg, Eo *obj) } else if (obj) { - eo_do_ret(obj, ti, eo_key_data_get(DROP_TARGET)); + eo_do(obj, ti = eo_key_data_get(DROP_TARGET)); if (!ti) { ti = calloc(1, sizeof(Target_Info)); @@ -619,7 +619,7 @@ drop_target_wdg_del(Gui_Widget *wdg, Eo *obj) } else if (obj) { - eo_do_ret(obj, ti, eo_key_data_get(DROP_TARGET)); + eo_do(obj, ti = eo_key_data_get(DROP_TARGET)); eo_do(obj, eo_key_data_del(DROP_TARGET)); } diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c index 80f9374..2b8bc93 100644 --- a/src/bin/egui_gui/editor.c +++ b/src/bin/egui_gui/editor.c @@ -468,7 +468,7 @@ _iter_widget_delete(Gui_Widget *wdg) if (!IS_WIN(wdg)) { Eo *o = session_eo_get(session, wdg); - eo_do_ret(o, optional_win, eo_key_data_get("__editor_win")); + eo_do(o, optional_win = eo_key_data_get("__editor_win")); } Eo *fr = main_wdg_info_frame_get(wi); if (fr) @@ -1238,10 +1238,13 @@ _widget_prop_add(Gui_Session *session, const Gui_Widget *wdg, const Gui_Widget_P Eo *o = session_eo_get(session, wdg), *win = NULL, *fr = NULL; if (!IS_WIN(wdg)) { - eo_do_ret(o, win, eo_key_data_get("__editor_win")); - eo_do_ret(win, fr, eo_key_data_get("__editor_frame")); + eo_do(o, win = eo_key_data_get("__editor_win")); + eo_do(win, fr = eo_key_data_get("__editor_frame")); + } + else + { + eo_do(o, fr = eo_key_data_get("__editor_frame")); } - else eo_do_ret(o, fr, eo_key_data_get("__editor_frame")); if (IS_WIN(wdg) && !strcmp(prop_name_get(prop), TITLE_SET)) { Gui_Value *v = prop_value_nth_get(wdg_prop_get(wdg, DB_DEF_WIN_CLASS, TITLE_SET), 0); @@ -1274,8 +1277,8 @@ _widget_prop_add(Gui_Session *session, const Gui_Widget *wdg, const Gui_Widget_P Eo *o = session_eo_get(session, wdg); Evas *e = evas_object_evas_get(o); Evas_Object *layout = eo_add(EDJE_EDIT_CLASS, e); - Eina_Bool ret; - if (eo_do_ret(layout, ret, efl_file_set(resource_value_get(res), group))) + Eina_Bool _ret = eo_do_ret(layout, _ret, efl_file_set(resource_value_get(res), group)); + if (_ret) { Eina_List *parts = edje_edit_parts_list_get(layout); Eina_Stringshare *part_name; @@ -1417,7 +1420,7 @@ _drop_target_main_wdg_enter(void *data, Evas_Object *obj) } else if (canvas_drop_target != NULL) { - eo_do_ret(canvas_drop_target, di, eo_key_data_get(EDITOR_DND_DATA)); + eo_do(canvas_drop_target, di = eo_key_data_get(EDITOR_DND_DATA)); canvas = canvas_drop_target; _wdg_border_draw(NULL, EINA_FALSE, BORDER_DROP_TARGET); } @@ -1459,7 +1462,7 @@ _drop_target_main_wdg_leave(void *data, Evas_Object *obj) } else if (canvas_drop_target != NULL) { - eo_do_ret(canvas_drop_target, di, eo_key_data_get(EDITOR_DND_DATA)); + eo_do(canvas_drop_target, di = eo_key_data_get(EDITOR_DND_DATA)); } else { @@ -1597,7 +1600,7 @@ _drop_target_drop(void *data, Evas_Object *obj, Elm_Selection_Data *ev) } else if (canvas_drop_target != NULL) { - eo_do_ret(canvas_drop_target, di, eo_key_data_get(EDITOR_DND_DATA)); + eo_do(canvas_drop_target, di = eo_key_data_get(EDITOR_DND_DATA)); } else { @@ -2012,7 +2015,7 @@ _drop_target_pos(void *data, Eo *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Actio } else if (canvas_drop_target != NULL) { - eo_do_ret(canvas_drop_target, di, eo_key_data_get(EDITOR_DND_DATA)); + eo_do(canvas_drop_target, di = eo_key_data_get(EDITOR_DND_DATA)); } else { diff --git a/src/bin/egui_gui/egui_logic.c b/src/bin/egui_gui/egui_logic.c index ab6d511..05a2390 100644 --- a/src/bin/egui_gui/egui_logic.c +++ b/src/bin/egui_gui/egui_logic.c @@ -183,7 +183,7 @@ _on_fs_done(void *data, Evas_Object *obj EINA_UNUSED, void *event) _menu_item_disabled_set(project_menu, ITEM_SAVEAS, EINA_FALSE); _menu_item_disabled_set(project_menu, ITEM_EXPORT, EINA_FALSE); const char *project_name = NULL; - eo_do_ret(fs_win->fs_project_name_entry, project_name, elm_obj_widget_part_text_get(NULL)); + eo_do(fs_win->fs_project_name_entry, project_name = elm_obj_widget_part_text_get(NULL)); if (!strlen(project_name)) project_name = "New Project"; char *default_filename = strdup(project_name), *p; diff --git a/src/lib/generator.c b/src/lib/generator.c index 8550578..d6ba7bf 100644 --- a/src/lib/generator.c +++ b/src/lib/generator.c @@ -327,7 +327,7 @@ _item_iterate(Gui_Session *session, Widget_Context *wdg_ctx, const Gui_Widget *w * If TRUE, variable need to be declared and assigned. */ if (item_name) { - eina_strbuf_append_printf(wdg_ctx->buf, " eo_do_ret(%s, %s, %s(", + eina_strbuf_append_printf(wdg_ctx->buf, " eo_do(%s, %s = %s(", wdg_name_get(wdg), item_name, db_op_desc_func_name_get(op_desc)); wdg_ctx->declarations = eina_list_append(wdg_ctx->declarations, wit_id); } --