All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Hob tweaks & fixes
@ 2012-03-29  0:30 Joshua Lock
  2012-03-29  0:30 ` [PATCH 1/6] lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton Joshua Lock
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Joshua Lock @ 2012-03-29  0:30 UTC (permalink / raw)
  To: bitbake-devel

Here are some more minor fixes for Hob, please review and consider for inclusion.

Regards,
Joshua

The following changes since commit f9cf2671c0ecad153db11bca1aebe151213bfb42:

  bb.build: use relative log links, not absolute (2012-03-28 22:28:00 +0100)

are available in the git repository at:
  git://github.com/incandescant/bitbake josh/hob
  https://github.com/incandescant/bitbake/tree/josh/hob

Joshua Lock (6):
  lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton
  lib/bb/ui/crumbs/imageconfigurationpage: add extra space between
    widgets
  lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton
  lib/bb/ui/crumbs/builder: allow user to cancel Layer selection
    dialogue
  lib/bb/ui/crumbs: hob progress bar should not be red when user stops
    build
  lib/bb/ui/crumbs/hig: fix layers_changed test

 lib/bb/ui/crumbs/builddetailspage.py       |    2 +-
 lib/bb/ui/crumbs/builder.py                |   25 +++++++++++++++++--------
 lib/bb/ui/crumbs/hig.py                    |    7 +++++--
 lib/bb/ui/crumbs/hobwidget.py              |    6 +++---
 lib/bb/ui/crumbs/imageconfigurationpage.py |    4 ++--
 lib/bb/ui/crumbs/progressbar.py            |    8 +++++---
 6 files changed, 33 insertions(+), 19 deletions(-)

-- 
1.7.7.6




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/6] lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
@ 2012-03-29  0:30 ` Joshua Lock
  2012-03-29  0:30 ` [PATCH 2/6] lib/bb/ui/crumbs/imageconfigurationpage: add extra space between widgets Joshua Lock
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joshua Lock @ 2012-03-29  0:30 UTC (permalink / raw)
  To: bitbake-devel

Add more padding between the icon and the text

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobwidget.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py
index 89ff23e..9bc09dd 100644
--- a/lib/bb/ui/crumbs/hobwidget.py
+++ b/lib/bb/ui/crumbs/hobwidget.py
@@ -281,7 +281,7 @@ class HobImageButton(gtk.Button):
         self.icon_path = icon_path
         self.hover_icon_path = hover_icon_path
 
-        hbox = gtk.HBox(False, 3)
+        hbox = gtk.HBox(False, 6)
         hbox.show()
         self.add(hbox)
         self.icon = gtk.Image()
@@ -298,7 +298,7 @@ class HobImageButton(gtk.Button):
         mark = "%s\n<span fgcolor='%s'><small>%s</small></span>" % (primary_text, colour, secondary_text)
         label.set_markup(mark)
         label.show()
-        hbox.pack_start(label, True, True, 0)
+        hbox.pack_start(label, True, True, 6)
 
     def set_hover_icon_cb(self, widget, event):
         self.icon.set_from_file(self.hover_icon_path)
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/6] lib/bb/ui/crumbs/imageconfigurationpage: add extra space between widgets
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
  2012-03-29  0:30 ` [PATCH 1/6] lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton Joshua Lock
@ 2012-03-29  0:30 ` Joshua Lock
  2012-03-29  0:30 ` [PATCH 3/6] lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton Joshua Lock
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joshua Lock @ 2012-03-29  0:30 UTC (permalink / raw)
  To: bitbake-devel

Add space between the target machine combo and the 'Layers' button.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/imageconfigurationpage.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index d7437a9..f66bcd6 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -171,7 +171,7 @@ class ImageConfigurationPage (HobPage):
         self.gtable.attach(self.machine_title, 0, 40, 0, 4)
         self.gtable.attach(self.machine_title_desc, 0, 40, 4, 6)
         self.gtable.attach(self.machine_combo, 0, 12, 6, 9)
-        self.gtable.attach(self.layer_button, 12, 36, 6, 11)
+        self.gtable.attach(self.layer_button, 15, 36, 6, 11)
         self.gtable.attach(self.layer_info_icon, 36, 40, 6, 10)
         if show_progress_bar:
             self.gtable.attach(self.progress_box, 0, 40, 13, 17)
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/6] lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
  2012-03-29  0:30 ` [PATCH 1/6] lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton Joshua Lock
  2012-03-29  0:30 ` [PATCH 2/6] lib/bb/ui/crumbs/imageconfigurationpage: add extra space between widgets Joshua Lock
@ 2012-03-29  0:30 ` Joshua Lock
  2012-03-29  0:30 ` [PATCH 4/6] lib/bb/ui/crumbs/builder: allow user to cancel Layer selection dialogue Joshua Lock
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joshua Lock @ 2012-03-29  0:30 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hobwidget.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py
index 9bc09dd..413370e 100644
--- a/lib/bb/ui/crumbs/hobwidget.py
+++ b/lib/bb/ui/crumbs/hobwidget.py
@@ -295,7 +295,7 @@ class HobImageButton(gtk.Button):
         label = gtk.Label()
         label.set_alignment(0.0, 0.5)
         colour = soften_color(label)
-        mark = "%s\n<span fgcolor='%s'><small>%s</small></span>" % (primary_text, colour, secondary_text)
+        mark = "<span size='larger'>%s</span>\n<span fgcolor='%s'>%s</span>" % (primary_text, colour, secondary_text)
         label.set_markup(mark)
         label.show()
         hbox.pack_start(label, True, True, 6)
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/6] lib/bb/ui/crumbs/builder: allow user to cancel Layer selection dialogue
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
                   ` (2 preceding siblings ...)
  2012-03-29  0:30 ` [PATCH 3/6] lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton Joshua Lock
@ 2012-03-29  0:30 ` Joshua Lock
  2012-03-29  0:30 ` [PATCH 5/6] lib/bb/ui/crumbs: hob progress bar should not be red when user stops build Joshua Lock
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joshua Lock @ 2012-03-29  0:30 UTC (permalink / raw)
  To: bitbake-devel

Because layer changes may take some time allow the user to cancel out of
the dialogue and prevent Hob from applying any of the changes made.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/builder.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 2af14dc..1d203fe 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -734,7 +734,9 @@ class Builder(gtk.Window):
                      flags = gtk.DIALOG_MODAL
                          | gtk.DIALOG_DESTROY_WITH_PARENT
                          | gtk.DIALOG_NO_SEPARATOR)
-        button = dialog.add_button("Close", gtk.RESPONSE_YES)
+        button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
+        HobAltButton.style_button(button)
+        button = dialog.add_button("OK", gtk.RESPONSE_YES)
         HobButton.style_button(button)
         response = dialog.run()
         if response == gtk.RESPONSE_YES:
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/6] lib/bb/ui/crumbs: hob progress bar should not be red when user stops build
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
                   ` (3 preceding siblings ...)
  2012-03-29  0:30 ` [PATCH 4/6] lib/bb/ui/crumbs/builder: allow user to cancel Layer selection dialogue Joshua Lock
@ 2012-03-29  0:30 ` Joshua Lock
  2012-03-29  0:30 ` [PATCH 6/6] lib/bb/ui/crumbs/hig: fix layers_changed test Joshua Lock
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Joshua Lock @ 2012-03-29  0:30 UTC (permalink / raw)
  To: bitbake-devel

If the user explicitly stops the build telling them the build failed is a
misnomer.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/builddetailspage.py       |    2 +-
 lib/bb/ui/crumbs/builder.py                |   21 ++++++++++++++-------
 lib/bb/ui/crumbs/hig.py                    |    2 +-
 lib/bb/ui/crumbs/imageconfigurationpage.py |    2 +-
 lib/bb/ui/crumbs/progressbar.py            |    8 +++++---
 5 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/lib/bb/ui/crumbs/builddetailspage.py b/lib/bb/ui/crumbs/builddetailspage.py
index e8dbad7..d3d07d8 100755
--- a/lib/bb/ui/crumbs/builddetailspage.py
+++ b/lib/bb/ui/crumbs/builddetailspage.py
@@ -213,7 +213,7 @@ class BuildDetailsPage (HobPage):
         self.show_all()
         self.back_button.hide()
 
