rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=44d3fae52686e9a7c9e2f567a610b51fd9d0df57

commit 44d3fae52686e9a7c9e2f567a610b51fd9d0df57
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Fri Mar 18 15:42:48 2016 +0200

    property_demo_program: show info when program was selected in demo
---
 src/bin/ui/property.c              |  6 +++---
 src/bin/ui/property_demo_program.c |  1 +
 src/bin/ui/workspace/demo_group.c  | 28 ++++++++++++++++++++--------
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/src/bin/ui/property.c b/src/bin/ui/property.c
index dff690d..5310947 100644
--- a/src/bin/ui/property.c
+++ b/src/bin/ui/property.c
@@ -287,13 +287,13 @@ _on_demo_program_clicked(void *data,
 {
    Evas_Object *property = data;
    PROP_DATA_GET()
-   Demo_Part *part = (Demo_Part *) event_info;
+   Demo_Signal *part = (Demo_Signal *) event_info;
 
    assert(pd != NULL);
 
    ui_property_group_unset(pd->group_property);
    elm_object_content_unset(pd->layout);
-   elm_object_content_set(pd->layout, pd->demo_swallow_property);
+   elm_object_content_set(pd->layout, pd->demo_program_property);
    evas_object_hide(pd->group_property);
    evas_object_hide(pd->image_property);
    evas_object_hide(pd->sound_property);
@@ -302,7 +302,7 @@ _on_demo_program_clicked(void *data,
    evas_object_hide(pd->demo_swallow_property);
    evas_object_show(pd->demo_program_property);
 
-   ui_property_demo_swallow_part_set(pd->demo_swallow_property, part);
+   ui_property_demo_program_set(pd->demo_program_property, part);
 
    pd->type = DEMO_PROGRAM_PROPERTY;
 }
diff --git a/src/bin/ui/property_demo_program.c 
b/src/bin/ui/property_demo_program.c
index d6cebca..c26cbf1 100644
--- a/src/bin/ui/property_demo_program.c
+++ b/src/bin/ui/property_demo_program.c
@@ -184,6 +184,7 @@ ui_property_demo_program_add(Evas_Object *parent)
    item = prop_item_label_add(pd->box, &pd->signal_name, _("emit signal"), _(" 
- "));
    elm_box_pack_end(pd->box, item);
    item = prop_item_label_add(pd->box, &pd->emitter, _("emitter"), _(" - "));
+   elm_box_pack_end(pd->box, item);
 
    elm_object_content_set(pd->frame, pd->box);
 
diff --git a/src/bin/ui/workspace/demo_group.c 
b/src/bin/ui/workspace/demo_group.c
index cbb6529..0fcae73 100644
--- a/src/bin/ui/workspace/demo_group.c
+++ b/src/bin/ui/workspace/demo_group.c
@@ -183,21 +183,33 @@ _expanded_cb(void *data,
      }
 }
 static void
-_selected_cb(void *data __UNUSED__,
+_selected_cb(void *data,
              Evas_Object *o __UNUSED__,
-             void *event_info __UNUSED__)
+             void *event_info)
 {
-   Elm_Object_Item *glit = (Elm_Object_Item *)event_info;
-   Demo_Part *part = (Demo_Part *)elm_object_item_data_get(glit);
-
-   if ((part->type == EDJE_PART_TYPE_TEXT) ||
-       (part->type == EDJE_PART_TYPE_TEXTBLOCK))
+   Elm_Object_Item *glit = (Elm_Object_Item *)event_info, *plit;
+   Part_Demo_List *pl = data;
+   Demo_Signal *signal = NULL;
+   Demo_Part *part = NULL;
+
+   plit = elm_genlist_item_parent_get(glit);
+   if (plit == pl->it_signal)
+     signal = (Demo_Signal *)elm_object_item_data_get(glit);
+   else
+     part = (Demo_Part *)elm_object_item_data_get(glit);
+
+   if ((plit == pl->it_text) &&
+       ((part->type == EDJE_PART_TYPE_TEXT) ||
+        (part->type == EDJE_PART_TYPE_TEXTBLOCK)))
      evas_object_smart_callback_call(ap.win, SIGNAL_DEMO_TEXT_PART_CLICKED, 
part);
-   else if (part->type == EDJE_PART_TYPE_SWALLOW)
+   else if ((plit == pl->it_swallow) && (part->type == EDJE_PART_TYPE_SWALLOW))
      evas_object_smart_callback_call(ap.win, SIGNAL_DEMO_SWALLOW_PART_CLICKED, 
part);
+   else if (plit == pl->it_signal)
+     evas_object_smart_callback_call(ap.win, SIGNAL_DEMO_PROGRAM_PART_CLICKED, 
signal);
    else /* empty everything */
      evas_object_smart_callback_call(ap.win, SIGNAL_DIFFERENT_TAB_CLICKED, 
NULL);
 }
+
 static void
 _clicked_cb(void *data,
             Evas_Object *o __UNUSED__,

-- 


Reply via email to