diff options
author | Joshua Lock <josh@linux.intel.com> | 2012-03-27 17:02:27 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-29 21:12:57 +0100 |
commit | 57434b40b8823969b2b4e88c327857f03722bd9e (patch) | |
tree | 4549f52f08743d1537bd9c396ad5fe11d2a1c18d /bitbake/lib/bb/ui | |
parent | 7463dd803a06666c69488e522327d0e9761a20ea (diff) | |
download | poky-57434b40b8823969b2b4e88c327857f03722bd9e.tar.gz |
lib/bb/ui/crumbs: hob progress bar should not be red when user stops build
If the user explicitly stops the build telling them the build failed is a
misnomer.
(Bitbake rev: 722f4f0e31f9debf5ad20a91da759a8c25151567)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builddetailspage.py | 2 | ||||
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 21 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/progressbar.py | 8 |
5 files changed, 22 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py index abbee4c5b2..1440039c3e 100755 --- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py | |||
@@ -213,7 +213,7 @@ class BuildDetailsPage (HobPage): | |||
213 | self.show_all() | 213 | self.show_all() |
214 | self.back_button.hide() | 214 | self.back_button.hide() |
215 | 215 | ||
216 | def update_progress_bar(self, title, fraction, status=True): | 216 | def update_progress_bar(self, title, fraction, status=None): |
217 | self.progress_bar.update(fraction) | 217 | self.progress_bar.update(fraction) |
218 | self.progress_bar.set_title(title) | 218 | self.progress_bar.set_title(title) |
219 | self.progress_bar.set_rcstyle(status) | 219 | self.progress_bar.set_rcstyle(status) |
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 8390a0cf06..0c00d2a6de 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -608,13 +608,20 @@ class Builder(gtk.Window): | |||
608 | self.stopping = False | 608 | self.stopping = False |
609 | 609 | ||
610 | def build_failed(self): | 610 | def build_failed(self): |
611 | if self.current_step == self.FAST_IMAGE_GENERATING: | 611 | if self.stopping: |
612 | fraction = 0.9 | 612 | status = "stop" |
613 | elif self.current_step == self.IMAGE_GENERATING: | 613 | message = "Build stopped: " |
614 | fraction = 1.0 | 614 | fraction = self.build_details_page.progress_bar.get_fraction() |
615 | elif self.current_step == self.PACKAGE_GENERATING: | 615 | else: |
616 | fraction = 1.0 | 616 | if self.current_step == self.FAST_IMAGE_GENERATING: |
617 | self.build_details_page.update_progress_bar("Build Failed: ", fraction, False) | 617 | fraction = 0.9 |
618 | elif self.current_step == self.IMAGE_GENERATING: | ||
619 | fraction = 1.0 | ||
620 | elif self.current_step == self.PACKAGE_GENERATING: | ||
621 | fraction = 1.0 | ||
622 | status = "fail" | ||
623 | message = "Build failed: " | ||
624 | self.build_details_page.update_progress_bar(message, fraction, status) | ||
618 | self.build_details_page.show_back_button() | 625 | self.build_details_page.show_back_button() |
619 | self.build_details_page.hide_stop_button() | 626 | self.build_details_page.hide_stop_button() |
620 | self.handler.build_failed_async() | 627 | self.handler.build_failed_async() |
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 1aa055edff..9927370f91 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py | |||
@@ -735,7 +735,7 @@ class DeployImageDialog (CrumbsDialog): | |||
735 | cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\"" | 735 | cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\"" |
736 | subprocess.Popen(args=shlex.split(cmdline)) | 736 | subprocess.Popen(args=shlex.split(cmdline)) |
737 | 737 | ||
738 | def update_progress_bar(self, title, fraction, status=True): | 738 | def update_progress_bar(self, title, fraction, status=None): |
739 | self.progress_bar.update(fraction) | 739 | self.progress_bar.update(fraction) |
740 | self.progress_bar.set_title(title) | 740 | self.progress_bar.set_title(title) |
741 | self.progress_bar.set_rcstyle(status) | 741 | self.progress_bar.set_rcstyle(status) |
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py index 84c9c083cb..0f59dd980a 100644 --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | |||
@@ -105,7 +105,7 @@ class ImageConfigurationPage (HobPage): | |||
105 | self.set_config_machine_layout(show_progress_bar = False) | 105 | self.set_config_machine_layout(show_progress_bar = False) |
106 | self.show_all() | 106 | self.show_all() |
107 | 107 | ||
108 | def update_progress_bar(self, title, fraction, status=True): | 108 | def update_progress_bar(self, title, fraction, status=None): |
109 | self.progress_bar.update(fraction) | 109 | self.progress_bar.update(fraction) |
110 | self.progress_bar.set_title(title) | 110 | self.progress_bar.set_title(title) |
111 | self.progress_bar.set_rcstyle(status) | 111 | self.progress_bar.set_rcstyle(status) |
diff --git a/bitbake/lib/bb/ui/crumbs/progressbar.py b/bitbake/lib/bb/ui/crumbs/progressbar.py index 882d461711..f75818ac76 100644 --- a/bitbake/lib/bb/ui/crumbs/progressbar.py +++ b/bitbake/lib/bb/ui/crumbs/progressbar.py | |||
@@ -29,10 +29,12 @@ class HobProgressBar (gtk.ProgressBar): | |||
29 | def set_rcstyle(self, status): | 29 | def set_rcstyle(self, status): |
30 | rcstyle = gtk.RcStyle() | 30 | rcstyle = gtk.RcStyle() |
31 | rcstyle.fg[2] = gtk.gdk.Color(HobColors.BLACK) | 31 | rcstyle.fg[2] = gtk.gdk.Color(HobColors.BLACK) |
32 | if status: | 32 | if status == "stop": |
33 | rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING) | 33 | rcstyle.bg[3] = gtk.gdk.Color(HobColors.WARNING) |
34 | else: | 34 | elif status == "fail": |
35 | rcstyle.bg[3] = gtk.gdk.Color(HobColors.ERROR) | 35 | rcstyle.bg[3] = gtk.gdk.Color(HobColors.ERROR) |
36 | else: | ||
37 | rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING) | ||
36 | self.modify_style(rcstyle) | 38 | self.modify_style(rcstyle) |
37 | 39 | ||
38 | def set_title(self, text=None): | 40 | def set_title(self, text=None): |