summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/elementary/test_calendar.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/bin/elementary/test_calendar.c b/src/bin/elementary/test_calendar.c
index d4c08d3752..34064395ac 100644
--- a/src/bin/elementary/test_calendar.c
+++ b/src/bin/elementary/test_calendar.c
@@ -420,7 +420,7 @@ _cal_format_cb(void *data EINA_UNUSED, Eina_Strbuf *str, const Eina_Value value)
420void 420void
421test_efl_ui_calendar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 421test_efl_ui_calendar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
422{ 422{
423 Evas_Object *win, *box, *cal; 423 Evas_Object *win, *box;
424 struct tm selected_date, min_date, max_date; 424 struct tm selected_date, min_date, max_date;
425 time_t current_date; 425 time_t current_date;
426 426
@@ -433,20 +433,26 @@ test_efl_ui_calendar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
433 433
434 win = efl_add(EFL_UI_WIN_CLASS, NULL, 434 win = efl_add(EFL_UI_WIN_CLASS, NULL,
435 efl_text_set(efl_added, "Efl Ui Calendar"), 435 efl_text_set(efl_added, "Efl Ui Calendar"),
436 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 436 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
437 437
438 box = efl_add(EFL_UI_BOX_CLASS, win, 438 box = efl_add(EFL_UI_BOX_CLASS, win,
439 efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
440 efl_content_set(win, efl_added)); 439 efl_content_set(win, efl_added));
441 440
442 cal = efl_add(EFL_UI_CALENDAR_CLASS, win, 441 efl_add(EFL_UI_CALENDAR_CLASS, win,
443 efl_ui_calendar_date_min_set(efl_added, min_date), 442 efl_ui_calendar_date_min_set(efl_added, min_date),
444 efl_ui_calendar_date_max_set(efl_added, max_date), 443 efl_ui_calendar_date_max_set(efl_added, max_date),
445 efl_ui_calendar_date_set(efl_added, selected_date), 444 efl_ui_calendar_date_set(efl_added, selected_date),
446 efl_event_callback_add(efl_added, EFL_UI_CALENDAR_EVENT_CHANGED, _cal_changed_cb, NULL), 445 efl_event_callback_add(efl_added, EFL_UI_CALENDAR_EVENT_CHANGED, _cal_changed_cb, NULL),
447 efl_pack(box, efl_added)); 446 efl_ui_format_string_set(efl_added, "%b"),
448 447 efl_pack(box, efl_added));
449 efl_ui_format_cb_set(cal, NULL, _cal_format_cb, NULL); 448
449 efl_add(EFL_UI_CALENDAR_CLASS, win,
450 efl_ui_calendar_date_min_set(efl_added, min_date),
451 efl_ui_calendar_date_max_set(efl_added, max_date),
452 efl_ui_calendar_date_set(efl_added, selected_date),
453 efl_event_callback_add(efl_added, EFL_UI_CALENDAR_EVENT_CHANGED, _cal_changed_cb, NULL),
454 efl_ui_format_cb_set(efl_added, NULL, _cal_format_cb, NULL),
455 efl_pack(box, efl_added));
450 456
451 efl_gfx_size_set(win, EINA_SIZE2D(300, 300)); 457 efl_gfx_size_set(win, EINA_SIZE2D(300, 300));
452} 458}