From c46c5605fefa09a125e99e8eb85a85ae8d9077d7 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 21 Sep 2012 15:47:25 +0100 Subject: bitbake: hob: remove confirmation dialog on close This is not necessary for modern applications - instead we just need to check if we're in the middle of a build and if so, do the same thing as pressing the "Stop" button. (Bitbake rev: a79eb5d918239db1dade8134743e6142a4854930) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'bitbake/lib/bb/ui/crumbs/builder.py') diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index cedbf94d10..267fde19b4 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -1025,20 +1025,11 @@ class Builder(gtk.Window): def destroy_window_cb(self, widget, event): if not self.sensitive: return True - lbl = "Do you really want to exit the Hob image creator?" - dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - button = dialog.add_button("Cancel", gtk.RESPONSE_NO) - HobAltButton.style_button(button) - button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) - HobButton.style_button(button) - dialog.set_default_response(gtk.RESPONSE_YES) - response = dialog.run() - dialog.destroy() - if response == gtk.RESPONSE_YES: - gtk.main_quit() - return False - else: + elif self.handler.building: + self.stop_build() return True + else: + gtk.main_quit() def build_packages(self): _, all_recipes = self.recipe_model.get_selected_recipes() -- cgit v1.2.3-54-g00ecf