From 65dc25109802de63e581c6bb71a2641d7aee2df4 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Mon, 26 Dec 2016 18:33:16 +0000 Subject: [PATCH] ui: When tests are running show the build results first As soon as test results appear then show the test panel --- src/bin/edi_consolepanel.c | 1 + src/bin/edi_consolepanel.h | 12 ++++++++++++ src/bin/edi_main.c | 15 ++++++--------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c index ac997ff..45541b6 100644 --- a/src/bin/edi_consolepanel.c +++ b/src/bin/edi_consolepanel.c @@ -233,6 +233,7 @@ _edi_test_line_parse_suite(const char *path) eina_stringshare_del(_current_test_dir); _current_test_dir = eina_stringshare_add(dirname(logpath)); + edi_testpanel_show(); file = eina_file_open(logfile, EINA_FALSE); it = eina_file_map_lines(file); diff --git a/src/bin/edi_consolepanel.h b/src/bin/edi_consolepanel.h index 858cf3c..95835bb 100644 --- a/src/bin/edi_consolepanel.h +++ b/src/bin/edi_consolepanel.h @@ -38,8 +38,20 @@ void edi_consolepanel_add(Evas_Object *parent); */ void edi_consolepanel_show(); +/** + * Initialize a new Edi testpanel and add it to the parent panel. + * + * @param parent The panel into which the panel will be loaded. + * + * @ingroup UI + */ void edi_testpanel_add(Evas_Object *parent); +/** + * Show the Edi testpanel - animating on to screen if required. + * + * @ingroup UI + */ void edi_testpanel_show(); /** diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c index a93acf4..d6f9503 100644 --- a/src/bin/edi_main.c +++ b/src/bin/edi_main.c @@ -620,15 +620,12 @@ _tb_goto_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUS } static Eina_Bool -_edi_build_prep(Evas_Object *button, Eina_Bool test) +_edi_build_prep(Evas_Object *button) { elm_toolbar_item_selected_set(elm_toolbar_selected_item_get(button), EINA_FALSE); edi_consolepanel_clear(); - if (test) - edi_testpanel_show(); - else - edi_consolepanel_show(); + edi_consolepanel_show(); if (!edi_builder_can_build()) { @@ -642,28 +639,28 @@ _edi_build_prep(Evas_Object *button, Eina_Bool test) static void _tb_build_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { - if (_edi_build_prep(obj, EINA_FALSE)) + if (_edi_build_prep(obj)) edi_builder_build(); } static void _tb_test_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { - if (_edi_build_prep(obj, EINA_TRUE)) + if (_edi_build_prep(obj)) edi_builder_test(); } static void _tb_run_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { - if (_edi_build_prep(obj, EINA_FALSE)) + if (_edi_build_prep(obj)) _edi_launcher_run(&_edi_project_config->launch); } static void _tb_clean_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { - if (_edi_build_prep(obj, EINA_FALSE)) + if (_edi_build_prep(obj)) edi_builder_clean(); }