elementary: add an enum for mark repeat type, ELM_CALENDAR_LAST_DAY_OF_MONTH. fix...
authorMichael BOUCHAUD <michael.bouchaud@gmail.com>
Thu, 14 Jun 2012 17:10:31 +0000 (17:10 +0000)
committerMichael BOUCHAUD <michael.bouchaud@gmail.com>
Thu, 14 Jun 2012 17:10:31 +0000 (17:10 +0000)
SVN revision: 72145

src/lib/elm_calendar.c
src/lib/elm_calendar.h

index d8ee26e..7bcf1c0 100644 (file)
@@ -425,6 +425,12 @@ _populate(Evas_Object *obj)
                  (mtime->tm_mday <= maxdays))
                _cit_mark(obj, mday_it, mark->mark_type);
              break;
+
+           case ELM_CALENDAR_LAST_DAY_OF_MONTH:
+             if (((mtime->tm_year < year) ||
+                  ((mtime->tm_year == year) && (mtime->tm_mon <= month))))
+               _cit_mark(obj, maxdays + sd->first_day_it - 1, mark->mark_type);
+             break;
           }
      }
 }
index 1eba90f..1f68b1e 100644 (file)
@@ -49,7 +49,8 @@ typedef enum
    ELM_CALENDAR_DAILY, /**< Marks will be displayed every day after event day (inclusive). */
    ELM_CALENDAR_WEEKLY, /**< Marks will be displayed every week after event day (inclusive) - i.e. each seven days. */
    ELM_CALENDAR_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*/
-   ELM_CALENDAR_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. */
+   ELM_CALENDAR_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. */
+   ELM_CALENDAR_LAST_DAY_OF_MONTH /**< Marks will be displayed every last day of month after event day (inclusive).  @since 1.1.0 */
 } _Elm_Calendar_Mark_Repeat_Type;
 
 /**