Patchwork [bitbake-devel] hob/imageconfigurationpage: progress bar shows when recipe parsing is stopped

login
register
mail settings
Submitter Cristiana Voicu
Date Oct. 16, 2012, 11:23 a.m.
Message ID <1350386607-21309-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/38179/
State New
Headers show

Comments

Cristiana Voicu - Oct. 16, 2012, 11:23 a.m.
-when the recipe parsing process is stopped, the progress bar shows
"Stopping recipe parsing"

[YOCTO #3259]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
Richard Purdie - Oct. 24, 2012, 8:10 p.m.
On Tue, 2012-10-16 at 14:23 +0300, Cristiana Voicu wrote:
> -when the recipe parsing process is stopped, the progress bar shows
> "Stopping recipe parsing"
> 
> [YOCTO #3259]
> Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
> ---
>  bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |   12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 8988df0..37a3e15 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -45,6 +45,7 @@  class ImageConfigurationPage (HobPage):
         # or by manual. If by manual, all user's recipe selection and package selection are
         # cleared.
         self.machine_combo_changed_by_manual = True
+        self.stopping = False
         self.create_visual_elements()
 
     def create_visual_elements(self):
@@ -114,9 +115,10 @@  class ImageConfigurationPage (HobPage):
         self.show_all()
 
     def update_progress_bar(self, title, fraction, status=None):
-        self.progress_bar.update(fraction)
-        self.progress_bar.set_title(title)
-        self.progress_bar.set_rcstyle(status)
+        if self.stopping == False:
+            self.progress_bar.update(fraction)
+            self.progress_bar.set_title(title)
+            self.progress_bar.set_rcstyle(status)
 
     def show_info_populating(self):
         self._pack_components(pack_config_build_button = False)
@@ -248,9 +250,13 @@  class ImageConfigurationPage (HobPage):
         return button_box
 
     def stop_button_clicked_cb(self, button):
+        self.stopping = True
+        self.progress_bar.set_text("Stopping recipe parsing")
+        self.progress_bar.set_rcstyle("stop")
         self.builder.cancel_parse_sync()
 
     def machine_combo_changed_cb(self, machine_combo):
+        self.stopping = False
         combo_item = machine_combo.get_active_text()
         if not combo_item or combo_item == self.__dummy_machine__:
             return