From: Rajeev Ranjan <rajeev.r@samsung.com>

Subject: [E-devel] [Patch] [Elementary] elm_datetime widget bug fix:
elm_datetime_field_limit_set() API is not working for min/max boundary
conditions

Hi,
   Please review the attached patch for fixing issue in API
elm_datetime_field_limit_set() for boundary values.
It has been created by Sumanth for datetime widget.

[Issue Details]:
  elm_datetime_field_limit_set() API is not working well for boundary
values. 
  [ex: for date, we can't set max limit as 31 and for minute, we can't
set 60 etc.. 
         - it fails at boundary conditions of Min/Max limit for all
datetime fields.]

[Root cause]:
   Boundary condition checking has not been done in a proper way.
   
   [Change Description]:
      Boundary checking condition is corrected and the min/max limit
boundary values are included as API input. 

Signed-Off-By: Sumanth Krishna (sumanth.m@samsung.com)
Signed-Off-By: Rajeev Ranjan (rajeev.r@samsung.com)



SVN revision: 75958
This commit is contained in:
Rajeev Ranjan 2012-09-03 07:24:20 +00:00 committed by Carsten Haitzler
parent c4fa65f2f7
commit 7d626acc64
2 changed files with 11 additions and 4 deletions

View File

@ -431,3 +431,8 @@
* The state of elm_check is now changed by mouse click event.
2012-09-03 Rajeev Ranjan
* Fix min/max limit setting to respect field boundaires EXCEPT
for years which have no boundaries with
elm_datetime_field_limit_set()

View File

@ -934,11 +934,13 @@ elm_datetime_field_limit_set(Evas_Object *obj,
if (min > max) return;
field = sd->field_list + fieldtype;
if ((min > mapping[fieldtype].def_min && min < mapping[fieldtype].def_max)
|| (field->type == ELM_DATETIME_YEAR))
if (((min >= mapping[fieldtype].def_min) &&
(min <= mapping[fieldtype].def_max)) ||
(field->type == ELM_DATETIME_YEAR))
field->min = min;
if ((max > mapping[fieldtype].def_min && max < mapping[fieldtype].def_max)
|| (field->type == ELM_DATETIME_YEAR))
if (((max >= mapping[fieldtype].def_min) &&
(max <= mapping[fieldtype].def_max)) ||
(field->type == ELM_DATETIME_YEAR))
field->max = max;
_apply_field_limits(obj);