{
Action_Area_Data *adata;
char buf[128];
- unsigned int index = idx - 1, i = 0, position = 0;
+ unsigned int num = idx - 1, i = 0, position = 0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (index >= ELM_POPUP_ACTION_BUTTON_MAX) return;
- if (wd->buttons[index])
- _button_remove(obj, wd->buttons[index]->btn, EINA_TRUE);
+ if (num >= ELM_POPUP_ACTION_BUTTON_MAX) return;
+ if (wd->buttons[num])
+ _button_remove(obj, wd->buttons[num]->btn, EINA_TRUE);
if (btn)
{
wd->button_count++;
adata = ELM_NEW(Action_Area_Data);
adata->obj = obj;
adata->btn = btn;
- wd->buttons[index] = adata;
+ wd->buttons[num] = adata;
/* Adding delete_me state inside action data as unset calls _sub_del
too and before setting a new content, the previous one needs to
be unset in order to avoid unwanted deletion. This way rearrangement
static Evas_Object *
_action_button_get(Evas_Object *obj, unsigned int idx)
{
- unsigned int index = idx - 1;
+ unsigned int num = idx - 1;
Evas_Object *button = NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd || !wd->button_count) return NULL;
- if (wd->buttons[index])
- button = wd->buttons[index]->btn;
+ if (wd->buttons[num])
+ button = wd->buttons[num]->btn;
return button;
}
static Evas_Object *
_action_button_unset(Evas_Object *obj, unsigned int idx)
{
- unsigned int index = idx -1;
+ unsigned int num = idx -1;
Evas_Object *button = NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if ((!wd->button_count) || (index >= ELM_POPUP_ACTION_BUTTON_MAX))
+ if ((!wd->button_count) || (num >= ELM_POPUP_ACTION_BUTTON_MAX))
return NULL;
- if (wd->buttons[index])
+ if (wd->buttons[num])
{
- button = wd->buttons[index]->btn;
+ button = wd->buttons[num]->btn;
_button_remove(obj, button, EINA_FALSE);
}
return button;
static void
_populate(Evas_Object *obj)
{
- int maxdays, day, mon, year, i;
+ int maxdays, day, mon, yr, i;
Elm_Calendar_Mark *mark;
char part[12], day_s[3];
struct tm first_day;
maxdays = _maxdays_get(&wd->selected_time);
mon = wd->selected_time.tm_mon;
- year = wd->selected_time.tm_year;
+ yr = wd->selected_time.tm_year;
_set_month_year(wd);
if ((day == wd->current_time.tm_mday)
&& (mon == wd->current_time.tm_mon)
- && (year == wd->current_time.tm_year))
+ && (yr == wd->current_time.tm_year))
_today(wd, i);
if (day == wd->selected_time.tm_mday)
}
static void
-_apply_range_restrictions(Evas_Object *obj, struct tm *time)
+_apply_range_restrictions(Evas_Object *obj, struct tm *tim)
{
Widget_Data *wd;
unsigned int idx;
int val, min, max;
wd = elm_widget_data_get(obj);
- if (!wd || !time) return;
+ if (!wd || !tim) return;
- DATETIME_TM_ARRAY(timearr, time);
+ DATETIME_TM_ARRAY(timearr, tim);
for (idx = ELM_DATETIME_MONTH; idx < DATETIME_TYPE_COUNT - 1; idx++)
{
val = *timearr[idx];
min = mapping[idx].def_min;
max = mapping[idx].def_max;
if (idx == ELM_DATETIME_DATE)
- max = _max_days_get(time->tm_year, time->tm_mon);
+ max = _max_days_get(tim->tm_year, tim->tm_mon);
if (val < min)
*timearr[idx] = min;
else if (val > max)