rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=7ab14ba7e0641b0adb1093394949e87078ff0a18

commit 7ab14ba7e0641b0adb1093394949e87078ff0a18
Author: Mykyta Biliavskyi <m.biliavs...@samsung.com>
Date:   Wed Sep 7 15:53:17 2016 +0300

    Property demo: update layout style in swallow for different parts.
---
 src/bin/ui/live_view/elementary/live_widget_common.c |  8 +++++++-
 src/bin/ui/property/property_demo.c                  | 13 ++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/live_view/elementary/live_widget_common.c 
b/src/bin/ui/live_view/elementary/live_widget_common.c
index 20fe4d4..7bbb013 100644
--- a/src/bin/ui/live_view/elementary/live_widget_common.c
+++ b/src/bin/ui/live_view/elementary/live_widget_common.c
@@ -106,6 +106,7 @@ _prev_page_cb(void *data, Evas_Object *obj __UNUSED__, void 
*event_info __UNUSED
 
    elm_naviframe_item_push(nf, _("Page Prev"), NULL, bt, NULL, NULL);
 }
+
 Evas_Object *
 object_generate(Demo_Part *part, Evas_Object *object)
 {
@@ -133,6 +134,8 @@ object_generate(Demo_Part *part, Evas_Object *object)
         switch (widget_type)
           {
            case WIDGET_LAYOUT:
+              if (part->content_style && !strcmp(part->content_style, "None"))
+                return NULL;
               content = elm_layout_add(object);
               elm_layout_file_set(content, ap.project->dev, 
part->content_style);
               break;
@@ -405,7 +408,10 @@ on_swallow_check(void *data __UNUSED__,
 
         part->object = object_generate(part, obj);
         part->change = false;
-        elm_object_part_content_set(obj, part->name, part->object);
+        if (part->object)
+          elm_object_part_content_set(obj, part->name, part->object);
+        else
+          elm_object_part_content_unset(obj, part->name);
      }
 
    if (part->object)
diff --git a/src/bin/ui/property/property_demo.c 
b/src/bin/ui/property/property_demo.c
index 914a181..6bbfcee 100644
--- a/src/bin/ui/property/property_demo.c
+++ b/src/bin/ui/property/property_demo.c
@@ -181,6 +181,14 @@ _fill_combobox_group(Evas_Object *control)
    itc = evas_object_data_get(control, "COMMON_ITC");
 
    elm_genlist_clear(control);
+
+   combobox_item = mem_malloc(sizeof(Combobox_Item));
+   combobox_item->index = i++;
+   combobox_item->data = eina_stringshare_add("None");
+   elm_genlist_item_append(control, itc,
+                           combobox_item, NULL,
+                           ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
    EINA_LIST_FOREACH(ap.project->groups, l, group)
      {
         combobox_item = mem_malloc(sizeof(Combobox_Item));
@@ -340,6 +348,7 @@ _update_cb(Property_Attribute *pa, Property_Action *action)
          break;
       case ATTRIBUTE_DEMO_ITEM_SWALLOW_LAYOUT_GROUP:
          _fill_combobox_group(action->control);
+         elm_object_text_set(action->control, demo_pd.part->content_style);
          break;
       case ATTRIBUTE_DEMO_ITEM_SWALLOW_COLOR:
          property_color_control_color_set(action->control,
@@ -394,12 +403,14 @@ _init_cb(Property_Attribute *pa, Property_Action *action)
 
    switch (action->type.attribute_demo)
      {
+      case ATTRIBUTE_DEMO_ITEM_SWALLOW_LAYOUT_GROUP:
+         elm_object_text_set(action->control, "None");
+      break;
       case ATTRIBUTE_DEMO_ITEM_SWALLOW_PICTURE:
       case ATTRIBUTE_DEMO_ITEM_TEXT_NAME:
       case ATTRIBUTE_DEMO_ITEM_TEXT_CONTENT:
       case ATTRIBUTE_DEMO_ITEM_SWALLOW_NAME:
       case ATTRIBUTE_DEMO_ITEM_SWALLOW_STYLE:
-      case ATTRIBUTE_DEMO_ITEM_SWALLOW_LAYOUT_GROUP:
       case ATTRIBUTE_DEMO_ITEM_SWALLOW_COLOR:
       case ATTRIBUTE_DEMO_ITEM_PROGRAM_SIGNAL:
       case ATTRIBUTE_DEMO_ITEM_PROGRAM_SOURCE:

-- 


Reply via email to