ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=65dc25109802de63e581c6bb71a2641d7aee2df4

commit 65dc25109802de63e581c6bb71a2641d7aee2df4
Author: Andy Williams <[email protected]>
Date:   Mon Dec 26 18:33:16 2016 +0000

    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();
 }
 

-- 


Reply via email to