[E-devel] Patch for deprecating enum.

2012-02-29 Thread Elevate Efl
Kindly suggest if there is a better way.

Regards,
Sanjeev
From e416dc65d91ade776aa83bcb558faebf84045939 Mon Sep 17 00:00:00 2001
From: Sanjeev BA iamsanj...@gmail.com
Date: Thu, 1 Mar 2012 11:22:55 +0900
Subject: [PATCH 3/3] Rename enum based on review comment.

Signed-off-by: Sanjeev BA iamsanj...@gmail.com
---
 trunk/elementary/doc/examples.dox   |2 +-
 trunk/elementary/src/lib/elm_calendar.c |6 ++--
 trunk/elementary/src/lib/elm_calendar.h |   32 ++
 3 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/trunk/elementary/doc/examples.dox b/trunk/elementary/doc/examples.dox
index 9b08137..8701e77 100644
--- a/trunk/elementary/doc/examples.dox
+++ b/trunk/elementary/doc/examples.dox
@@ -1325,7 +1325,7 @@
  * Periodicity is how frequently the mark will be displayed over the
  * calendar.  Can be a unique mark (that don't repeat), or it can repeat
  * daily, weekly, monthly or annually. It's enumerated by
- * @c Elm_Calendar_Mark_Repeat.
+ * @c Elm_Calendar_Mark_Repeat_Type.
  *
  * So let's add some marks to our calendar. We will add christmas holiday,
  * set Sundays as holidays, and check current day and day after that.
diff --git a/trunk/elementary/src/lib/elm_calendar.c b/trunk/elementary/src/lib/elm_calendar.c
index 5f82b7c..e2ffb62 100644
--- a/trunk/elementary/src/lib/elm_calendar.c
+++ b/trunk/elementary/src/lib/elm_calendar.c
@@ -39,7 +39,7 @@ struct _Elm_Calendar_Mark
Eina_List *node;
struct tm mark_time;
const char *mark_type;
-   Elm_Calendar_Mark_Repeat repeat;
+   Elm_Calendar_Mark_Repeat_Type repeat;
 };
 
 static const char *widtype = NULL;
@@ -69,7 +69,7 @@ static int _days_in_month[2][12] =
 };
 
 static Elm_Calendar_Mark *
-_mark_new(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat)
+_mark_new(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat)
 {
Widget_Data *wd = elm_widget_data_get(obj);
Elm_Calendar_Mark *mark;
@@ -937,7 +937,7 @@ elm_calendar_format_function_set(Evas_Object *obj, char * (*format_function) (st
 }
 
 EAPI Elm_Calendar_Mark *
-elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat)
+elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat_Type repeat)
 {
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
diff --git a/trunk/elementary/src/lib/elm_calendar.h b/trunk/elementary/src/lib/elm_calendar.h
index 0d0d284..e119fe6 100644
--- a/trunk/elementary/src/lib/elm_calendar.h
+++ b/trunk/elementary/src/lib/elm_calendar.h
@@ -26,9 +26,18 @@
  * @{
  */
 
+typedef enum
+{
+   ELM_CALENDAR_UNIQUE, /** Default value. Marks will be displayed only on event day. */
+   ELM_CALENDAR_DAILY, /** Marks will be displayed everyday 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_Mark_Repeat_Type;
+
 /**
- * @enum _Elm_Calendar_Mark_Repeat
- * @typedef Elm_Calendar_Mark_Repeat
+ * @enum _Elm_Calendar_Mark_Repeat_Type
+ * @typedef Elm_Calendar_Mark_Repeat_Type
  *
  * Event periodicity, used to define if a mark should be repeated
  * @b beyond event's day. It's set when a mark is added.
@@ -43,17 +52,14 @@
  *
  * @ingroup Calendar
  */
-typedef enum
-{
-   ELM_CALENDAR_UNIQUE, /** Default value. Marks will be displayed only on event day. */
-   ELM_CALENDAR_DAILY, /** Marks will be displayed everyday 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_Mark_Repeat;
-// XXX: Elm_Calendar_Mark_Repeat_Type
+typedef _Elm_Calendar_Mark_Repeat_Type Elm_Calendar_Mark_Repeat_Type;
+
+/*
+ * @deprecated Use Elm_Calendar_Mark_Repeat_Type
+ */
+typedef _Elm_Calendar_Mark_Repeat_Type Elm_Calendar_Mark_Repeat EINA_DEPRECATED;
 
-typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark;/** Item handle for a calendar mark. Created with elm_calendar_mark_add() and deleted with 

Re: [E-devel] Patch for deprecating enum.

2012-02-29 Thread Daniel Juyung Seo
This looks good :)

1. I kindly recommend to add below line to elm_deprecated.h
typedef _Elm_Calendar_Mark_Repeat_Type Elm_Calendar_Mark_Repeat EINA_DEPRECATED;

2. Why did you make this change?
-typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark;/** Item
handle for a calendar mark. Created with elm_calendar_mark_add() and
deleted with elm_calendar_mark_del(). */
+typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark ;/** Item
handle for a calendar mark. Created with elm_calendar_mark_add() and
deleted with elm_calendar_mark_del(). */

Thanks!

Daniel Juyung Seo (SeoZ)

On Thu, Mar 1, 2012 at 11:26 AM, Elevate Efl eflel...@gmail.com wrote:
 Kindly suggest if there is a better way.

 Regards,
 Sanjeev

 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.
 http://www.accelacomm.com/jaw/sfnl/114/51521223/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Patch for deprecating enum.

2012-02-29 Thread Elevate Efl
On Thu, Mar 1, 2012 at 11:38 AM, Daniel Juyung Seo seojuyu...@gmail.comwrote:

 This looks good :)

 1. I kindly recommend to add below line to elm_deprecated.h
 typedef _Elm_Calendar_Mark_Repeat_Type Elm_Calendar_Mark_Repeat
 EINA_DEPRECATED;


Ok.



 2. Why did you make this change?
 -typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark;/** Item
 handle for a calendar mark. Created with elm_calendar_mark_add() and
 deleted with elm_calendar_mark_del(). */
 +typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark ;/** Item
 handle for a calendar mark. Created with elm_calendar_mark_add() and
 deleted with elm_calendar_mark_del(). */


Oops..unintended typo. Will fix that one.


 Thanks!

 Daniel Juyung Seo (SeoZ)

 On Thu, Mar 1, 2012 at 11:26 AM, Elevate Efl eflel...@gmail.com wrote:
  Kindly suggest if there is a better way.
 
  Regards,
  Sanjeev
 
 
 --
  Virtualization  Cloud Management Using Capacity Planning
  Cloud computing makes use of virtualization - but cloud computing
  also focuses on allowing computing to be delivered as a service.
  http://www.accelacomm.com/jaw/sfnl/114/51521223/
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.
 http://www.accelacomm.com/jaw/sfnl/114/51521223/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel