Patchwork [bitbake-devel,5/5] Hob: fixed the issue about the 'run image' page should have the primary bug

login
register
mail settings
Submitter An, LimingX L
Date May 21, 2012, 2:41 p.m.
Message ID <b57883e090aaf1ecc3b792f7deceb01c2a802177.1337610738.git.limingx.l.an@intel.com>
Download mbox | patch
Permalink /patch/28217/
State New
Headers show

Comments

An, LimingX L - May 21, 2012, 2:41 p.m.
issues: when build a image for atom-pc, the output does not include live
image, and 'Save as template' should become the primary action on the screen

[YOCTO 2326]

Signed-off-by: Liming An <limingx.l.an@intel.com>
---
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
Shane Wang - May 23, 2012, 6:09 a.m.
As we discussed today, the primary button should be orange as well.

--
Shane

Liming An wrote onĀ 2012-05-21:

> issues: when build a image for atom-pc, the output does not include live
> image, and 'Save as template' should become the primary action on the
> screen
> 
> [YOCTO 2326]
> 
> Signed-off-by: Liming An <limingx.l.an@intel.com>
> ---
>  bitbake/lib/bb/ui/crumbs/imagedetailspage.py |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)
> diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
> b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py index f517544..1538376
> 100755 --- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py +++
> b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py @@ -202,7 +202,7 @@ class
> ImageDetailsPage (HobPage):
> 
>          # Name
>          self.image_store.clear()
> -        default_toggled = False
> +        default_toggled = ""
>          default_image_size = 0
>          num_toggled = 0
>          i = 0
> @@ -212,18 +212,20 @@ class ImageDetailsPage (HobPage):
>                  or self.test_deployable(image_name)
>              if not default_toggled:
> -                default_toggled = is_toggled
>                  if i == (len(image_names) - 1):
> -                    default_toggled = True
> -                self.image_store.set(self.image_store.append(), 0,
> image_name, 1, image_size, 2, default_toggled)
> -                if default_toggled:
> +                    is_toggled = True
> +                self.image_store.set(self.image_store.append(), 0,
> image_name, 1, image_size, 2, is_toggled)
> +                if is_toggled:
>                      default_image_size = image_size
> -                    self.create_bottom_buttons(self.buttonlist,
> image_name) +                    default_toggled = image_name +
>              else:
>                  self.image_store.set(self.image_store.append(), 0,
> image_name, 1, image_size, 2, False)
>              i = i + 1
>              num_toggled += is_toggled
> +        self.create_bottom_buttons(self.buttonlist, default_toggled)
> +
>          if build_succeeded and (num_toggled < 2):
>              varlist = ["Name: ", "Directory: "]
>              vallist = []

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
index f517544..1538376 100755
--- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
@@ -202,7 +202,7 @@  class ImageDetailsPage (HobPage):
 
         # Name
         self.image_store.clear()
-        default_toggled = False
+        default_toggled = ""
         default_image_size = 0
         num_toggled = 0
         i = 0
@@ -212,18 +212,20 @@  class ImageDetailsPage (HobPage):
                 or self.test_deployable(image_name)
 
             if not default_toggled:
-                default_toggled = is_toggled
                 if i == (len(image_names) - 1):
-                    default_toggled = True
-                self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, default_toggled)
-                if default_toggled:
+                    is_toggled = True
+                self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, is_toggled)
+                if is_toggled:
                     default_image_size = image_size
-                    self.create_bottom_buttons(self.buttonlist, image_name)
+                    default_toggled = image_name
+
             else:
                 self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, False)
             i = i + 1
             num_toggled += is_toggled
 
+        self.create_bottom_buttons(self.buttonlist, default_toggled)
+
         if build_succeeded and (num_toggled < 2):
             varlist = ["Name: ", "Directory: "]
             vallist = []