rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=58e9bb1b0cfa7ddb694fbdc4031192abd8be8098

commit 58e9bb1b0cfa7ddb694fbdc4031192abd8be8098
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Tue Dec 22 12:11:28 2015 +0200

    demo: use proper signals for widgets (for text and swallow set, etc)
---
 src/bin/ui/live_view/elementary/live_actionslider.c  | 6 +++---
 src/bin/ui/live_view/elementary/live_bg.c            | 6 +++---
 src/bin/ui/live_view/elementary/live_bubble.c        | 6 +++---
 src/bin/ui/live_view/elementary/live_button.c        | 6 +++---
 src/bin/ui/live_view/elementary/live_calendar.c      | 6 +++---
 src/bin/ui/live_view/elementary/live_check.c         | 6 +++---
 src/bin/ui/live_view/elementary/live_clock.c         | 6 +++---
 src/bin/ui/live_view/elementary/live_colorselector.c | 6 +++---
 src/bin/ui/live_view/elementary/live_ctxpopup.c      | 6 +++---
 src/bin/ui/live_view/elementary/live_datetime.c      | 6 +++---
 src/bin/ui/live_view/elementary/live_entry.c         | 6 +++---
 src/bin/ui/live_view/elementary/live_label.c         | 6 +++---
 src/bin/ui/live_view/elementary/live_layout.c        | 6 +++---
 src/bin/ui/live_view/elementary/live_panel.c         | 6 +++---
 src/bin/ui/live_view/elementary/live_panes.c         | 6 +++---
 src/bin/ui/live_view/elementary/live_progressbar.c   | 6 +++---
 src/bin/ui/live_view/elementary/live_separator.c     | 6 +++---
 src/bin/ui/live_view/elementary/live_slider.c        | 6 +++---
 src/bin/ui/live_view/elementary/live_toolbar.c       | 6 +++---
 19 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/src/bin/ui/live_view/elementary/live_actionslider.c 
b/src/bin/ui/live_view/elementary/live_actionslider.c
index bc62f23..8fee47a 100644
--- a/src/bin/ui/live_view/elementary/live_actionslider.c
+++ b/src/bin/ui/live_view/elementary/live_actionslider.c
@@ -29,9 +29,9 @@ widget_actionslider_create(Evas_Object *parent, const Group 
*group)
    Evas_Object *object = elm_actionslider_add(parent);
    elm_actionslider_magnet_pos_set(object, ELM_ACTIONSLIDER_ALL);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_bg.c 
b/src/bin/ui/live_view/elementary/live_bg.c
index 6bc9f37..ac1aa8a 100644
--- a/src/bin/ui/live_view/elementary/live_bg.c
+++ b/src/bin/ui/live_view/elementary/live_bg.c
@@ -28,9 +28,9 @@ widget_bg_create(Evas_Object *parent, const Group *group)
 
    Evas_Object *object = elm_bg_add(parent);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_bubble.c 
b/src/bin/ui/live_view/elementary/live_bubble.c
index 8bbc648..dd8c0ee 100644
--- a/src/bin/ui/live_view/elementary/live_bubble.c
+++ b/src/bin/ui/live_view/elementary/live_bubble.c
@@ -50,9 +50,9 @@ widget_bubble_create(Evas_Object *parent, const Group *group)
    if (strcmp(group->class, "base") != 0)
      elm_bubble_pos_set(object, _bubble_pos_get(group->class));
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_button.c 
b/src/bin/ui/live_view/elementary/live_button.c
index 0446edd..26393d4 100644
--- a/src/bin/ui/live_view/elementary/live_button.c
+++ b/src/bin/ui/live_view/elementary/live_button.c
@@ -28,9 +28,9 @@ widget_button_create(Evas_Object *parent, const Group *group)
 
    Evas_Object *object = elm_button_add(parent);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_calendar.c 
