Hob tweaks & fixes
cover Hob tweaks & fixes
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(-)
Signature · 1 line
1.7.7.6
PATCH 1/6 lib/bb/ui/crumbs/hobwidget: add padding to HobImageButton
Add more padding between the icon and the text
--- lib/bb/ui/crumbs/hobwidget.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
lib/bb/ui/crumbs/hobwidget.py +2 -2
@@ -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)
Signature · 1 line
1.7.7.6
PATCH 2/6 lib/bb/ui/crumbs/imageconfigurationpage: add extra space between widgets
In reply to Joshua LockAdd space between the target machine combo and the 'Layers' button.
--- lib/bb/ui/crumbs/imageconfigurationpage.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/imageconfigurationpage.py +1 -1
@@ -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)
Signature · 1 line
1.7.7.6
PATCH 3/6 lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButton
In reply to Joshua Lock--- lib/bb/ui/crumbs/hobwidget.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/hobwidget.py +1 -1
@@ -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)
Signature · 1 line
1.7.7.6
PATCH 4/6 lib/bb/ui/crumbs/builder: allow user to cancel Layer selection dialogue
In reply to Joshua LockBecause 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.
--- lib/bb/ui/crumbs/builder.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/builder.py +3 -1
@@ -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:
Signature · 1 line
1.7.7.6
PATCH 5/6 lib/bb/ui/crumbs: hob progress bar should not be red when user stops build
In reply to Joshua LockIf the user explicitly stops the build telling them the build failed is a misnomer.
--- 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(-)
lib/bb/ui/crumbs/builddetailspage.py +1 -1
@@ -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)
lib/bb/ui/crumbs/builder.py +14 -7
@@ -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()
lib/bb/ui/crumbs/hig.py +1 -1
@@ -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)
lib/bb/ui/crumbs/imageconfigurationpage.py +1 -1
@@ -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)
lib/bb/ui/crumbs/progressbar.py +5 -3
@@ -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):
Signature · 1 line
1.7.7.6
PATCH 6/6 lib/bb/ui/crumbs/hig: fix layers_changed test
In reply to Joshua LockBecause 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.
--- lib/bb/ui/crumbs/hig.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/hig.py +4 -1
@@ -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 """
Signature · 1 line
1.7.7.6
ACK.
--
Shane
Joshua Lock wrote on 2012-03-29:
Quoted 29 lines
Here are some more minor fixes for Hob, please review and consider for inclusion.
Regards,
JoshuaThe 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/bitbakejosh/hob
https://github.com/incandescant/bitbake/tree/josh/hob
Joshua Lock (6):
lib/bb/ui/crumbs/hobwidget: add padding to HobImageButtonlib/bb/ui/crumbs/imageconfigurationpage: add extra space between
widgets
lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButtonlib/bb/ui/crumbs/builder: allow user to cancel Layer selection
dialoguelib/bb/ui/crumbs: hob progress bar should not be red when user stops build
lib/bb/ui/crumbs/hig: fixlayers_changedtestlib/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(-)
Richard Purdie
AppliedQuoted 13 lines · Joshua Lock
Here are some more minor fixes for Hob, please review and consider for inclusion.
Regards,
JoshuaThe 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/bitbakejosh/hob
https://github.com/incandescant/bitbake/tree/josh/hob
Quoted 10 lines
Joshua Lock (6):
lib/bb/ui/crumbs/hobwidget: add padding to HobImageButtonlib/bb/ui/crumbs/imageconfigurationpage: add extra space between
widgets
lib/bb/ui/crumbs/hobwidget: change text sizes in HobImageButtonlib/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: fixlayers_changedtest
Merged to master, thanks.
Richard