jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cd1c3e0da7f102bd7922fc9941cd90270bbe9dc6

commit cd1c3e0da7f102bd7922fc9941cd90270bbe9dc6
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Sun Mar 27 11:40:44 2016 +0300

    Clock: adapt test to fit Exactness requirements
    
    Exactness doesn't support mouse clicks pausing/resuming the clock.
    Taken shots are not stable and display a different time.
---
 src/bin/elementary/test_clock.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/bin/elementary/test_clock.c b/src/bin/elementary/test_clock.c
index fdb096f..f80b50b 100644
--- a/src/bin/elementary/test_clock.c
+++ b/src/bin/elementary/test_clock.c
@@ -215,6 +215,16 @@ _hmode_bt_clicked(void *data, Evas_Object *obj, void 
*event_info EINA_UNUSED)
    elm_clock_show_am_pm_set(ck, EINA_FALSE);
 }
 
+static Eina_Bool
+_pause_cb(void *data)
+{
+   Evas_Object *ck = data;
+   Evas_Object *bt = evas_object_data_get(ck, "_button");
+   elm_clock_pause_set(ck, EINA_TRUE);
+   elm_object_text_set(bt, "Resume");
+   return EINA_FALSE;
+}
+
 static void
 _pause_resume_bt_clicked(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
@@ -228,6 +238,7 @@ _pause_resume_bt_clicked(void *data, Evas_Object *obj, void 
*event_info EINA_UNU
      }
    elm_object_text_set(obj, "Pause");
    elm_clock_pause_set(ck, EINA_FALSE);
+   ecore_timer_add(2, _pause_cb, ck);
 }
 
 void
@@ -359,5 +370,8 @@ test_clock_pause(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *eve
    elm_box_pack_end(bx, bt);
    evas_object_show(bt);
 
+   evas_object_data_set(ck, "_button", bt);
+   ecore_timer_add(2, _pause_cb, ck);
+
    evas_object_show(win);
 }

-- 


Reply via email to