b/src/bin/ui/live_view/elementary/live_calendar.c
index cba4da1..8f79b04 100644
--- a/src/bin/ui/live_view/elementary/live_calendar.c
+++ b/src/bin/ui/live_view/elementary/live_calendar.c
@@ -37,9 +37,9 @@ widget_calendar_create(Evas_Object *parent, const Group 
*group)
    elm_calendar_mark_add(object, "checked", &saturday,
                                 ELM_CALENDAR_WEEKLY);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_check.c 
b/src/bin/ui/live_view/elementary/live_check.c
index 930560a..603693a 100644
--- a/src/bin/ui/live_view/elementary/live_check.c
+++ b/src/bin/ui/live_view/elementary/live_check.c
@@ -28,9 +28,9 @@ widget_check_create(Evas_Object *parent, const Group *group)
 
    Evas_Object *object = elm_check_add(parent);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_clock.c 
b/src/bin/ui/live_view/elementary/live_clock.c
index 23d04a4..acb9d6c 100644
--- a/src/bin/ui/live_view/elementary/live_clock.c
+++ b/src/bin/ui/live_view/elementary/live_clock.c
@@ -55,9 +55,9 @@ widget_clock_create(Evas_Object *parent, const Group *group)
         elm_clock_show_am_pm_set(object, true);
      }
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_colorselector.c 
b/src/bin/ui/live_view/elementary/live_colorselector.c
index 1d17637..eca771d 100644
--- a/src/bin/ui/live_view/elementary/live_colorselector.c
+++ b/src/bin/ui/live_view/elementary/live_colorselector.c
@@ -45,9 +45,9 @@ widget_colorselector_create(Evas_Object *parent, const Group 
*group)
         free(style_parsed);
      }
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, style_name);
 
diff --git a/src/bin/ui/live_view/elementary/live_ctxpopup.c 
b/src/bin/ui/live_view/elementary/live_ctxpopup.c
index a9440a2..533e970 100644
--- a/src/bin/ui/live_view/elementary/live_ctxpopup.c
+++ b/src/bin/ui/live_view/elementary/live_ctxpopup.c
@@ -212,9 +212,9 @@ widget_ctxpopup_create(Evas_Object *parent, const Group 
*group)
    elm_list_go(list);
 
    evas_object_data_set(list, "style_name", group->style);
-   evas_object_data_set(list, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(list, TEXT_FUNC, on_text_check);
-   evas_object_data_set(list, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, list);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
list);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, list);
 
    return list;
 }
diff --git a/src/bin/ui/live_view/elementary/live_datetime.c 
b/src/bin/ui/live_view/elementary/live_datetime.c
index 8173154..f142dd4 100644
--- a/src/bin/ui/live_view/elementary/live_datetime.c
+++ b/src/bin/ui/live_view/elementary/live_datetime.c
@@ -28,9 +28,9 @@ widget_datetime_create(Evas_Object *parent, const Group 
*group)
 
    Evas_Object *object = elm_datetime_add(parent);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
    return object;
diff --git a/src/bin/ui/live_view/elementary/live_entry.c 
b/src/bin/ui/live_view/elementary/live_entry.c
index e7d77b9..4e20e7d 100644
--- a/src/bin/ui/live_view/elementary/live_entry.c
+++ b/src/bin/ui/live_view/elementary/live_entry.c
@@ -127,9 +127,9 @@ widget_entry_create(Evas_Object *parent, const Group *group)
         eina_stringshare_del(emoticon_type);
      }
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    return object;
 }
diff --git a/src/bin/ui/live_view/elementary/live_label.c 
b/src/bin/ui/live_view/elementary/live_label.c
index e2e72d1..249d75c 100644
--- a/src/bin/ui/live_view/elementary/live_label.c
+++ b/src/bin/ui/live_view/elementary/live_label.c
@@ -32,9 +32,9 @@ widget_label_create(Evas_Object *parent, const Group *group)
    elm_label_slide_duration_set(object, 0.5);
    elm_label_slide_mode_set(object, ELM_LABEL_SLIDE_MODE_ALWAYS);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_layout.c 
