summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/builder.py
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-03-13 17:10:26 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-15 10:35:17 +0000
commitea8a7a82da8fa1fa3ff89877fa31dad33407d734 (patch)
tree630dbc72caa876b00f6addfd415b68688c7280ab /bitbake/lib/bb/ui/crumbs/builder.py
parenta957dbd0a92642362757a9af3660f693851d9b5c (diff)
downloadpoky-ea8a7a82da8fa1fa3ff89877fa31dad33407d734.tar.gz
Hob: Add stop button for parsing progress
Add a Stop button to allow user to quit the parsing process. (Bitbake rev: a1936ff544f21cde0765f24dc9b0af126ca98752) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/builder.py')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 1363475d3b..1d255acd25 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -443,7 +443,20 @@ class Builder(gtk.Window):
443 self.switch_page(self.MACHINE_SELECTION) 443 self.switch_page(self.MACHINE_SELECTION)
444 444
445 def window_sensitive(self, sensitive): 445 def window_sensitive(self, sensitive):
446 self.set_sensitive(sensitive) 446 self.image_configuration_page.machine_combo.set_sensitive(sensitive)
447 self.image_configuration_page.image_combo.set_sensitive(sensitive)
448 self.image_configuration_page.layer_button.set_sensitive(sensitive)
449 self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)
450 self.image_configuration_page.toolbar.set_sensitive(sensitive)
451 self.image_configuration_page.view_recipes_button.set_sensitive(sensitive)
452 self.image_configuration_page.view_packages_button.set_sensitive(sensitive)
453 self.image_configuration_page.config_build_button.set_sensitive(sensitive)
454
455 self.recipe_details_page.set_sensitive(sensitive)
456 self.package_details_page.set_sensitive(sensitive)
457 self.build_details_page.set_sensitive(sensitive)
458 self.image_details_page.set_sensitive(sensitive)
459
447 if sensitive: 460 if sensitive:
448 self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)) 461 self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
449 else: 462 else:
@@ -482,6 +495,10 @@ class Builder(gtk.Window):
482 fraction = 0 495 fraction = 0
483 if message["eventname"] == "TreeDataPreparationStarted": 496 if message["eventname"] == "TreeDataPreparationStarted":
484 fraction = 0.6 + fraction 497 fraction = 0.6 + fraction
498 self.image_configuration_page.stop_button.set_sensitive(False)
499 else:
500 self.image_configuration_page.stop_button.set_sensitive(True)
501
485 self.image_configuration_page.update_progress_bar(message["title"], fraction) 502 self.image_configuration_page.update_progress_bar(message["title"], fraction)
486 503
487 def handler_parsing_cb(self, handler, message): 504 def handler_parsing_cb(self, handler, message):
@@ -836,6 +853,9 @@ class Builder(gtk.Window):
836 def show_configuration(self): 853 def show_configuration(self):
837 self.switch_page(self.BASEIMG_SELECTED) 854 self.switch_page(self.BASEIMG_SELECTED)
838 855
856 def stop_parse(self):
857 self.handler.cancel_parse()
858
839 def stop_build(self): 859 def stop_build(self):
840 if self.stopping: 860 if self.stopping:
841 lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once," 861 lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"