}
static void
+_set_month_year(Widget_Data *wd)
+{
+ char *buf;
+
+ /* Set selected month */
+ buf = wd->format_func(&wd->selected_time);
+ if (buf)
+ {
+ edje_object_part_text_set(wd->calendar, "month_text", buf);
+ free(buf);
+ }
+ else
+ edje_object_part_text_set(wd->calendar, "month_text", "");
+}
+
+static void
_populate(Evas_Object *obj)
{
int maxdays, day, mon, year, i;
char part[12], day_s[3];
struct tm first_day;
Eina_List *l;
- char *buf;
Eina_Bool last_row = EINA_TRUE;
Widget_Data *wd = elm_widget_data_get(obj);
mon = wd->selected_time.tm_mon;
year = wd->selected_time.tm_year;
- /* Set selected month */
- buf = wd->format_func(&wd->selected_time);
- if (buf)
- {
- edje_object_part_text_set(wd->calendar, "month_text", buf);
- free(buf);
- }
- else
- edje_object_part_text_set(wd->calendar, "month_text", "");
+ _set_month_year(wd);
/* Set days */
day = 0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
wd->format_func = format_function;
+ _set_month_year(wd);
}
EAPI Elm_Calendar_Mark *