-    def update_progress_bar(self, title, fraction, status=True):
+    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)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 1d203fe..3dccf06 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -608,13 +608,20 @@ class Builder(gtk.Window):
         self.stopping = False
 
     def build_failed(self):
-        if self.current_step == self.FAST_IMAGE_GENERATING:
-            fraction = 0.9
-        elif self.current_step == self.IMAGE_GENERATING:
-            fraction = 1.0
-        elif self.current_step == self.PACKAGE_GENERATING:
-            fraction = 1.0
-        self.build_details_page.update_progress_bar("Build Failed: ", fraction, False)
+        if self.stopping:
+            status = "stop"
+            message = "Build stopped: "
+            fraction = self.build_details_page.progress_bar.get_fraction()
+        else:
+            if self.current_step == self.FAST_IMAGE_GENERATING:
+                fraction = 0.9
+            elif self.current_step == self.IMAGE_GENERATING:
+                fraction = 1.0
+            elif self.current_step == self.PACKAGE_GENERATING:
+                fraction = 1.0
+            status = "fail"
+            message = "Build failed: "
+        self.build_details_page.update_progress_bar(message, fraction, status)
         self.build_details_page.show_back_button()
         self.build_details_page.hide_stop_button()
         self.handler.build_failed_async()
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index 4753c92..0ea5c0d 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -735,7 +735,7 @@ class DeployImageDialog (CrumbsDialog):
                 cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\""
                 subprocess.Popen(args=shlex.split(cmdline))
 
-    def update_progress_bar(self, title, fraction, status=True):
+    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)
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index f66bcd6..d5aaf83 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -105,7 +105,7 @@ class ImageConfigurationPage (HobPage):
         self.set_config_machine_layout(show_progress_bar = False)
         self.show_all()
 
-    def update_progress_bar(self, title, fraction, status=True):
+    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)
diff --git a/lib/bb/ui/crumbs/progressbar.py b/lib/bb/ui/crumbs/progressbar.py
index 882d461..f75818a 100644
--- a/lib/bb/ui/crumbs/progressbar.py
+++ b/lib/bb/ui/crumbs/progressbar.py
@@ -29,10 +29,12 @@ class HobProgressBar (gtk.ProgressBar):
     def set_rcstyle(self, status):
         rcstyle = gtk.RcStyle()
         rcstyle.fg[2] = gtk.gdk.Color(HobColors.BLACK)
-        if status:
-            rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING)
-        else:
+        if status == "stop":
+            rcstyle.bg[3] = gtk.gdk.Color(HobColors.WARNING)
+        elif status == "fail":
             rcstyle.bg[3] = gtk.gdk.Color(HobColors.ERROR)
+        else:
+            rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING)
         self.modify_style(rcstyle)
 
     def set_title(self, text=None):
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/6] lib/bb/ui/crumbs/hig: fix layers_changed test
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
                   ` (4 preceding siblings ...)
  2012-03-29  0:30 ` [PATCH 5/6] lib/bb/ui/crumbs: hob progress bar should not be red when user stops build Joshua Lock
@ 2012-03-29  0:30 ` Joshua Lock
  2012-03-29  2:18 ` [PATCH 0/6] Hob tweaks & fixes Wang, Shane
  2012-03-29 20:22 ` Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Joshua Lock @ 2012-03-29  0:30 UTC (permalink / raw)
  To: bitbake-devel

Because we sort the treeview to list specific layers at the top, and
therefore implicitly change the sorting of the underlying model, we can't
be certain that the original layer list will equal the new layer list
despite the included layers being the same.

To ensure we can do a simple equality test to determine whether the layers
have been modified first sort the lists to ensure we're comparing based on
contents alone.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/hig.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index 0ea5c0d..62a4e4e 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -952,7 +952,10 @@ class LayerSelectionDialog (CrumbsDialog):
             layers.append(model.get_value(it, 0))
             it = model.iter_next(it)
 
-        self.layers_changed = (self.layers != layers)
+        orig_layers = sorted(self.layers)
+        layers.sort()
+
+        self.layers_changed = (orig_layers != layers)
         self.layers = layers
 
     """
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/6] Hob tweaks & fixes
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
                   ` (5 preceding siblings ...)
  2012-03-29  0:30 ` [PATCH 6/6] lib/bb/ui/crumbs/hig: fix layers_changed test Joshua Lock
@ 2012-03-29  2:18 ` Wang, Shane
  2012-03-29 20:22 ` Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Wang, Shane @ 2012-03-29  2:18 UTC (permalink / raw)
  To: Joshua Lock, bitbake-devel

ACK.

--
Shane

Joshua Lock wrote on 2012-03-29:

> Here are some more minor fixes for Hob, please review and consider for
> inclusion.
> 
> Regards,
> Joshua
> 
> The following changes since commit
> f9cf2671c0ecad153db11bca1aebe151213bfb42:
> 
>   bb.build: use relative log links, not absolute (2012-03-28 22:28:00 +0100)
> are available in the git repository at:
>   git://github.com/incandescant/bitbake josh/hob
>   https://github.com/incandescant/bitbake/tree/josh/hob
> Joshua Lock (6):
>   lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton
>   lib/bb/ui/crumbs/imageconfigurationpage: add extra space between
>     widgets
>   lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton
>   lib/bb/ui/crumbs/builder: allow user to cancel Layer selection
>     dialogue lib/bb/ui/crumbs: hob progress bar should not be red when
>     user stops build
>   lib/bb/ui/crumbs/hig: fix layers_changed test
>  lib/bb/ui/crumbs/builddetailspage.py       |    2 +-
>  lib/bb/ui/crumbs/builder.py                |   25
>  +++++++++++++++++-------- lib/bb/ui/crumbs/hig.py                    | 
>    7 +++++-- lib/bb/ui/crumbs/hobwidget.py              |    6 +++---
>  lib/bb/ui/crumbs/imageconfigurationpage.py |    4 ++--
>  lib/bb/ui/crumbs/progressbar.py            |    8 +++++--- 6 files
>  changed, 33 insertions(+), 19 deletions(-)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/6] Hob tweaks & fixes
  2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
                   ` (6 preceding siblings ...)
  2012-03-29  2:18 ` [PATCH 0/6] Hob tweaks & fixes Wang, Shane
@ 2012-03-29 20:22 ` Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2012-03-29 20:22 UTC (permalink / raw)
  To: Joshua Lock; +Cc: bitbake-devel

On Wed, 2012-03-28 at 17:30 -0700, Joshua Lock wrote:
> Here are some more minor fixes for Hob, please review and consider for inclusion.
> 
> Regards,
> Joshua
> 
> The following changes since commit f9cf2671c0ecad153db11bca1aebe151213bfb42:
> 
>   bb.build: use relative log links, not absolute (2012-03-28 22:28:00 +0100)
> 
> are available in the git repository at:
>   git://github.com/incandescant/bitbake josh/hob
>   https://github.com/incandescant/bitbake/tree/josh/hob
> 
> Joshua Lock (6):
>   lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton
>   lib/bb/ui/crumbs/imageconfigurationpage: add extra space between
>     widgets
>   lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton
>   lib/bb/ui/crumbs/builder: allow user to cancel Layer selection
>     dialogue
>   lib/bb/ui/crumbs: hob progress bar should not be red when user stops
>     build
>   lib/bb/ui/crumbs/hig: fix layers_changed test

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-29 20:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29  0:30 [PATCH 0/6] Hob tweaks & fixes Joshua Lock
2012-03-29  0:30 ` [PATCH 1/6] lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton Joshua Lock
2012-03-29  0:30 ` [PATCH 2/6] lib/bb/ui/crumbs/imageconfigurationpage: add extra space between widgets Joshua Lock
2012-03-29  0:30 ` [PATCH 3/6] lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton Joshua Lock
2012-03-29  0:30 ` [PATCH 4/6] lib/bb/ui/crumbs/builder: allow user to cancel Layer selection dialogue Joshua Lock
2012-03-29  0:30 ` [PATCH 5/6] lib/bb/ui/crumbs: hob progress bar should not be red when user stops build Joshua Lock
2012-03-29  0:30 ` [PATCH 6/6] lib/bb/ui/crumbs/hig: fix layers_changed test Joshua Lock
2012-03-29  2:18 ` [PATCH 0/6] Hob tweaks & fixes Wang, Shane
2012-03-29 20:22 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.