rimmed pushed a commit to branch master.

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

commit 86e695da5c4e1b17429d170ec76cb5c0d0fb588d
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Mon Jan 18 18:56:41 2016 +0000

    property_group: in_from and in_range for program properties
---
 src/bin/ui/property_group.c  | 20 ++++++++++++++++++++
 src/bin/ui/property_macros.h | 19 +++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c
index b9c8ab7..a13651b 100644
--- a/src/bin/ui/property_group.c
+++ b/src/bin/ui/property_group.c
@@ -211,6 +211,7 @@ struct _Group_Prop_Data
              Evas_Object *after;
              Evas_Object *after_box;
              Evas_Object *afters_frame; /* it's a frame */
+             Evas_Object *in_from, *in_range;
         } program;
    } attributes;
 };
@@ -1017,7 +1018,9 @@ _on_editor_attribute_changed(void *data,
       case ATTRIBUTE_PROGRAM_TRANSITION_TYPE:
       case ATTRIBUTE_PROGRAM_TRANSITION_FROM_CURRENT:
       case ATTRIBUTE_PROGRAM_IN_FROM:
+         COMMON_1SPINNER_UPDATE(program, in_range, program, double, 1, 
PROGRAM_ARGS)
       case ATTRIBUTE_PROGRAM_IN_RANGE:
+         COMMON_1SPINNER_UPDATE(program, in_from, program, double, 1, 
PROGRAM_ARGS)
       case ATTRIBUTE_PROGRAM_TRANSITION_TIME:
       case ATTRIBUTE_PROGRAM_TRANSITION_VALUE1:
       case ATTRIBUTE_PROGRAM_TRANSITION_VALUE2:
@@ -1943,6 +1946,21 @@ prop_program_action_add(Evas_Object *parent, 
Group_Prop_Data *pd)
 PROGRAM_MULTIPLE_COMBOBOX(target, "Previous_Target", _("target can be part or 
program"), true)
 PROGRAM_MULTIPLE_COMBOBOX(after, "Previous_After", _("after can be program"), 
false)
 
+#define PROGRAM_ATTR_2SPINNER(TEXT, SUB, VALUE1, VALUE2, MEMBER, MIN, MAX, 
STEP, FMT, \
+                              L1_START, L1_END, L2_START, L2_END, TOOLTIP1, 
TOOLTIP2, MULTIPLIER, \
+                              TYPE, DESC1, DESC2) \
+   PROGRAM_SPINNER_CALLBACK(SUB, VALUE1, MEMBER, TYPE, MULTIPLIER, DESC1) \
+   PROGRAM_SPINNER_CALLBACK(SUB, VALUE2, MEMBER, TYPE, MULTIPLIER, DESC2) \
+   COMMON_2SPINNER_ADD(PROGRAM, TEXT, "2swallow", SUB, VALUE1, VALUE2, MEMBER, 
TYPE, MIN, MAX, STEP, FMT, \
+                           L1_START, L1_END, L2_START, L2_END, TOOLTIP1, 
TOOLTIP2, MULTIPLIER)
+
+PROGRAM_ATTR_2SPINNER(_("in"), program, in_from, in_range, program, 0.0, 
9999.0, 0.1, "%.1f", "from:", "", "range:", "",
+                    _("Constant time to wait till program would start"),
+                    _("Random number of seconds (from 0 to 'range') added to 
constant time"),
+                    1, double,
+                    _("in from changed from %.2f to %.2f"),
+                    _("in range changed from %.2f to %.2f"))
+
 static void
 _ui_property_program_set(Evas_Object *property, const char *program)
 {
@@ -1964,6 +1982,8 @@ _ui_property_program_set(Evas_Object *property, const 
char *program)
         elm_box_pack_end(box, item);
         item = prop_program_source_add(box, pd, NULL);
         elm_box_pack_end(box, item);
+        item = prop_program_in_from_in_range_add(box, pd);
+        elm_box_pack_end(box, item);
         item = prop_program_action_add(box, pd);
         elm_box_pack_end(box, item);
         FRAME_PROPERTY_ADD(box, pd->attributes.program.action_params, true, 
_("Action params"), pd->scroller)
diff --git a/src/bin/ui/property_macros.h b/src/bin/ui/property_macros.h
index 9db906b..2158259 100644
--- a/src/bin/ui/property_macros.h
+++ b/src/bin/ui/property_macros.h
@@ -854,6 +854,25 @@ _on_group_##SUB1##_##VALUE##_change(void *data, \
 #define PROGRAM_ATTR_1COMBOBOX_LIST_CALLBACK(TEXT, SUB, VALUE, TYPE, 
DESCRIPTION) \
    COMMON_COMBOBOX_LIST_CALLBACK(TEXT, SUB, VALUE, TYPE, PROGRAM_ARGS, 
DESCRIPTION)
 
+/*****************************************************************************/
+/*                         PROGRAM 1 SPINNER CONTROL                         */
+/*****************************************************************************/
+/**
+ * Macro defines a callback for STATE_ATTR_1(2)SPINNER_ADD.
+ *
+ * @param SUB The prefix of main parameter of state attribute;
+ * @param VALUE The value of state attribute.
+ * @param TYPE The spinner value type: int, double
+ * @param MULTIPLIER The multiplier to convert the value to percent
+ *
+ * @ingroup Property_Macro
+ */
+#define PROGRAM_SPINNER_CALLBACK(SUB, VALUE, MEMBER, TYPE, MULTIPLIER, 
DESCRIPTION) \
+   COMMON_SPINNER_CALLBACK(SUB, VALUE, MEMBER, TYPE, MULTIPLIER, PROGRAM_ARGS, 
DESCRIPTION)
+
+#define PROGRAM_ATTR_2SPINNER_UPDATE(SUB, VALUE1, VALUE2, MEMBER, TYPE, 
MULTIPLIER) \
+   COMMON_1SPINNER_UPDATE(SUB, VALUE1, MEMBER, TYPE,  MULTIPLIER, 
PROGRAM_ARGS) \
+   COMMON_1SPINNER_UPDATE(SUB, VALUE2, MEMBER, TYPE,  MULTIPLIER, PROGRAM_ARGS)
 
 /*****************************************************************************/
 /*                         PART 1 CHECK CONTROL                              */

-- 


Reply via email to