From e21d0970719936e5388671ba257ab6f2d3540bef Mon Sep 17 00:00:00 2001 From: mike_m Date: Mon, 10 Oct 2011 08:33:04 +0000 Subject: [PATCH] elementary: Fix calendar's min-max year set for UTC Signed-off-by: Rajeev Ranjan Signed-off-by: Mike McCormack git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@63950 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_calendar.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c index 9111017..2983694 100644 --- a/src/lib/elm_calendar.c +++ b/src/lib/elm_calendar.c @@ -847,8 +847,11 @@ elm_calendar_min_max_year_set(Evas_Object *obj, int min, int max) max -= 1900; if ((wd->year_min == min) && (wd->year_max == max)) return; wd->year_min = min > 2 ? min : 2; - wd->year_max = max; - if ((max >= wd->year_min) && (wd->selected_time.tm_year > wd->year_max)) + if (max > wd->year_min) + wd->year_max = max; + else + wd->year_max = wd->year_min; + if (wd->selected_time.tm_year > wd->year_max) wd->selected_time.tm_year = wd->year_max; if (wd->selected_time.tm_year < wd->year_min) wd->selected_time.tm_year = wd->year_min; -- 2.7.4