diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-01-21 16:40:07 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-21 15:50:38 +0000 |
commit | d7b5311d35b3974398fecabfb5ecf1effa85c27e (patch) | |
tree | 3a3dcbb52c4ea47bda436669711087727ac609d8 /lib/bb/ui/crumbs/builder.py | |
parent | 09d1c4c2db124104b9da460547b20a2c2ff07bb3 (diff) | |
download | bitbake-d7b5311d35b3974398fecabfb5ecf1effa85c27e.tar.gz |
hob: Hob should display warnings generated during parsing
-now Hob catches the warnings generated during parsing, and after the parsing
is completed, if there are any warnings, it shows a bar that contains a message
with how many warnings has encountered, and a button "View warnings"
-when "View warnings" button is clicked, Hob shows a dialog with the warnings;
if there more than 1 warning, you can use "Previous" and "Next" button to see them
[YOCTO #3215]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui/crumbs/builder.py')
-rwxr-xr-x | lib/bb/ui/crumbs/builder.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py index b783dad57..d57cf4c32 100755 --- a/lib/bb/ui/crumbs/builder.py +++ b/lib/bb/ui/crumbs/builder.py @@ -46,6 +46,7 @@ from bb.ui.crumbs.hig.advancedsettingsdialog import AdvancedSettingsDialog from bb.ui.crumbs.hig.deployimagedialog import DeployImageDialog from bb.ui.crumbs.hig.layerselectiondialog import LayerSelectionDialog from bb.ui.crumbs.hig.imageselectiondialog import ImageSelectionDialog +from bb.ui.crumbs.hig.parsingwarningsdialog import ParsingWarningsDialog hobVer = 20120808 @@ -446,6 +447,9 @@ class Builder(gtk.Window): # Indicate whether the sanity check ran self.sanity_checked = False + # save parsing warnings + self.parsing_warnings = [] + # create visual elements self.create_visual_elements() @@ -472,6 +476,7 @@ class Builder(gtk.Window): self.handler.connect("data-generated", self.handler_data_generated_cb) self.handler.connect("command-succeeded", self.handler_command_succeeded_cb) self.handler.connect("command-failed", self.handler_command_failed_cb) + self.handler.connect("parsing-warning", self.handler_parsing_warning_cb) self.handler.connect("sanity-failed", self.handler_sanity_failed_cb) self.handler.connect("recipe-populated", self.handler_recipe_populated_cb) self.handler.connect("package-populated", self.handler_package_populated_cb) @@ -880,6 +885,15 @@ class Builder(gtk.Window): response = dialog.run() dialog.destroy() + def show_warning_dialog(self): + dialog = ParsingWarningsDialog(title = "View warnings", + warnings = self.parsing_warnings, + parent = None, + flags = gtk.DIALOG_DESTROY_WITH_PARENT + | gtk.DIALOG_NO_SEPARATOR) + response = dialog.run() + dialog.destroy() + def show_network_error_dialog(self): lbl = "<b>Hob cannot connect to the network</b>\n" msg = "Please check your network connection. If you are using a proxy server, please make sure it is configured correctly." @@ -903,6 +917,9 @@ class Builder(gtk.Window): self.show_error_dialog(msg) self.reset() + def handler_parsing_warning_cb(self, handler, warn_msg): + self.parsing_warnings.append(warn_msg) + def handler_sanity_failed_cb(self, handler, msg, network_error): self.reset() if network_error: |