rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=8d0c55d1fca770ab1e536a146668c9128dcf2bf8

commit 8d0c55d1fca770ab1e536a146668c9128dcf2bf8
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Tue Dec 22 15:25:26 2015 +0200

    property_demo_swallow: list of different types of swallows to set
---
 src/bin/ui/property_demo_swallow.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/src/bin/ui/property_demo_swallow.c 
b/src/bin/ui/property_demo_swallow.c
index e37af84..0ec3132 100644
--- a/src/bin/ui/property_demo_swallow.c
+++ b/src/bin/ui/property_demo_swallow.c
@@ -54,6 +54,11 @@ struct _Demo_Swallow_Prop_Data
 };
 typedef struct _Demo_Swallow_Prop_Data Demo_Swallow_Prop_Data;
 
+static const char *swallow_content_type[] = { N_("None"),
+                                         N_("Rectangle"),
+                                         N_("Picture"),
+                                         N_("Widget"),
+                                         NULL};
 
 TODO("move from here, property_demo_text and property_group all common stuff")
 static Evas_Object *
@@ -71,6 +76,30 @@ prop_item_label_add(Evas_Object *parent,
    return item;
 }
 
+static void
+_on_content_set(void *data,
+                Evas_Object *obj __UNUSED__,
+                void *event_info)
+{
+   Demo_Swallow_Prop_Data *pd __UNUSED__ = (Demo_Swallow_Prop_Data *)data;
+   Ewe_Combobox_Item *item = (Ewe_Combobox_Item *)event_info;
+   if (item->index == 0)
+     return;
+}
+
+static Evas_Object *
+prop_swallow_content_add(Evas_Object *parent, Demo_Swallow_Prop_Data *pd)
+{
+   int i;
+   PROPERTY_ITEM_ADD(parent, _("Content Set"), "1swallow")
+   EWE_COMBOBOX_ADD(parent, pd->swallow_content)
+   for (i = 0; swallow_content_type[i]; 
ewe_combobox_item_add(pd->swallow_content, swallow_content_type[i]), i++) ;
+   evas_object_smart_callback_add(pd->swallow_content, "selected", 
_on_content_set, pd);
+   elm_layout_content_set(item, "elm.swallow.content", pd->swallow_content);
+   ewe_combobox_select_item_set(pd->swallow_content, 0);
+   return item;
+}
+
 void
 ui_property_demo_swallow_part_set(Evas_Object *property, Part_ *part)
 {
@@ -108,6 +137,8 @@ ui_property_demo_swallow_add(Evas_Object *parent)
    elm_box_align_set(pd->box, 0.5, 0.0);
    item = prop_item_label_add(pd->box, &pd->name, _("name"), _(" - "));
    elm_box_pack_end(pd->box, item);
+   item = prop_swallow_content_add(pd->box, pd);
+   elm_box_pack_end(pd->box, item);
 
    return pd->box;
 }

-- 


Reply via email to