Patchwork [bitbake-devel,2/4] lib/bb/ui/crumbs: tweak build status display

login
register
mail settings
Submitter Joshua Lock
Date March 27, 2012, 3:30 a.m.
Message ID <2bdc071924ef9ffa1b5ce407acb93a9c35496de6.1332818913.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/24595/
State Accepted
Commit ab508907308e8b1bc1b097df1f583dffd7ef25af
Headers show

Comments

Joshua Lock - March 27, 2012, 3:30 a.m.
Use two lines to display the active task and recipe, per visual design.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/builddetailspage.py |    9 ++++++---
 lib/bb/ui/crumbs/builder.py          |    3 +--
 2 files changed, 7 insertions(+), 5 deletions(-)

Patch

diff --git a/lib/bb/ui/crumbs/builddetailspage.py b/lib/bb/ui/crumbs/builddetailspage.py
index c2f980f..df8304e 100755
--- a/lib/bb/ui/crumbs/builddetailspage.py
+++ b/lib/bb/ui/crumbs/builddetailspage.py
@@ -47,7 +47,7 @@  class BuildDetailsPage (HobPage):
         self.vbox = gtk.VBox(False, 12)
 
         self.progress_box = gtk.VBox(False, 12)
-        self.task_status = gtk.Label()
+        self.task_status = gtk.Label("\n") # to ensure layout is correct
         self.task_status.set_alignment(0.0, 0.5)
         self.progress_box.pack_start(self.task_status, expand=False, fill=False)
         self.progress_hbox = gtk.HBox(False, 6)
@@ -89,11 +89,14 @@  class BuildDetailsPage (HobPage):
         self.back_button.connect("clicked", self.back_button_clicked_cb)
         self.button_box.pack_start(self.back_button, expand=False, fill=False)
 
-    def update_build_status(self, tsk_msg):
+    def update_build_status(self, current, total, task):
+        recipe_path, recipe_task = task.split(", ")
+        recipe = os.path.basename(recipe_path).rstrip(".bb")
+        tsk_msg = "<b>Running task %s of %s:</b> %s\n<b>Recipe:</b> %s" % (current, total, recipe_task, recipe)
         self.task_status.set_markup(tsk_msg)
 
     def reset_build_status(self):
-        self.task_status.set_markup("")
+        self.task_status.set_markup("\n") # to ensure layout is correct
 
     def show_issues(self):
         self.num_of_issues += 1
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index f57a855..1d32a13 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -612,8 +612,7 @@  class Builder(gtk.Window):
             elif message["eventname"] == "runQueueTaskStarted":
                 fraction = 0.2 + 0.8 * fraction
         self.build_details_page.update_progress_bar(title + ": ", fraction)
-        self.build_details_page.update_build_status(
-            "<span weight=\'bold\'>Running task %s of %s:</span> %s" % (message["current"], message["total"], message["task"]))
+        self.build_details_page.update_build_status(message["current"], message["total"], message["task"])
 
     def handler_build_failure_cb(self, running_build):
         self.build_details_page.show_issues()