From patchwork Wed Feb 29 14:15:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 10/32] Hob: add ignore_all_errors to avoid showing error dialog multiple times Date: Wed, 29 Feb 2012 14:15:07 -0000 From: Shane Wang X-Patchwork-Id: 22439 Message-Id: <36bbfae6e2a84015b39e4a7fa4ed6e0aff5036c0.1330523904.git.shane.wang@intel.com> To: bitbake-devel@lists.openembedded.org when parsing recipes, if there are some errors, the error dialog will be shown again and again for each error, add "Ignore All" to allow users to ignore those errors. Signed-off-by: Shane Wang --- bitbake/lib/bb/ui/crumbs/builder.py | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 819b79f..fc231ef 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -178,6 +178,8 @@ class Builder(gtk.Window): self.template = None + self.ignore_all_errors = False + # settings params = self.handler.get_parameters() self.configuration = Configuration(params) @@ -315,6 +317,8 @@ class Builder(gtk.Window): elif next_step == self.RCPPKGINFO_POPULATING: # MACHINE CHANGED action or SETTINGS CHANGED + # reset the "ignore all errors" var + self.ignore_all_errors = False # show the progress bar self.image_configuration_page.show_info_populating() self.generate_recipes() @@ -440,12 +444,16 @@ class Builder(gtk.Window): self.switch_page(self.IMAGE_GENERATED) def handler_command_failed_cb(self, handler, msg): - lbl = "Error\n" - lbl = lbl + "%s\n\n" % msg - dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) - response = dialog.run() - dialog.destroy() + if self.ignore_all_errors == False: + lbl = "Error\n" + lbl = lbl + "%s\n\n" % msg + dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) + dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + dialog.add_button("Ignore All", gtk.RESPONSE_REJECT) + response = dialog.run() + if response == gtk.RESPONSE_REJECT: + self.ignore_all_errors = True + dialog.destroy() self.handler.clear_busy() self.configuration.curr_mach = None self.image_configuration_page.switch_machine_combo()