rimmed pushed a commit to branch master.

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

commit b10270de00168fdbf98fd04255af1682f33d8bc7
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Oct 5 17:52:27 2015 +0300

    property: use editor api for part item aspect mode
---
 src/bin/editor/editor.h      |  3 +++
 src/bin/ui/property.c        |  9 +++++----
 src/bin/ui/property_macros.h | 14 ++------------
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/src/bin/editor/editor.h b/src/bin/editor/editor.h
index b4c4dfe..abcb8d0 100644
--- a/src/bin/editor/editor.h
+++ b/src/bin/editor/editor.h
@@ -429,6 +429,9 @@ Eina_Bool
 editor_part_item_source_set(Evas_Object *obj, Change *change, Eina_Bool merge, 
const char *part_name, const char *item_name,
       const char * new_val);
 Eina_Bool
+editor_part_item_aspect_mode_set(Evas_Object *obj, Change *change, Eina_Bool 
merge, const char *part_name, const char *item_name,
+      Edje_Aspect_Control new_val);
+Eina_Bool
 editor_part_scale_set(Evas_Object *obj, Change *change, Eina_Bool merge, const 
char *part_name,
       Eina_Bool new_val);
 Eina_Bool
diff --git a/src/bin/ui/property.c b/src/bin/ui/property.c
index 82855a7..ac1bfe0 100644
--- a/src/bin/ui/property.c
+++ b/src/bin/ui/property.c
@@ -3563,8 +3563,8 @@ TODO("do not use collection lists from edje_edit 
directly")
                                MAX, STEP, FMT, L1_START, L1_END, L2_START, 
L2_END, \
                                TOOLTIP1, TOOLTIP2, MULTIPLIER)
 
-#define PART_ITEM_ATTR_1COMBOBOX_LIST(TEXT, SUB, VALUE, MEMBER, TYPE, LIST, 
TOOLTIP) \
-   PART_ITEM_ATTR_1COMBOBOX_LIST_CALLBACK(TEXT, SUB, VALUE, TYPE) \
+#define PART_ITEM_ATTR_1COMBOBOX_LIST(TEXT, SUB, VALUE, MEMBER, TYPE, LIST, 
TOOLTIP, DESCRIPTION) \
+   PART_ITEM_ATTR_1COMBOBOX_LIST_CALLBACK(TEXT, SUB, VALUE, TYPE, DESCRIPTION) 
\
    PART_ITEM_ATTR_1COMBOBOX_LIST_ADD(TEXT, SUB, VALUE, MEMBER, LIST, TOOLTIP)
 
 PART_ITEM_ATTR_1COMBOBOX(_("source"), part_item, source, part_item, _("Sets 
the group this object will be made from."),
@@ -3612,8 +3612,9 @@ PART_ITEM_ATTR_2SPINNER(_("spread"), part_item, spread_w, 
spread_h, part_item,
                     1, int,
                     _("part item spread width changed from %d to %d"),
                     _("part item spread height changed from %d to %d"))
-PART_ITEM_ATTR_1COMBOBOX_LIST(_("aspect mode"), part_item, aspect_mode, 
part_item, int, edje_item_aspect_pref,
-                              _("Sets the aspect control hints for this 
object."))
+PART_ITEM_ATTR_1COMBOBOX_LIST(_("aspect mode"), part_item, aspect_mode, 
part_item, Edje_Aspect_Control, edje_item_aspect_pref,
+                              _("Sets the aspect control hints for this 
object."),
+                              _("aspect mode changed to %s"))
 PART_ITEM_ATTR_2SPINNER(_("span_col"), part_item, span_col, span_row, 
part_item,
                         1.0, 999.0, 1.0, NULL, "column:", "", "row:", "",
                         _("Sets how many columns this item will use"), _("Sets 
how many rows this item will use"),
diff --git a/src/bin/ui/property_macros.h b/src/bin/ui/property_macros.h
index 97314f3..f3d9b83 100644
--- a/src/bin/ui/property_macros.h
+++ b/src/bin/ui/property_macros.h
@@ -1227,18 +1227,8 @@ COMMON_2SPINNER_ADD(PART_ITEM, TEXT, STYLE, SUB, VALUE1, 
VALUE2, MEMBER, TYPE, \
  *
  * @ingroup Property_Macro
  */
-#define PART_ITEM_ATTR_1COMBOBOX_LIST_CALLBACK(TEXT, SUB, VALUE, TYPE) \
-static void \
-_on_##SUB##_##VALUE##_change(void *data, \
-                          Evas_Object *obj __UNUSED__, \
-                          void *event_info) \
-{ \
-   Prop_Data *pd = (Prop_Data *)data; \
-   Ewe_Combobox_Item *item = (Ewe_Combobox_Item *)event_info; \
-   edje_edit_##SUB##_##VALUE##_set(pd->group->edit_object PART_ITEM_ARGS, 
(TYPE)item->index); \
-   /*project_changed(false);*/ \
-   evas_object_smart_callback_call(ap.win, SIGNAL_PROPERTY_ATTRIBUTE_CHANGED, 
NULL); \
-}
+#define PART_ITEM_ATTR_1COMBOBOX_LIST_CALLBACK(TEXT, SUB, VALUE, TYPE, 
DESCRIPTION) \
+   COMMON_COMBOBOX_LIST_CALLBACK(TEXT, SUB, VALUE, TYPE, PART_ITEM_ARGS, 
DESCRIPTION)
 
 /*****************************************************************************/
 /*                           STATE 1 CHECK CONTROL                           */

-- 


Reply via email to