bitbake: hob: remove parsing warnings when machine is changed
authorCristiana Voicu <cristiana.voicu@intel.com>
Mon, 4 Feb 2013 14:56:00 +0000 (16:56 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Feb 2013 12:12:37 +0000 (12:12 +0000)
When the machine is changed, the warnings list is emptied and the warnings
bar is hidden.

[YOCTO #3830]
(Bitbake rev: 8e43da7798a98988f7da3f7c424e8f9e5eac2010)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py

index df7a017..956f5ce 100644 (file)
@@ -173,6 +173,11 @@ class ImageConfigurationPage (HobPage):
 
         return warnings_bar
 
+    def disable_warnings_bar(self):
+        if self.builder.parsing_warnings:
+            self.warnings_bar.hide_all()
+            self.builder.parsing_warnings = []
+
     def create_config_machine(self):
         self.machine_title = gtk.Label()
         self.machine_title.set_alignment(0.0, 0.5)
@@ -319,6 +324,7 @@ class ImageConfigurationPage (HobPage):
         self.builder.populate_recipe_package_info_async()
 
     def update_machine_combo(self):
+        self.disable_warnings_bar()
         all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines
 
         model = self.machine_combo.get_model()
@@ -328,6 +334,7 @@ class ImageConfigurationPage (HobPage):
         self.machine_combo.set_active(0)
 
     def switch_machine_combo(self):
+        self.disable_warnings_bar()
         self.machine_combo_changed_by_manual = False
         model = self.machine_combo.get_model()
         active = 0