forked from enlightenment/efl
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:
parent
c4fa65f2f7
commit
7d626acc64
|
@ -431,3 +431,8 @@
|
||||||
|
|
||||||
* The state of elm_check is now changed by mouse click event.
|
* 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()
|
||||||
|
|
|
@ -934,11 +934,13 @@ elm_datetime_field_limit_set(Evas_Object *obj,
|
||||||
if (min > max) return;
|
if (min > max) return;
|
||||||
|
|
||||||
field = sd->field_list + fieldtype;
|
field = sd->field_list + fieldtype;
|
||||||
if ((min > mapping[fieldtype].def_min && min < mapping[fieldtype].def_max)
|
if (((min >= mapping[fieldtype].def_min) &&
|
||||||
|| (field->type == ELM_DATETIME_YEAR))
|
(min <= mapping[fieldtype].def_max)) ||
|
||||||
|
(field->type == ELM_DATETIME_YEAR))
|
||||||
field->min = min;
|
field->min = min;
|
||||||
if ((max > mapping[fieldtype].def_min && max < mapping[fieldtype].def_max)
|
if (((max >= mapping[fieldtype].def_min) &&
|
||||||
|| (field->type == ELM_DATETIME_YEAR))
|
(max <= mapping[fieldtype].def_max)) ||
|
||||||
|
(field->type == ELM_DATETIME_YEAR))
|
||||||
field->max = max;
|
field->max = max;
|
||||||
|
|
||||||
_apply_field_limits(obj);
|
_apply_field_limits(obj);
|
||||||
|
|
Loading…
Reference in New Issue