hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=81db8e9f328f319a86d45c6016a79170b115fc98

commit 81db8e9f328f319a86d45c6016a79170b115fc98
Author: Woochan Lee <wc0917....@samsung.com>
Date:   Tue Sep 6 16:20:14 2016 +0900

    elm_calendar: Add enum to mark display every day before event day.
    
    Summary:
    There was no way to add marks on every day before event day.
    
    The user may want to add mark something on every day before today.
    (passed mark or disable etc...)
    
    Test Plan:
    Run elementary_test
    Calling "elm_calendar_mark_add()" with ELM_CALENDAR_REVERSE_DAILY value.
    
    Reviewers: cedric, Hermet
    
    Subscribers: cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D4276
---
 src/lib/elementary/elm_calendar.c  | 14 ++++++++++++++
 src/lib/elementary/elm_calendar.eo |  4 ++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_calendar.c 
b/src/lib/elementary/elm_calendar.c
index dc41e9d..2b73a71 100644
--- a/src/lib/elementary/elm_calendar.c
+++ b/src/lib/elementary/elm_calendar.c
@@ -664,6 +664,20 @@ _populate(Evas_Object *obj)
                   ((mtime->tm_year == year) && (mtime->tm_mon <= month))))
                _cit_mark(obj, maxdays + sd->first_day_it - 1, mark->mark_type);
              break;
+
+           case ELM_CALENDAR_REVERSE_DAILY:
+             if (((mtime->tm_year == year) && (mtime->tm_mon > month)) ||
+                 (mtime->tm_year > year))
+               day = maxdays;
+             else if ((mtime->tm_year == year) && (mtime->tm_mon == month))
+               day = mtime->tm_mday - 1;
+             else
+               break;
+             for (; day >= 1; day--)
+               _cit_mark(obj, day + sd->first_day_it - 1,
+                         mark->mark_type);
+             break;
+
           }
      }
    sd->filling = EINA_FALSE;
diff --git a/src/lib/elementary/elm_calendar.eo 
b/src/lib/elementary/elm_calendar.eo
index db137d3..247455e 100644
--- a/src/lib/elementary/elm_calendar.eo
+++ b/src/lib/elementary/elm_calendar.eo
@@ -18,9 +18,9 @@ enum Elm.Calendar.Mark.Repeat.Type
    weekly, [[Marks will be displayed every week after event day (inclusive) - 
i.e. each seven days.]]
    monthly, [[Marks will be displayed every month day that coincides to event 
day. E.g.: if an event is set to 30th Jan, no marks will be displayed on Feb, 
but will be displayed on 30th Mar.]]
    annually, [[Marks will be displayed every year that coincides to event day 
(and month). E.g. an event added to 30th Jan 2012 will be repeated on 30th Jan 
2013.]]
-   last_day_of_month [[Marks will be displayed every last day of month after 
event day (inclusive). 
-
+   last_day_of_month, [[Marks will be displayed every last day of month after 
event day (inclusive).
                        @since 1.7]]
+   reverse_daily [[Marks will be displayed every day before event day. @since 
1.19]]
 }
 
 enum Elm.Calendar.Weekday

-- 


Reply via email to