hermet pushed a commit to branch elementary-1.13.

http://git.enlightenment.org/core/elementary.git/commit/?id=a34b8d5472e4d9b3471bdeadf6353ec34ce309d2

commit a34b8d5472e4d9b3471bdeadf6353ec34ce309d2
Author: woochan lee <wc0917....@samsung.com>
Date:   Mon Feb 23 17:48:37 2015 +0900

    datetime: Fix elm_datetime_field_limit_set.
    
    Summary:
    If user sets the limit value using elm_datetime_field_limit_set() API, the 
filed value will be recalculated.
    Even though the value changed in case, value changed signal didn't send to 
user before.
    @fix
    
    Reviewers: seoz, woohyun, Hermet
    
    Reviewed By: Hermet
    
    Differential Revision: https://phab.enlightenment.org/D1980
---
 src/lib/elm_datetime.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lib/elm_datetime.c b/src/lib/elm_datetime.c
index e9fa349..6948e45 100644
--- a/src/lib/elm_datetime.c
+++ b/src/lib/elm_datetime.c
@@ -984,11 +984,13 @@ EOLIAN static void
 _elm_datetime_field_limit_set(Eo *obj, Elm_Datetime_Data *sd, 
Elm_Datetime_Field_Type fieldtype, int min, int max)
 {
    Datetime_Field *field;
+   struct tm old_time;
 
    if (fieldtype >= ELM_DATETIME_AMPM) return;
 
    if (min > max) return;
 
+   old_time = sd->curr_time;
    field = sd->field_list + fieldtype;
    if (((min >= mapping[fieldtype].def_min) &&
         (min <= mapping[fieldtype].def_max)) ||
@@ -1000,6 +1002,9 @@ _elm_datetime_field_limit_set(Eo *obj, Elm_Datetime_Data 
*sd, Elm_Datetime_Field
      field->max = max;
 
    _apply_field_limits(obj);
+
+   if (!_date_cmp(&old_time, &sd->curr_time))
+     evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
 }
 
 EOLIAN static Eina_Bool

-- 


Reply via email to