summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-04-12 22:22:44 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-13 12:04:19 +0100
commit4997801bad7ae2a43221dd58151c8f2facd03210 (patch)
tree233e0fef9dfa521a935f16da8cc2ee228e2a43e0 /bitbake
parent9c1dcdceb235c53b92a64e741f5a5491b1e489bd (diff)
downloadpoky-4997801bad7ae2a43221dd58151c8f2facd03210.tar.gz
Hob: forbid users to exit Hob directly when Hob is busy
When Hob is busy with generating data, exiting Hob is not allowed. That should be reasonable because at that time the mouse cursor is not a pointer. If users want to exit, they can click "Stop" first and then do exit. That is also a walkaround for [Yocto #2142] (Bitbake rev: ad7f6bf3c7c4c15d546781aaefdaf03f00193f7c) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 410ff5fa85..f414bc7120 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -298,6 +298,9 @@ class Builder(gtk.Window):
298 # Indicate whether user has customized the image 298 # Indicate whether user has customized the image
299 self.customized = False 299 self.customized = False
300 300
301 # Indicate whether the UI is working
302 self.sensitive = True
303
301 # create visual elements 304 # create visual elements
302 self.create_visual_elements() 305 self.create_visual_elements()
303 306
@@ -610,6 +613,7 @@ class Builder(gtk.Window):
610 self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)) 613 self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
611 else: 614 else:
612 self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) 615 self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
616 self.sensitive = sensitive
613 617
614 618
615 def handler_generating_data_cb(self, handler): 619 def handler_generating_data_cb(self, handler):
@@ -764,6 +768,8 @@ class Builder(gtk.Window):
764 self.build_details_page.show_issues() 768 self.build_details_page.show_issues()
765 769
766 def destroy_window_cb(self, widget, event): 770 def destroy_window_cb(self, widget, event):
771 if not self.sensitive:
772 return True
767 lbl = "<b>Do you really want to exit the Hob image creator?</b>" 773 lbl = "<b>Do you really want to exit the Hob image creator?</b>"
768 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) 774 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
769 button = dialog.add_button("Cancel", gtk.RESPONSE_NO) 775 button = dialog.add_button("Cancel", gtk.RESPONSE_NO)