summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMichael BOUCHAUD <michael.bouchaud@gmail.com>2012-04-19 09:03:59 +0000
committerMichael BOUCHAUD <michael.bouchaud@gmail.com>2012-04-19 09:03:59 +0000
commite52ac2a690306a5a8c74112c38cd9fc29e3ddbb5 (patch)
tree6a66b05ba07d31379d57edf94d8f944098627688 /src/lib
parente1f626acd08287ab9d32aff71d45b87ab9cbea3d (diff)
elemntary: mr proper with council from SeoZ. Add _MODE_ to the enum
SVN revision: 70326
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_calendar.c21
-rw-r--r--src/lib/elm_calendar.h8
2 files changed, 15 insertions, 14 deletions
diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c
index 3b65ce0f1..f90d8fe0e 100644
--- a/src/lib/elm_calendar.c
+++ b/src/lib/elm_calendar.c
@@ -302,7 +302,8 @@ _populate(Evas_Object *obj)
302 if ((wd->selected_it > -1) && (wd->selected_it != i)) 302 if ((wd->selected_it > -1) && (wd->selected_it != i))
303 _unselect(wd, wd->selected_it); 303 _unselect(wd, wd->selected_it);
304 304
305 if (wd->select_mode != ELM_CALENDAR_SELECT_NONE) _select(wd, i); 305 if (wd->select_mode != ELM_CALENDAR_SELECT_MODE_NONE)
306 _select(wd, i);
306 307
307 wd->selected_it = i; 308 wd->selected_it = i;
308 } 309 }
@@ -600,7 +601,7 @@ _update_sel_it(Evas_Object *obj, int sel_it)
600{ 601{
601 int day; 602 int day;
602 Widget_Data *wd = elm_widget_data_get(obj); 603 Widget_Data *wd = elm_widget_data_get(obj);
603 if ((!wd) || (wd->select_mode == ELM_CALENDAR_SELECT_NONE)) 604 if ((!wd) || (wd->select_mode == ELM_CALENDAR_SELECT_MODE_NONE))
604 return; 605 return;
605 606
606 day = _get_item_day(obj, sel_it); 607 day = _get_item_day(obj, sel_it);
@@ -621,7 +622,7 @@ _day_selected(void *data, Evas_Object *obj __UNUSED__, const char *emission __UN
621{ 622{
622 int sel_it; 623 int sel_it;
623 Widget_Data *wd = elm_widget_data_get(data); 624 Widget_Data *wd = elm_widget_data_get(data);
624 if ((!wd) || (wd->select_mode == ELM_CALENDAR_SELECT_NONE)) 625 if ((!wd) || (wd->select_mode == ELM_CALENDAR_SELECT_MODE_NONE))
625 return; 626 return;
626 sel_it = atoi(source); 627 sel_it = atoi(source);
627 628
@@ -668,7 +669,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
668 669
669 if (!wd) return EINA_FALSE; 670 if (!wd) return EINA_FALSE;
670 if (elm_widget_disabled_get(obj)) return EINA_FALSE; 671 if (elm_widget_disabled_get(obj)) return EINA_FALSE;
671 if (wd->select_mode == ELM_CALENDAR_SELECT_NONE) return EINA_FALSE; 672 if (wd->select_mode == ELM_CALENDAR_SELECT_MODE_NONE) return EINA_FALSE;
672 673
673 if ((!strcmp(ev->keyname, "Left")) || 674 if ((!strcmp(ev->keyname, "Left")) ||
674 ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string))) 675 ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
@@ -867,9 +868,9 @@ EINA_DEPRECATED EAPI void
867elm_calendar_day_selection_disabled_set(Evas_Object *obj, Eina_Bool disabled) 868elm_calendar_day_selection_disabled_set(Evas_Object *obj, Eina_Bool disabled)
868{ 869{
869 if (disabled) 870 if (disabled)
870 elm_calendar_select_mode_set(obj, ELM_CALENDAR_SELECT_NONE); 871 elm_calendar_select_mode_set(obj, ELM_CALENDAR_SELECT_MODE_NONE);
871 else 872 else
872 elm_calendar_select_mode_set(obj, ELM_CALENDAR_SELECT_DEFAULT); 873 elm_calendar_select_mode_set(obj, ELM_CALENDAR_SELECT_MODE_DEFAULT);
873} 874}
874 875
875EINA_DEPRECATED EAPI Eina_Bool 876EINA_DEPRECATED EAPI Eina_Bool
@@ -878,7 +879,7 @@ elm_calendar_day_selection_disabled_get(const Evas_Object *obj)
878 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; 879 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
879 Widget_Data *wd = elm_widget_data_get(obj); 880 Widget_Data *wd = elm_widget_data_get(obj);
880 if (!wd) return EINA_FALSE; 881 if (!wd) return EINA_FALSE;
881 return !!(wd->select_mode == ELM_CALENDAR_SELECT_NONE); 882 return !!(wd->select_mode == ELM_CALENDAR_SELECT_MODE_NONE);
882} 883}
883 884
884EAPI void 885EAPI void
@@ -1005,12 +1006,12 @@ elm_calendar_select_mode_set(Evas_Object *obj, Elm_Calendar_Select_Mode mode)
1005 ELM_CHECK_WIDTYPE(obj, widtype); 1006 ELM_CHECK_WIDTYPE(obj, widtype);
1006 Widget_Data *wd = elm_widget_data_get(obj); 1007 Widget_Data *wd = elm_widget_data_get(obj);
1007 if (!wd) return; 1008 if (!wd) return;
1008 if ((mode >= ELM_CALENDAR_SELECT_DEFAULT) 1009 if ((mode >= ELM_CALENDAR_SELECT_MODE_DEFAULT)
1009 && (mode <= ELM_CALENDAR_SELECT_ONDEMAND) 1010 && (mode <= ELM_CALENDAR_SELECT_MODE_ONDEMAND)
1010 && (wd->select_mode != mode)) 1011 && (wd->select_mode != mode))
1011 { 1012 {
1012 wd->select_mode = mode; 1013 wd->select_mode = mode;
1013 if (wd->select_mode == ELM_CALENDAR_SELECT_ALWAYS) 1014 if (wd->select_mode == ELM_CALENDAR_SELECT_MODE_ALWAYS)
1014 _select(wd, wd->selected_it); 1015 _select(wd, wd->selected_it);
1015 else 1016 else
1016 _unselect(wd, wd->selected_it); 1017 _unselect(wd, wd->selected_it);
diff --git a/src/lib/elm_calendar.h b/src/lib/elm_calendar.h
index c33d0500e..6778018ab 100644
--- a/src/lib/elm_calendar.h
+++ b/src/lib/elm_calendar.h
@@ -89,10 +89,10 @@ typedef _Elm_Calendar_Weekday Elm_Calendar_Weekday;
89 89
90typedef enum 90typedef enum
91{ 91{
92 ELM_CALENDAR_SELECT_DEFAULT = 0, /**< Default value. a day is always selected. */ 92 ELM_CALENDAR_SELECT_MODE_DEFAULT = 0, /**< Default value. a day is always selected. */
93 ELM_CALENDAR_SELECT_ALWAYS, /**< a day is always selected. */ 93 ELM_CALENDAR_SELECT_MODE_ALWAYS, /**< a day is always selected. */
94 ELM_CALENDAR_SELECT_NONE, /**< None of the days can be selected. */ 94 ELM_CALENDAR_SELECT_MODE_NONE, /**< None of the days can be selected. */
95 ELM_CALENDAR_SELECT_ONDEMAND /**< User may have selected a day or not. (not supported yet)*/ 95 ELM_CALENDAR_SELECT_MODE_ONDEMAND /**< User may have selected a day or not. (not supported yet)*/
96} _Elm_Calendar_Select_Mode; 96} _Elm_Calendar_Select_Mode;
97 97
98/** 98/**