ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=8ca0be69f027e594957e853a0196325f2e3c3545

commit 8ca0be69f027e594957e853a0196325f2e3c3545
Author: Andy Williams <a...@andywilliams.me>
Date:   Fri Mar 18 19:42:07 2016 +0000

    Update to latest eo_add syntax
---
 elm_code/src/bin/elm_code_test_main.c            | 8 ++++----
 elm_code/src/lib/elm_code_diff_widget.c          | 4 ++--
 elm_code/src/lib/widget/elm_code_widget.c        | 2 +-
 elm_code/src/tests/widget/elm_code_test_widget.c | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/elm_code/src/bin/elm_code_test_main.c 
b/elm_code/src/bin/elm_code_test_main.c
index 126f8a7..5779ee7 100644
--- a/elm_code/src/bin/elm_code_test_main.c
+++ b/elm_code/src/bin/elm_code_test_main.c
@@ -66,7 +66,7 @@ _elm_code_test_welcome_setup(Evas_Object *parent)
    Elm_Code_Widget *widget;
 
    code = elm_code_create();
-   eo_add(&widget, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget, code));
+   widget = eo_add(ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(eo_self, code));
    elm_obj_code_widget_font_set(widget, NULL, 12);
    eo_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, 
_elm_code_test_line_done_cb, NULL);
    eo_event_callback_add(widget, ELM_CODE_WIDGET_EVENT_LINE_CLICKED, 
_elm_code_test_line_clicked_cb, code);
@@ -94,7 +94,7 @@ _elm_code_test_editor_setup(Evas_Object *parent)
    Elm_Code_Widget *widget;
 
    code = elm_code_create();
-   eo_add(&widget, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget, code));
+   widget = eo_add(ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(eo_self, code));
    elm_obj_code_widget_font_set(widget, NULL, 14);
    elm_obj_code_widget_editable_set(widget, EINA_TRUE);
    elm_obj_code_widget_show_whitespace_set(widget, EINA_TRUE);
@@ -121,7 +121,7 @@ _elm_code_test_mirror_setup(Elm_Code *code, char 
*font_name, Evas_Object *parent
 {
    Elm_Code_Widget *widget;
 
-   eo_add(&widget, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget, code));
+   widget = eo_add(ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(eo_self, code));
    elm_obj_code_widget_font_set(widget, font_name, 11);
    elm_obj_code_widget_line_numbers_set(widget, EINA_TRUE);
 
@@ -144,7 +144,7 @@ _elm_code_test_diff_inline_setup(Evas_Object *parent)
    code = elm_code_create();
    elm_code_file_open(code, path);
 
-   eo_add(&diff, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(diff, code));
+   diff = eo_add(ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(eo_self, code));
 
    evas_object_size_hint_weight_set(diff, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(diff, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/elm_code/src/lib/elm_code_diff_widget.c 
b/elm_code/src/lib/elm_code_diff_widget.c
index ac66d36..7efb848 100644
--- a/elm_code/src/lib/elm_code_diff_widget.c
+++ b/elm_code/src/lib/elm_code_diff_widget.c
@@ -95,7 +95,7 @@ elm_code_diff_widget_add(Evas_Object *parent, Elm_Code *code)
    // left side of diff
    wcode1 = elm_code_create();
    elm_code_parser_standard_add(wcode1, ELM_CODE_PARSER_STANDARD_DIFF);
-   eo_add(&widget_left, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget_left, wcode1));
+   widget_left = eo_add(ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(eo_self, wcode1));
 
    evas_object_size_hint_weight_set(widget_left, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget_left, EVAS_HINT_FILL, 
EVAS_HINT_FILL);
@@ -106,7 +106,7 @@ elm_code_diff_widget_add(Evas_Object *parent, Elm_Code 
*code)
    // right side of diff
    wcode2 = elm_code_create();
    elm_code_parser_standard_add(wcode2, ELM_CODE_PARSER_STANDARD_DIFF);
-   eo_add(&widget_right, ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(widget_right, wcode2));
+   widget_right = eo_add(ELM_CODE_WIDGET_CLASS, parent, 
elm_obj_code_widget_code_set(eo_self, wcode2));
 
    evas_object_size_hint_weight_set(widget_right, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(widget_right, EVAS_HINT_FILL, 
EVAS_HINT_FILL);
diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index ed19d61..1b91391 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -55,7 +55,7 @@ elm_code_widget_add(Evas_Object *parent, Elm_Code *code)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
    Evas_Object *obj = NULL;
-   eo_add(&obj, MY_CLASS, parent, elm_obj_code_widget_code_set(obj, code));
+   obj = eo_add(MY_CLASS, parent, elm_obj_code_widget_code_set(eo_self, code));
    return obj;
 }
 
diff --git a/elm_code/src/tests/widget/elm_code_test_widget.c 
b/elm_code/src/tests/widget/elm_code_test_widget.c
index c65d6b8..3471e3c 100644
--- a/elm_code/src/tests/widget/elm_code_test_widget.c
+++ b/elm_code/src/tests/widget/elm_code_test_widget.c
@@ -77,7 +77,7 @@ START_TEST (elm_code_widget_construct_nocode)
    elm_init(1, NULL);
 
    win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
-   eo_add(&widget, ELM_CODE_WIDGET_CLASS, win);
+   widget = eo_add(ELM_CODE_WIDGET_CLASS, win);
    ck_assert(!widget);
 
    elm_shutdown();

-- 


Reply via email to