From fd982c3d9796f01cc5d906d171c5ec202fd1927e Mon Sep 17 00:00:00 2001 From: Cristiana Voicu Date: Wed, 31 Oct 2012 15:31:07 +0200 Subject: [PATCH] bitbake: hob: providing details about process state through porgress bar -small changes to the text of the progress bar when parsing recipes [YOCTO #3282] (Bitbake rev: 90c0dfc39c3ce13e53c7c91168dc3401f7df476b) Signed-off-by: Cristiana Voicu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 15 +++++---------- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 6 +++--- bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index e5222da..ecf5371 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -947,10 +947,10 @@ class Builder(gtk.Window): self.package_details_page.refresh_selection() def handler_recipe_populated_cb(self, handler): - self.image_configuration_page.update_progress_bar("Populated recipes", 0.99) + self.image_configuration_page.update_progress_bar("Populating recipes", 0.99) def handler_package_populated_cb(self, handler): - self.image_configuration_page.update_progress_bar("Populated packages", 1.0) + self.image_configuration_page.update_progress_bar("Populating packages", 1.0) def handler_parsing_started_cb(self, handler, message): if self.current_step != self.RCPPKGINFO_POPULATING: @@ -960,12 +960,9 @@ class Builder(gtk.Window): if message["eventname"] == "TreeDataPreparationStarted": fraction = 0.6 + fraction self.image_configuration_page.stop_button.set_sensitive(False) - else: - self.image_configuration_page.stop_button.set_sensitive(True) - - if message["eventname"] == "TreeDataPreparationProgress": self.image_configuration_page.update_progress_bar("Generating dependency tree", fraction) else: + self.image_configuration_page.stop_button.set_sensitive(True) self.image_configuration_page.update_progress_bar(message["title"], fraction) def handler_parsing_cb(self, handler, message): @@ -975,11 +972,9 @@ class Builder(gtk.Window): fraction = message["current"] * 1.0/message["total"] if message["eventname"] == "TreeDataPreparationProgress": fraction = 0.6 + 0.38 * fraction + self.image_configuration_page.update_progress_bar("Generating dependency tree", fraction) else: fraction = 0.6 * fraction - if message["eventname"] == "TreeDataPreparationProgress": - self.image_configuration_page.update_progress_bar("Generating dependency tree", fraction) - else: self.image_configuration_page.update_progress_bar(message["title"], fraction) def handler_parsing_completed_cb(self, handler, message): @@ -990,7 +985,7 @@ class Builder(gtk.Window): fraction = 0.98 else: fraction = 0.6 - self.image_configuration_page.update_progress_bar(message["title"], fraction) + self.image_configuration_page.update_progress_bar("Generating dependency tree", fraction) def handler_build_started_cb(self, running_build): if self.current_step == self.FAST_IMAGE_GENERATING: diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 7d3af6c..350b00b 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py @@ -243,7 +243,7 @@ class HobHandler(gobject.GObject): message["eventname"] = bb.event.getName(event) message["current"] = 0 message["total"] = None - message["title"] = "Parsing recipes: " + message["title"] = "Parsing recipes" self.emit("parsing-started", message) elif isinstance(event, (bb.event.ParseProgress, bb.event.CacheLoadProgress, @@ -252,7 +252,7 @@ class HobHandler(gobject.GObject): message["eventname"] = bb.event.getName(event) message["current"] = event.current message["total"] = event.total - message["title"] = "Parsing recipes: " + message["title"] = "Parsing recipes" self.emit("parsing", message) elif isinstance(event, (bb.event.ParseCompleted, bb.event.CacheLoadCompleted, @@ -261,7 +261,7 @@ class HobHandler(gobject.GObject): message["eventname"] = bb.event.getName(event) message["current"] = event.total message["total"] = event.total - message["title"] = "Parsing recipes: " + message["title"] = "Parsing recipes" self.emit("parsing-completed", message) elif isinstance(event, bb.event.NetworkTestFailed): self.emit("network-failed") diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py index 660319a..b94f35c 100644 --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py @@ -117,7 +117,7 @@ class ImageConfigurationPage (HobPage): def update_progress_bar(self, title, fraction, status=None): if self.stopping == False: self.progress_bar.update(fraction) - self.progress_bar.set_title(title) + self.progress_bar.set_text(title) self.progress_bar.set_rcstyle(status) def show_info_populating(self): -- 2.7.4