b/src/bin/ui/live_view/elementary/live_layout.c
index b83a65d..f8e5183 100644
--- a/src/bin/ui/live_view/elementary/live_layout.c
+++ b/src/bin/ui/live_view/elementary/live_layout.c
@@ -30,9 +30,9 @@ widget_layout_create(Evas_Object *parent, const Group *group)
    Evas_Object *object = elm_layout_add(parent);
    elm_layout_theme_set(object, "layout", group->class, group->style);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    return object;
 }
diff --git a/src/bin/ui/live_view/elementary/live_panel.c 
b/src/bin/ui/live_view/elementary/live_panel.c
index 190dc1a..9cbbd79 100644
--- a/src/bin/ui/live_view/elementary/live_panel.c
+++ b/src/bin/ui/live_view/elementary/live_panel.c
@@ -49,9 +49,9 @@ widget_panel_create(Evas_Object *parent, const Group *group)
    Evas_Object *object = elm_panel_add(parent);
    elm_panel_orient_set(object, _panel_orient_get(group->class));
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_panes.c 
b/src/bin/ui/live_view/elementary/live_panes.c
index 28bcdbb..39b0ae0 100644
--- a/src/bin/ui/live_view/elementary/live_panes.c
+++ b/src/bin/ui/live_view/elementary/live_panes.c
@@ -64,9 +64,9 @@ widget_panes_create(Evas_Object *parent, const Group *group)
    elm_object_part_content_set(object, "right", test_right);
    elm_object_part_content_set(object, "left", test_left);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_progressbar.c 
b/src/bin/ui/live_view/elementary/live_progressbar.c
index ce99a07..b82d766 100644
--- a/src/bin/ui/live_view/elementary/live_progressbar.c
+++ b/src/bin/ui/live_view/elementary/live_progressbar.c
@@ -31,9 +31,9 @@ widget_progressbar_create(Evas_Object *parent, const Group 
*group)
    if (!strcmp(group->class, "vertical"))
       elm_progressbar_horizontal_set(object, false);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, group->style);
 
diff --git a/src/bin/ui/live_view/elementary/live_separator.c 
b/src/bin/ui/live_view/elementary/live_separator.c
index ae860bc..272333b 100644
--- a/src/bin/ui/live_view/elementary/live_separator.c
+++ b/src/bin/ui/live_view/elementary/live_separator.c
@@ -54,9 +54,9 @@ widget_separator_create(Evas_Object *parent, const Group 
*group)
 
 #undef _ADD_RECT
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    return object;
 }
diff --git a/src/bin/ui/live_view/elementary/live_slider.c 
b/src/bin/ui/live_view/elementary/live_slider.c
index bf8bff6..483fd63 100644
--- a/src/bin/ui/live_view/elementary/live_slider.c
+++ b/src/bin/ui/live_view/elementary/live_slider.c
@@ -49,9 +49,9 @@ widget_slider_create(Evas_Object *parent, const Group *group)
    elm_slider_indicator_format_set(object, "%1.2f");
    elm_slider_min_max_set(object, 0, 10);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    elm_object_style_set(object, style_name);
 
diff --git a/src/bin/ui/live_view/elementary/live_toolbar.c 
b/src/bin/ui/live_view/elementary/live_toolbar.c
index c0589fb..bf2e528 100644
--- a/src/bin/ui/live_view/elementary/live_toolbar.c
+++ b/src/bin/ui/live_view/elementary/live_toolbar.c
@@ -80,9 +80,9 @@ widget_toolbar_create(Evas_Object *parent, const Group *group)
    object = _create_toolbar(parent, group->class, group->style);
    evas_object_show(object);
 
-   evas_object_data_set(object, SWALLOW_FUNC, on_swallow_check);
-   evas_object_data_set(object, TEXT_FUNC, on_text_check);
-   evas_object_data_set(object, SIGNAL_FUNC, send_signal);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_SET, 
on_swallow_check, object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_SET, on_text_check, 
object);
+   evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SIGNAL_SEND, 
send_signal, object);
 
    return object;
 }

-- 


Reply via email to