Patchwork [bitbake-devel,1/2] hob: remove confirmation dialog on close

login
register
mail settings
Submitter Paul Eggleton
Date Sept. 20, 2012, 3:47 p.m.
Message ID <ec7f43d0fa2b9d3e276c196b4ab9e11935b315af.1348155869.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/36983/
State New
Headers show

Comments

Paul Eggleton - Sept. 20, 2012, 3:47 p.m.
This is not necessary for modern applications.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
Paul Eggleton - Sept. 21, 2012, 2:04 p.m.
On Thursday 20 September 2012 16:47:37 Paul Eggleton wrote:
> This is not necessary for modern applications.

So, it turns out that this confirmation dialog is currently the only thing 
standing in the way of closing the application during a build, which is also 
wrong. After discussing with Belen what it ought to be doing is doing the same 
thing as clicking the Stop button when a build is in progress.

Please ignore the whole series, since I have an additional patch to add in v2 
on top of fixing this issue.

Cheers,
Paul

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 9e9d040..3dcb795 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -1021,20 +1021,7 @@  class Builder(gtk.Window):
     def destroy_window_cb(self, widget, event):
         if not self.sensitive:
             return True
-        lbl = "<b>Do you really want to exit the Hob image creator?</b>"
-        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:
-            return True
+        gtk.main_quit()
 
     def build_packages(self):
         _, all_recipes = self.recipe_model.get_selected_recipes()