* [PATCH 0/9] Hob visual refinements to more closely match design
@ 2012-03-24 0:22 Joshua Lock
2012-03-24 0:22 ` [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue Joshua Lock
` (9 more replies)
0 siblings, 10 replies; 27+ messages in thread
From: Joshua Lock @ 2012-03-24 0:22 UTC (permalink / raw)
To: bitbake-devel
All,
This series of patches is developed to make the Hob GUI look more like the proposed
visual design.
The series includes two significant changes:
* a set of changes to change all dialogue buttons to the primary/secondary action
styling (big orange buttons that draw users in for the primary action help the
user feel guided through the GUI, blue subtle link-like buttons for secondary
actions).
* using the PersistentTooltip widget for the 'Brought in by' dialogues to more
closely match the design.
These can both be seen in the screenshot here:
https://wiki.yoctoproject.org/wiki/File:Hob2-visual-preview-230312.png
Cheers,
Joshua
The following changes since commit 0348ef08db9ac425d83126d2e6eb465adc28b110:
Hob: Change the descriptions for view_recipe_button and view_package_button (2012-03-23 16:09:35 +0000)
are available in the git repository at:
git://github.com/incandescant/bitbake josh/hob
https://github.com/incandescant/bitbake/tree/josh/hob
Joshua Lock (9):
lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue
lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when
insensitive
lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per
design
lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button
lib/bb/ui/crumbs/hobwidget: convert button styling logic to static
methods
lib/bb/ui/crumbs/persistenttooltip: layout tweaks
lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size
lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by
information
lib/bb/ui/crumbs: apply primary/secondary dialogue button styling
lib/bb/ui/crumbs/builddetailspage.py | 2 +-
lib/bb/ui/crumbs/builder.py | 118 +++++++++++++++++++------------
lib/bb/ui/crumbs/hig.py | 65 +++++++----------
lib/bb/ui/crumbs/hobwidget.py | 58 ++++++++++++---
lib/bb/ui/crumbs/persistenttooltip.py | 27 ++++---
lib/bb/ui/crumbs/recipeselectionpage.py | 18 ++++--
6 files changed, 177 insertions(+), 111 deletions(-)
--
1.7.7.6
^ permalink raw reply [flat|nested] 27+ messages in thread* [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock @ 2012-03-24 0:22 ` Joshua Lock 2012-03-24 0:26 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 2/9] lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when insensitive Joshua Lock ` (8 subsequent siblings) 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:22 UTC (permalink / raw) To: bitbake-devel The two layers which cannot be removed, meta and meta-hob, should be the first two items in the tree view. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/hig.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py index 1db93ea..3a66e7c 100644 --- a/lib/bb/ui/crumbs/hig.py +++ b/lib/bb/ui/crumbs/hig.py @@ -803,8 +803,14 @@ class LayerSelectionDialog (CrumbsDialog): table_layer.attach(scroll, 0, 10, 0, 1) layer_store = gtk.ListStore(gobject.TYPE_STRING) + core_iter = None for layer in layers: - layer_store.set(layer_store.append(), 0, layer) + if layer.endswith("/meta"): + core_iter = layer_store.prepend([layer]) + elif layer.endswith("/meta-hob") and core_iter: + layer_store.insert_after(core_iter, [layer]) + else: + layer_store.append([layer]) col1 = gtk.TreeViewColumn('Enabled') layer_tv.append_column(col1) -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue 2012-03-24 0:22 ` [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue Joshua Lock @ 2012-03-24 0:26 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 0:26 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:22 -0700, Joshua Lock wrote: > The two layers which cannot be removed, meta and meta-hob, should be the > first two items in the tree view. > > Signed-off-by: Joshua Lock <josh@linux.intel.com> Acked-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/ui/crumbs/hig.py | 8 +++++++- > 1 files changed, 7 insertions(+), 1 deletions(-) > > diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py > index 1db93ea..3a66e7c 100644 > --- a/lib/bb/ui/crumbs/hig.py > +++ b/lib/bb/ui/crumbs/hig.py > @@ -803,8 +803,14 @@ class LayerSelectionDialog (CrumbsDialog): > table_layer.attach(scroll, 0, 10, 0, 1) > > layer_store = gtk.ListStore(gobject.TYPE_STRING) > + core_iter = None > for layer in layers: > - layer_store.set(layer_store.append(), 0, layer) > + if layer.endswith("/meta"): > + core_iter = layer_store.prepend([layer]) > + elif layer.endswith("/meta-hob") and core_iter: > + layer_store.insert_after(core_iter, [layer]) > + else: > + layer_store.append([layer]) > > col1 = gtk.TreeViewColumn('Enabled') > layer_tv.append_column(col1) ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 2/9] lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when insensitive 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock 2012-03-24 0:22 ` [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 0:27 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design Joshua Lock ` (7 subsequent siblings) 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel Use an alternative, grey, colour when the button is insensitive so that the insensitivity is easily noticed. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/hobwidget.py | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py index 020c5e2..6b8fc1b 100644 --- a/lib/bb/ui/crumbs/hobwidget.py +++ b/lib/bb/ui/crumbs/hobwidget.py @@ -221,9 +221,32 @@ class HobAltButton(gtk.Button): A gtk.Button subclass which has no relief, and so is more discrete """ def __init__(self, label): - gtk.Button.__init__(self, "<span color='%s'><b>%s</b></span>" % (HobColors.PALE_BLUE, gobject.markup_escape_text(label))) - self.child.set_use_markup(True) + gtk.Button.__init__(self) + self.text = label + self.set_text() self.set_relief(gtk.RELIEF_NONE) + self.connect("state-changed", self.desensitise_on_state_change_cb) + + """ + A callback for the state-changed event to ensure the text is displayed + differently when the widget is not sensitive + """ + def desensitise_on_state_change_cb(self, widget, state): + if widget.get_state() == gtk.STATE_INSENSITIVE: + self.set_text(False) + else: + self.set_text(True) + + """ + Set the button label with an appropriate colour for the current widget state + """ + def set_text(self, sensitive=True): + if sensitive: + colour = HobColors.PALE_BLUE + else: + colour = HobColors.LIGHT_GRAY + self.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(self.text))) + self.child.set_use_markup(True) class HobImageButton(gtk.Button): """ -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 2/9] lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when insensitive 2012-03-24 0:23 ` [PATCH 2/9] lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when insensitive Joshua Lock @ 2012-03-24 0:27 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 0:27 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > Use an alternative, grey, colour when the button is insensitive so that > the insensitivity is easily noticed. > > Signed-off-by: Joshua Lock <josh@linux.intel.com> Acked-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/ui/crumbs/hobwidget.py | 27 +++++++++++++++++++++++++-- > 1 files changed, 25 insertions(+), 2 deletions(-) > > diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py > index 020c5e2..6b8fc1b 100644 > --- a/lib/bb/ui/crumbs/hobwidget.py > +++ b/lib/bb/ui/crumbs/hobwidget.py > @@ -221,9 +221,32 @@ class HobAltButton(gtk.Button): > A gtk.Button subclass which has no relief, and so is more discrete > """ > def __init__(self, label): > - gtk.Button.__init__(self, "<span color='%s'><b>%s</b></span>" % (HobColors.PALE_BLUE, gobject.markup_escape_text(label))) > - self.child.set_use_markup(True) > + gtk.Button.__init__(self) > + self.text = label > + self.set_text() > self.set_relief(gtk.RELIEF_NONE) > + self.connect("state-changed", self.desensitise_on_state_change_cb) > + > + """ > + A callback for the state-changed event to ensure the text is displayed > + differently when the widget is not sensitive > + """ > + def desensitise_on_state_change_cb(self, widget, state): > + if widget.get_state() == gtk.STATE_INSENSITIVE: > + self.set_text(False) > + else: > + self.set_text(True) > + > + """ > + Set the button label with an appropriate colour for the current widget state > + """ > + def set_text(self, sensitive=True): > + if sensitive: > + colour = HobColors.PALE_BLUE > + else: > + colour = HobColors.LIGHT_GRAY > + self.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(self.text))) > + self.child.set_use_markup(True) > > class HobImageButton(gtk.Button): > """ ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock 2012-03-24 0:22 ` [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue Joshua Lock 2012-03-24 0:23 ` [PATCH 2/9] lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when insensitive Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 0:32 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 4/9] lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button Joshua Lock ` (6 subsequent siblings) 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel The design calls for the 'Build packages' button to be a secondary action and a 'Build image' primary action to exist on the recipe selection page. Fixes [YOCTO #2165] Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/recipeselectionpage.py | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py index 881b2ec..e77e79b 100755 --- a/lib/bb/ui/crumbs/recipeselectionpage.py +++ b/lib/bb/ui/crumbs/recipeselectionpage.py @@ -151,11 +151,16 @@ class RecipeSelectionPage (HobPage): button_box = gtk.HBox(False, 6) self.box_group_area.pack_end(button_box, expand=False, fill=False) - self.build_packages_button = HobButton('Build packages') - self.build_packages_button.set_size_request(205, 49) - self.build_packages_button.set_tooltip_text("Build packages for customization") - self.build_packages_button.set_flags(gtk.CAN_DEFAULT) - self.build_packages_button.grab_default() + self.build_image_button = HobButton('Build image') + self.build_image_button.connect("clicked", self.build_image_clicked_cb) + button_box.pack_end(self.build_image_button, expand=False, fill=False) + self.build_image_button.set_size_request(205, 49) + self.build_image_button.set_tooltip_text("Build packages for customization") + self.build_image_button.set_flags(gtk.CAN_DEFAULT) + self.build_image_button.grab_default() + label = gtk.Label("or") + button_box.pack_end(label, expand=False, fill=False) + self.build_packages_button = HobAltButton('Build packages') self.build_packages_button.connect("clicked", self.build_packages_clicked_cb) button_box.pack_end(self.build_packages_button, expand=False, fill=False) @@ -174,6 +179,9 @@ class RecipeSelectionPage (HobPage): def back_button_clicked_cb(self, button): self.builder.show_configuration() + def build_image_clicked_cb(self, button): + self.builder.build_image() + def refresh_selection(self): self.builder.configuration.selected_image = self.recipe_model.get_selected_image() _, self.builder.configuration.selected_recipes = self.recipe_model.get_selected_recipes() -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design 2012-03-24 0:23 ` [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design Joshua Lock @ 2012-03-24 0:32 ` Xu, Dongxiao 2012-03-24 0:44 ` Joshua Lock 0 siblings, 1 reply; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 0:32 UTC (permalink / raw) To: Joshua Lock, Barros Pena, Belen, Giulia Piu, Wang, Shane; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > The design calls for the 'Build packages' button to be a secondary action > and a 'Build image' primary action to exist on the recipe selection page. Sorry, I think this design doesn't make sense. Thinking of this scenario, if a user clicks "Create your own image" in base image drop down list, and then clicks "View Recipes" to select some recipes, if we allow user to directly click "Build image" here, it is wrong since nothing has been set to PACKAGE_INSTALL variable and the image build will fail. Also it will confuse user that, they would think what they selected in the recipe page will be packed into the final image, however it isn't. Therefore I suggest removing the "build image" button in recipe selection page. Thanks, Dongxiao > > Fixes [YOCTO #2165] > > Signed-off-by: Joshua Lock <josh@linux.intel.com> > --- > lib/bb/ui/crumbs/recipeselectionpage.py | 18 +++++++++++++----- > 1 files changed, 13 insertions(+), 5 deletions(-) > > diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py > index 881b2ec..e77e79b 100755 > --- a/lib/bb/ui/crumbs/recipeselectionpage.py > +++ b/lib/bb/ui/crumbs/recipeselectionpage.py > @@ -151,11 +151,16 @@ class RecipeSelectionPage (HobPage): > button_box = gtk.HBox(False, 6) > self.box_group_area.pack_end(button_box, expand=False, fill=False) > > - self.build_packages_button = HobButton('Build packages') > - self.build_packages_button.set_size_request(205, 49) > - self.build_packages_button.set_tooltip_text("Build packages for customization") > - self.build_packages_button.set_flags(gtk.CAN_DEFAULT) > - self.build_packages_button.grab_default() > + self.build_image_button = HobButton('Build image') > + self.build_image_button.connect("clicked", self.build_image_clicked_cb) > + button_box.pack_end(self.build_image_button, expand=False, fill=False) > + self.build_image_button.set_size_request(205, 49) > + self.build_image_button.set_tooltip_text("Build packages for customization") > + self.build_image_button.set_flags(gtk.CAN_DEFAULT) > + self.build_image_button.grab_default() > + label = gtk.Label("or") > + button_box.pack_end(label, expand=False, fill=False) > + self.build_packages_button = HobAltButton('Build packages') > self.build_packages_button.connect("clicked", self.build_packages_clicked_cb) > button_box.pack_end(self.build_packages_button, expand=False, fill=False) > > @@ -174,6 +179,9 @@ class RecipeSelectionPage (HobPage): > def back_button_clicked_cb(self, button): > self.builder.show_configuration() > > + def build_image_clicked_cb(self, button): > + self.builder.build_image() > + > def refresh_selection(self): > self.builder.configuration.selected_image = self.recipe_model.get_selected_image() > _, self.builder.configuration.selected_recipes = self.recipe_model.get_selected_recipes() ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design 2012-03-24 0:32 ` Xu, Dongxiao @ 2012-03-24 0:44 ` Joshua Lock 0 siblings, 0 replies; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:44 UTC (permalink / raw) To: Xu, Dongxiao; +Cc: bitbake-devel, Giulia Piu On 23/03/12 17:32, Xu, Dongxiao wrote: > On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: >> The design calls for the 'Build packages' button to be a secondary action >> and a 'Build image' primary action to exist on the recipe selection page. > > Sorry, I think this design doesn't make sense. > > Thinking of this scenario, if a user clicks "Create your own image" in > base image drop down list, and then clicks "View Recipes" to select some > recipes, if we allow user to directly click "Build image" here, it is > wrong since nothing has been set to PACKAGE_INSTALL variable and the > image build will fail. > > Also it will confuse user that, they would think what they selected in > the recipe page will be packed into the final image, however it isn't. > Therefore I suggest removing the "build image" button in recipe > selection page. Hmm, I missed that but sounds like it doesn't make sense to include this patch as is. I guess we need to either: a) Change the 'Build packages' button to be the primary action. A simple change to ensure a consistent GUI. b) Figure out some logic for mapping the selected recipes to packages in the case of the user clicking the 'Build image' button. I would imagine a) makes most sense for the 1.2 timeframe? Cheers, Joshua -- Joshua '贾詡' Lock Yocto Project "Johannes factotum" Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 4/9] lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock ` (2 preceding siblings ...) 2012-03-24 0:23 ` [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 0:32 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 5/9] lib/bb/ui/crumbs/hobwidget: convert button styling logic to static methods Joshua Lock ` (5 subsequent siblings) 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel The buttons taking the user back to image configuration should be prefixed with '<<'. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/builddetailspage.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/bb/ui/crumbs/builddetailspage.py b/lib/bb/ui/crumbs/builddetailspage.py index 5f1524f..59d5525 100755 --- a/lib/bb/ui/crumbs/builddetailspage.py +++ b/lib/bb/ui/crumbs/builddetailspage.py @@ -80,7 +80,7 @@ class BuildDetailsPage (HobPage): self.builder.handler.build.model.connect_after("row-changed", self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(), self.build_tv) self.button_box = gtk.HBox(False, 6) - self.back_button = HobAltButton("Back to image configuration") + self.back_button = HobAltButton("<< Back to image configuration") self.back_button.connect("clicked", self.back_button_clicked_cb) self.button_box.pack_start(self.back_button, expand=False, fill=False) -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 4/9] lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button 2012-03-24 0:23 ` [PATCH 4/9] lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button Joshua Lock @ 2012-03-24 0:32 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 0:32 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > The buttons taking the user back to image configuration should be prefixed > with '<<'. > > Signed-off-by: Joshua Lock <josh@linux.intel.com> Acked-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/ui/crumbs/builddetailspage.py | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lib/bb/ui/crumbs/builddetailspage.py b/lib/bb/ui/crumbs/builddetailspage.py > index 5f1524f..59d5525 100755 > --- a/lib/bb/ui/crumbs/builddetailspage.py > +++ b/lib/bb/ui/crumbs/builddetailspage.py > @@ -80,7 +80,7 @@ class BuildDetailsPage (HobPage): > self.builder.handler.build.model.connect_after("row-changed", self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(), self.build_tv) > > self.button_box = gtk.HBox(False, 6) > - self.back_button = HobAltButton("Back to image configuration") > + self.back_button = HobAltButton("<< Back to image configuration") > self.back_button.connect("clicked", self.back_button_clicked_cb) > self.button_box.pack_start(self.back_button, expand=False, fill=False) > ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 5/9] lib/bb/ui/crumbs/hobwidget: convert button styling logic to static methods 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock ` (3 preceding siblings ...) 2012-03-24 0:23 ` [PATCH 4/9] lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 1:01 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 6/9] lib/bb/ui/crumbs/persistenttooltip: layout tweaks Joshua Lock ` (4 subsequent siblings) 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel The design calls for all buttons to match the style of either the HobButton or HobAltButton classes, therefore implement the styling logic as static methods of the implementing classes so that we can more easily set styles for the buttons created by a gtk.Dialog (or subclass) without having to modify too much of the dialog instantiation code. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/hobwidget.py | 53 +++++++++++++++++++++++++--------------- 1 files changed, 33 insertions(+), 20 deletions(-) diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py index 6b8fc1b..d6ed260 100644 --- a/lib/bb/ui/crumbs/hobwidget.py +++ b/lib/bb/ui/crumbs/hobwidget.py @@ -204,49 +204,62 @@ class HobButton(gtk.Button): label: the text to display as the button's label """ def __init__(self, label): - gtk.Button.__init__(self, "<span size='x-large'><b>%s</b></span>" % gobject.markup_escape_text(label)) - self.child.set_use_markup(True) + gtk.Button.__init__(self, label) + HobButton.style_button(self) - style = self.get_style() + @staticmethod + def style_button(button): + style = button.get_style() button_color = gtk.gdk.Color(HobColors.ORANGE) - self.modify_bg(gtk.STATE_NORMAL, button_color) - self.modify_bg(gtk.STATE_PRELIGHT, button_color) - self.modify_bg(gtk.STATE_SELECTED, button_color) + button.modify_bg(gtk.STATE_NORMAL, button_color) + button.modify_bg(gtk.STATE_PRELIGHT, button_color) + button.modify_bg(gtk.STATE_SELECTED, button_color) + + button.set_flags(gtk.CAN_DEFAULT) + button.grab_default() - self.set_flags(gtk.CAN_DEFAULT) - self.grab_default() + label = "<span size='x-large'><b>%s</b></span>" % gobject.markup_escape_text(button.get_label()) + button.set_label(label) + button.child.set_use_markup(True) class HobAltButton(gtk.Button): """ A gtk.Button subclass which has no relief, and so is more discrete """ def __init__(self, label): - gtk.Button.__init__(self) - self.text = label - self.set_text() - self.set_relief(gtk.RELIEF_NONE) - self.connect("state-changed", self.desensitise_on_state_change_cb) + gtk.Button.__init__(self, label) + HobAltButton.style_button(self) """ A callback for the state-changed event to ensure the text is displayed differently when the widget is not sensitive """ - def desensitise_on_state_change_cb(self, widget, state): - if widget.get_state() == gtk.STATE_INSENSITIVE: - self.set_text(False) + @staticmethod + def desensitise_on_state_change_cb(button, state): + if button.get_state() == gtk.STATE_INSENSITIVE: + HobAltButton.set_text(button, False) else: - self.set_text(True) + HobAltButton.set_text(button, True) """ Set the button label with an appropriate colour for the current widget state """ - def set_text(self, sensitive=True): + @staticmethod + def set_text(button, sensitive=True): if sensitive: colour = HobColors.PALE_BLUE else: colour = HobColors.LIGHT_GRAY - self.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(self.text))) - self.child.set_use_markup(True) + button.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(button.text))) + button.child.set_use_markup(True) + + @staticmethod + def style_button(button): + button.text = button.get_label() + button.connect("state-changed", HobAltButton.desensitise_on_state_change_cb) + HobAltButton.set_text(button) + button.child.set_use_markup(True) + button.set_relief(gtk.RELIEF_NONE) class HobImageButton(gtk.Button): """ -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 5/9] lib/bb/ui/crumbs/hobwidget: convert button styling logic to static methods 2012-03-24 0:23 ` [PATCH 5/9] lib/bb/ui/crumbs/hobwidget: convert button styling logic to static methods Joshua Lock @ 2012-03-24 1:01 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 1:01 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > The design calls for all buttons to match the style of either the HobButton > or HobAltButton classes, therefore implement the styling logic as static > methods of the implementing classes so that we can more easily set styles > for the buttons created by a gtk.Dialog (or subclass) without having to > modify too much of the dialog instantiation code. > > Signed-off-by: Joshua Lock <josh@linux.intel.com> Acked-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/ui/crumbs/hobwidget.py | 53 +++++++++++++++++++++++++--------------- > 1 files changed, 33 insertions(+), 20 deletions(-) > > diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py > index 6b8fc1b..d6ed260 100644 > --- a/lib/bb/ui/crumbs/hobwidget.py > +++ b/lib/bb/ui/crumbs/hobwidget.py > @@ -204,49 +204,62 @@ class HobButton(gtk.Button): > label: the text to display as the button's label > """ > def __init__(self, label): > - gtk.Button.__init__(self, "<span size='x-large'><b>%s</b></span>" % gobject.markup_escape_text(label)) > - self.child.set_use_markup(True) > + gtk.Button.__init__(self, label) > + HobButton.style_button(self) > > - style = self.get_style() > + @staticmethod > + def style_button(button): > + style = button.get_style() > button_color = gtk.gdk.Color(HobColors.ORANGE) > - self.modify_bg(gtk.STATE_NORMAL, button_color) > - self.modify_bg(gtk.STATE_PRELIGHT, button_color) > - self.modify_bg(gtk.STATE_SELECTED, button_color) > + button.modify_bg(gtk.STATE_NORMAL, button_color) > + button.modify_bg(gtk.STATE_PRELIGHT, button_color) > + button.modify_bg(gtk.STATE_SELECTED, button_color) > + > + button.set_flags(gtk.CAN_DEFAULT) > + button.grab_default() > > - self.set_flags(gtk.CAN_DEFAULT) > - self.grab_default() > + label = "<span size='x-large'><b>%s</b></span>" % gobject.markup_escape_text(button.get_label()) > + button.set_label(label) > + button.child.set_use_markup(True) > > class HobAltButton(gtk.Button): > """ > A gtk.Button subclass which has no relief, and so is more discrete > """ > def __init__(self, label): > - gtk.Button.__init__(self) > - self.text = label > - self.set_text() > - self.set_relief(gtk.RELIEF_NONE) > - self.connect("state-changed", self.desensitise_on_state_change_cb) > + gtk.Button.__init__(self, label) > + HobAltButton.style_button(self) > > """ > A callback for the state-changed event to ensure the text is displayed > differently when the widget is not sensitive > """ > - def desensitise_on_state_change_cb(self, widget, state): > - if widget.get_state() == gtk.STATE_INSENSITIVE: > - self.set_text(False) > + @staticmethod > + def desensitise_on_state_change_cb(button, state): > + if button.get_state() == gtk.STATE_INSENSITIVE: > + HobAltButton.set_text(button, False) > else: > - self.set_text(True) > + HobAltButton.set_text(button, True) > > """ > Set the button label with an appropriate colour for the current widget state > """ > - def set_text(self, sensitive=True): > + @staticmethod > + def set_text(button, sensitive=True): > if sensitive: > colour = HobColors.PALE_BLUE > else: > colour = HobColors.LIGHT_GRAY > - self.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(self.text))) > - self.child.set_use_markup(True) > + button.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(button.text))) > + button.child.set_use_markup(True) > + > + @staticmethod > + def style_button(button): > + button.text = button.get_label() > + button.connect("state-changed", HobAltButton.desensitise_on_state_change_cb) > + HobAltButton.set_text(button) > + button.child.set_use_markup(True) > + button.set_relief(gtk.RELIEF_NONE) > > class HobImageButton(gtk.Button): > """ > -- > 1.7.7.6 > > > _______________________________________________ > bitbake-devel mailing list > bitbake-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 6/9] lib/bb/ui/crumbs/persistenttooltip: layout tweaks 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock ` (4 preceding siblings ...) 2012-03-24 0:23 ` [PATCH 5/9] lib/bb/ui/crumbs/hobwidget: convert button styling logic to static methods Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 1:03 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 7/9] lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size Joshua Lock ` (3 subsequent siblings) 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel The design documents have the close button vertically aligned with the tooltip contents - reorganise the interal widget layout to achieve this. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/persistenttooltip.py | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/bb/ui/crumbs/persistenttooltip.py b/lib/bb/ui/crumbs/persistenttooltip.py index 8ba0043..e184062 100644 --- a/lib/bb/ui/crumbs/persistenttooltip.py +++ b/lib/bb/ui/crumbs/persistenttooltip.py @@ -76,9 +76,7 @@ class PersistentTooltip(gtk.Window): # Draw our label and close buttons hbox = gtk.HBox(False, 0) hbox.show() - vbox = gtk.VBox(False, 0) - vbox.show() - vbox.pack_start(hbox, True, True, 0) + self.add(hbox) img = gtk.Image() img.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_BUTTON) @@ -89,18 +87,21 @@ class PersistentTooltip(gtk.Window): self.button.set_can_default(True) self.button.grab_focus() self.button.show() + vbox = gtk.VBox(False, 0) + vbox.show() + vbox.pack_start(self.button, False, False, 0) if __button_right: - hbox.pack_end(self.button, False, False, 0) + hbox.pack_end(vbox, True, True, 0) else: - hbox.pack_start(self.button, False, False, 0) + hbox.pack_start(vbox, True, True, 0) self.set_default(self.button) - hbox = gtk.HBox(True, 6) - hbox.set_border_width(6) - hbox.show() - vbox.pack_end(hbox, True, True, 6) + bin = gtk.HBox(True, 6) + bin.set_border_width(6) + bin.show() self.label = gtk.Label() + self.label.set_line_wrap(True) # We want to match the colours of the normal tooltips, as dictated by # the users gtk+-2.0 theme, wherever possible - on some systems this # requires explicitly setting a fg_color for the label which matches the @@ -119,12 +120,11 @@ class PersistentTooltip(gtk.Window): break # we only care for the tooltip_fg_color self.label.set_markup(markup) self.label.show() - hbox.pack_end(self.label, True, True, 6) + bin.add(self.label) + hbox.pack_end(bin, True, True, 6) self.connect("key-press-event", self._catch_esc_cb) - self.add(vbox) - """ Callback when the PersistentTooltip's close button is clicked. Hides the PersistentTooltip. -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 6/9] lib/bb/ui/crumbs/persistenttooltip: layout tweaks 2012-03-24 0:23 ` [PATCH 6/9] lib/bb/ui/crumbs/persistenttooltip: layout tweaks Joshua Lock @ 2012-03-24 1:03 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 1:03 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > The design documents have the close button vertically aligned with the > tooltip contents - reorganise the interal widget layout to achieve this. > > Signed-off-by: Joshua Lock <josh@linux.intel.com> Acked-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/ui/crumbs/persistenttooltip.py | 24 ++++++++++++------------ > 1 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/lib/bb/ui/crumbs/persistenttooltip.py b/lib/bb/ui/crumbs/persistenttooltip.py > index 8ba0043..e184062 100644 > --- a/lib/bb/ui/crumbs/persistenttooltip.py > +++ b/lib/bb/ui/crumbs/persistenttooltip.py > @@ -76,9 +76,7 @@ class PersistentTooltip(gtk.Window): > # Draw our label and close buttons > hbox = gtk.HBox(False, 0) > hbox.show() > - vbox = gtk.VBox(False, 0) > - vbox.show() > - vbox.pack_start(hbox, True, True, 0) > + self.add(hbox) > > img = gtk.Image() > img.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_BUTTON) > @@ -89,18 +87,21 @@ class PersistentTooltip(gtk.Window): > self.button.set_can_default(True) > self.button.grab_focus() > self.button.show() > + vbox = gtk.VBox(False, 0) > + vbox.show() > + vbox.pack_start(self.button, False, False, 0) > if __button_right: > - hbox.pack_end(self.button, False, False, 0) > + hbox.pack_end(vbox, True, True, 0) > else: > - hbox.pack_start(self.button, False, False, 0) > + hbox.pack_start(vbox, True, True, 0) > > self.set_default(self.button) > > - hbox = gtk.HBox(True, 6) > - hbox.set_border_width(6) > - hbox.show() > - vbox.pack_end(hbox, True, True, 6) > + bin = gtk.HBox(True, 6) > + bin.set_border_width(6) > + bin.show() > self.label = gtk.Label() > + self.label.set_line_wrap(True) > # We want to match the colours of the normal tooltips, as dictated by > # the users gtk+-2.0 theme, wherever possible - on some systems this > # requires explicitly setting a fg_color for the label which matches the > @@ -119,12 +120,11 @@ class PersistentTooltip(gtk.Window): > break # we only care for the tooltip_fg_color > self.label.set_markup(markup) > self.label.show() > - hbox.pack_end(self.label, True, True, 6) > + bin.add(self.label) > + hbox.pack_end(bin, True, True, 6) > > self.connect("key-press-event", self._catch_esc_cb) > > - self.add(vbox) > - > """ > Callback when the PersistentTooltip's close button is clicked. > Hides the PersistentTooltip. ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 7/9] lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock ` (5 preceding siblings ...) 2012-03-24 0:23 ` [PATCH 6/9] lib/bb/ui/crumbs/persistenttooltip: layout tweaks Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 1:03 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 8/9] lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information Joshua Lock ` (2 subsequent siblings) 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel The persistent tooltip looks a little weird when it's too small, request that the toolkit and WM give it a reasonable minimum size. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/persistenttooltip.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/bb/ui/crumbs/persistenttooltip.py b/lib/bb/ui/crumbs/persistenttooltip.py index e184062..69e059b 100644 --- a/lib/bb/ui/crumbs/persistenttooltip.py +++ b/lib/bb/ui/crumbs/persistenttooltip.py @@ -73,6 +73,9 @@ class PersistentTooltip(gtk.Window): self.set_position(gtk.WIN_POS_MOUSE) self.set_opacity(0.95) + # Ensure a reasonable minimum size + self.set_geometry_hints(self, 100, 50) + # Draw our label and close buttons hbox = gtk.HBox(False, 0) hbox.show() -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 7/9] lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size 2012-03-24 0:23 ` [PATCH 7/9] lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size Joshua Lock @ 2012-03-24 1:03 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 1:03 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > The persistent tooltip looks a little weird when it's too small, request > that the toolkit and WM give it a reasonable minimum size. > > Signed-off-by: Joshua Lock <josh@linux.intel.com> Acked-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/ui/crumbs/persistenttooltip.py | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/lib/bb/ui/crumbs/persistenttooltip.py b/lib/bb/ui/crumbs/persistenttooltip.py > index e184062..69e059b 100644 > --- a/lib/bb/ui/crumbs/persistenttooltip.py > +++ b/lib/bb/ui/crumbs/persistenttooltip.py > @@ -73,6 +73,9 @@ class PersistentTooltip(gtk.Window): > self.set_position(gtk.WIN_POS_MOUSE) > self.set_opacity(0.95) > > + # Ensure a reasonable minimum size > + self.set_geometry_hints(self, 100, 50) > + > # Draw our label and close buttons > hbox = gtk.HBox(False, 0) > hbox.show() ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 8/9] lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock ` (6 preceding siblings ...) 2012-03-24 0:23 ` [PATCH 7/9] lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 1:04 ` Xu, Dongxiao 2012-03-24 0:23 ` [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling Joshua Lock 2012-03-25 11:12 ` [PATCH 0/9] Hob visual refinements to more closely match design Richard Purdie 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/builder.py | 12 +++++++----- lib/bb/ui/crumbs/hig.py | 23 ----------------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py index 2fe67d9..4eb374c 100755 --- a/lib/bb/ui/crumbs/builder.py +++ b/lib/bb/ui/crumbs/builder.py @@ -33,9 +33,10 @@ from bb.ui.crumbs.packageselectionpage import PackageSelectionPage from bb.ui.crumbs.builddetailspage import BuildDetailsPage from bb.ui.crumbs.imagedetailspage import ImageDetailsPage from bb.ui.crumbs.hobwidget import hwc -from bb.ui.crumbs.hig import CrumbsMessageDialog, BinbDialog, \ +from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ AdvancedSettingDialog, LayerSelectionDialog, \ - DeployImageDialog, ImageSelectionDialog + DeployImageDialog +from bb.ui.crumbs.persistenttooltip import PersistentTooltip class Configuration: '''Represents the data structure of configuration.''' @@ -659,9 +660,10 @@ class Builder(gtk.Window): self.switch_page(self.FAST_IMAGE_GENERATING) def show_binb_dialog(self, binb): - binb_dialog = BinbDialog("Brought in by:", binb, self) - binb_dialog.run() - binb_dialog.destroy() + markup = "<b>Brought in by:</b>\n%s" % binb + ptip = PersistentTooltip(markup) + + ptip.show() def show_layer_selection_dialog(self): dialog = LayerSelectionDialog(title = "Layers", diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py index 3a66e7c..6ae682b 100644 --- a/lib/bb/ui/crumbs/hig.py +++ b/lib/bb/ui/crumbs/hig.py @@ -92,29 +92,6 @@ class CrumbsMessageDialog(CrumbsDialog): first_row.add(self.label) # -# Brought-in-by Dialog -# -class BinbDialog(CrumbsDialog): - """ - A dialog widget to show "brought in by" info when a recipe/package is clicked. - """ - - def __init__(self, title, content, parent=None): - super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("Close", gtk.RESPONSE_CLOSE)) - - self.set_position(gtk.WIN_POS_MOUSE) - self.set_resizable(False) - self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.DARK)) - - label = gtk.Label(content) - label.set_alignment(0, 0) - label.set_line_wrap(True) - label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.WHITE)) - - self.vbox.pack_start(label, expand=True, fill=True, padding=10) - self.vbox.show_all() - -# # AdvancedSettings Dialog # class AdvancedSettingDialog (CrumbsDialog): -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 8/9] lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information 2012-03-24 0:23 ` [PATCH 8/9] lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information Joshua Lock @ 2012-03-24 1:04 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 1:04 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > Signed-off-by: Joshua Lock <josh@linux.intel.com> Acked-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/ui/crumbs/builder.py | 12 +++++++----- > lib/bb/ui/crumbs/hig.py | 23 ----------------------- > 2 files changed, 7 insertions(+), 28 deletions(-) > > diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py > index 2fe67d9..4eb374c 100755 > --- a/lib/bb/ui/crumbs/builder.py > +++ b/lib/bb/ui/crumbs/builder.py > @@ -33,9 +33,10 @@ from bb.ui.crumbs.packageselectionpage import PackageSelectionPage > from bb.ui.crumbs.builddetailspage import BuildDetailsPage > from bb.ui.crumbs.imagedetailspage import ImageDetailsPage > from bb.ui.crumbs.hobwidget import hwc > -from bb.ui.crumbs.hig import CrumbsMessageDialog, BinbDialog, \ > +from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ > AdvancedSettingDialog, LayerSelectionDialog, \ > - DeployImageDialog, ImageSelectionDialog > + DeployImageDialog > +from bb.ui.crumbs.persistenttooltip import PersistentTooltip > > class Configuration: > '''Represents the data structure of configuration.''' > @@ -659,9 +660,10 @@ class Builder(gtk.Window): > self.switch_page(self.FAST_IMAGE_GENERATING) > > def show_binb_dialog(self, binb): > - binb_dialog = BinbDialog("Brought in by:", binb, self) > - binb_dialog.run() > - binb_dialog.destroy() > + markup = "<b>Brought in by:</b>\n%s" % binb > + ptip = PersistentTooltip(markup) > + > + ptip.show() > > def show_layer_selection_dialog(self): > dialog = LayerSelectionDialog(title = "Layers", > diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py > index 3a66e7c..6ae682b 100644 > --- a/lib/bb/ui/crumbs/hig.py > +++ b/lib/bb/ui/crumbs/hig.py > @@ -92,29 +92,6 @@ class CrumbsMessageDialog(CrumbsDialog): > first_row.add(self.label) > > # > -# Brought-in-by Dialog > -# > -class BinbDialog(CrumbsDialog): > - """ > - A dialog widget to show "brought in by" info when a recipe/package is clicked. > - """ > - > - def __init__(self, title, content, parent=None): > - super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("Close", gtk.RESPONSE_CLOSE)) > - > - self.set_position(gtk.WIN_POS_MOUSE) > - self.set_resizable(False) > - self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.DARK)) > - > - label = gtk.Label(content) > - label.set_alignment(0, 0) > - label.set_line_wrap(True) > - label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(HobColors.WHITE)) > - > - self.vbox.pack_start(label, expand=True, fill=True, padding=10) > - self.vbox.show_all() > - > -# > # AdvancedSettings Dialog > # > class AdvancedSettingDialog (CrumbsDialog): ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock ` (7 preceding siblings ...) 2012-03-24 0:23 ` [PATCH 8/9] lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information Joshua Lock @ 2012-03-24 0:23 ` Joshua Lock 2012-03-24 1:00 ` Xu, Dongxiao 2012-03-25 11:12 ` [PATCH 0/9] Hob visual refinements to more closely match design Richard Purdie 9 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 0:23 UTC (permalink / raw) To: bitbake-devel The design calls for primary buttons which are orange and large and secondary buttons which are subtle with pale blue text. This is so that the user is drawn towards the primary action and their use of the application is more guided. This patch uses HobButton and HobAltButton classes to style all dialogue buttons accordingly. Fixes [YOCTO #2125] Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/builder.py | 106 +++++++++++++++++++++++++++---------------- lib/bb/ui/crumbs/hig.py | 34 ++++++++------ 2 files changed, 87 insertions(+), 53 deletions(-) diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py index 4eb374c..e27a239 100755 --- a/lib/bb/ui/crumbs/builder.py +++ b/lib/bb/ui/crumbs/builder.py @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage from bb.ui.crumbs.packageselectionpage import PackageSelectionPage from bb.ui.crumbs.builddetailspage import BuildDetailsPage from bb.ui.crumbs.imagedetailspage import ImageDetailsPage -from bb.ui.crumbs.hobwidget import hwc +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ AdvancedSettingDialog, LayerSelectionDialog, \ DeployImageDialog @@ -435,7 +435,8 @@ class Builder(gtk.Window): lbl = "<b>Error</b>\n" lbl = lbl + "%s\n\n" % msg dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) response = dialog.run() dialog.destroy() self.handler.clear_busy() @@ -608,8 +609,10 @@ class Builder(gtk.Window): def destroy_window_cb(self, widget, event): lbl = "<b>Do you really want to exit the Hob image creator?</b>" dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) + HobButton.style_button(button) dialog.set_default_response(gtk.RESPONSE_YES) response = dialog.run() dialog.destroy() @@ -625,7 +628,8 @@ class Builder(gtk.Window): lbl = "<b>No selections made</b>\nYou have not made any selections" lbl = lbl + " so there isn't anything to bake at this time." dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) dialog.run() dialog.destroy() return @@ -637,7 +641,8 @@ class Builder(gtk.Window): lbl = "<b>No selections made</b>\nYou have not made any selections" lbl = lbl + " so there isn't anything to bake at this time." dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) dialog.run() dialog.destroy() return @@ -652,7 +657,8 @@ class Builder(gtk.Window): lbl = "<b>No selections made</b>\nYou have not made any selections" lbl = lbl + " so there isn't anything to bake at this time." dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) dialog.run() dialog.destroy() return @@ -672,8 +678,9 @@ class Builder(gtk.Window): parent = self, flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT - | gtk.DIALOG_NO_SEPARATOR, - buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) + | gtk.DIALOG_NO_SEPARATOR) + button = dialog.add_button("Close", gtk.RESPONSE_YES) + HobButton.style_button(button) response = dialog.run() if response == gtk.RESPONSE_YES: self.configuration.layers = dialog.layers @@ -684,9 +691,11 @@ class Builder(gtk.Window): def show_load_template_dialog(self): dialog = gtk.FileChooserDialog("Load Template Files", self, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) + gtk.FILE_CHOOSER_ACTION_OPEN) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Open", gtk.RESPONSE_YES) + HobButton.style_button(button) filter = gtk.FileFilter() filter.set_name("Hob Files") filter.add_pattern("*.hob") @@ -700,9 +709,11 @@ class Builder(gtk.Window): def show_save_template_dialog(self): dialog = gtk.FileChooserDialog("Save Template Files", self, - gtk.FILE_CHOOSER_ACTION_SAVE, - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - gtk.STOCK_SAVE, gtk.RESPONSE_YES)) + gtk.FILE_CHOOSER_ACTION_SAVE) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Save", gtk.RESPONSE_YES) + HobButton.style_button(button) dialog.set_current_name("hob") response = dialog.run() if response == gtk.RESPONSE_YES: @@ -713,15 +724,18 @@ class Builder(gtk.Window): def show_load_my_images_dialog(self): dialog = ImageSelectionDialog(self.parameters.image_addr, self.parameters.image_types, "Open My Images", self, - gtk.FILE_CHOOSER_ACTION_SAVE, - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) + gtk.FILE_CHOOSER_ACTION_SAVE) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Open", gtk.RESPONSE_YES) + HobButton.style_button(button) response = dialog.run() if response == gtk.RESPONSE_YES: if not dialog.image_names: lbl = "<b>No selections made</b>\nYou have not made any selections" crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - crumbs_dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) crumbs_dialog.run() crumbs_dialog.destroy() dialog.destroy() @@ -744,9 +758,9 @@ class Builder(gtk.Window): parent = self, flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT - | gtk.DIALOG_NO_SEPARATOR, - buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - "Save", gtk.RESPONSE_YES)) + | gtk.DIALOG_NO_SEPARATOR) + button = dialog.add_button("Close", gtk.RESPONSE_YES) + HobButton.style_button(button) response = dialog.run() if response == gtk.RESPONSE_YES: self.configuration = dialog.configuration @@ -762,7 +776,8 @@ class Builder(gtk.Window): if not image_name: lbl = "<b>Please select an image to deploy.</b>" dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) dialog.run() dialog.destroy() return @@ -773,9 +788,11 @@ class Builder(gtk.Window): parent = self, flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT - | gtk.DIALOG_NO_SEPARATOR, - buttons = ("Close", gtk.RESPONSE_NO, - "Make usb image", gtk.RESPONSE_YES)) + | gtk.DIALOG_NO_SEPARATOR) + button = dialog.add_button("Close", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Make usb image", gtk.RESPONSE_YES) + HobButton.style_button(button) response = dialog.run() dialog.destroy() @@ -783,15 +800,18 @@ class Builder(gtk.Window): if not image_name: lbl = "<b>Please select an image to launch in QEMU.</b>" dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) dialog.run() dialog.destroy() return dialog = gtk.FileChooserDialog("Load Kernel Files", self, - gtk.FILE_CHOOSER_ACTION_SAVE, - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) + gtk.FILE_CHOOSER_ACTION_SAVE) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Open", gtk.RESPONSE_YES) + HobButton.style_button(button) filter = gtk.FileFilter() filter.set_name("Kernel Files") filter.add_pattern("*.bin") @@ -823,7 +843,8 @@ class Builder(gtk.Window): lbl = lbl + "source environment path:" + source_env_path + "\n" lbl = lbl + "tmp path: " + tmp_path + "." dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + button = dialog.add_button("Close", gtk.RESPONSE_OK) + HobButton.style_button(button) dialog.run() dialog.destroy() @@ -831,10 +852,12 @@ class Builder(gtk.Window): _, selected_recipes = self.recipe_model.get_selected_recipes() if selected_recipes and ask: lbl = "<b>Package list may be incomplete!</b>\nDo you want to build selected recipes" - lbl = lbl + " to get a full list (Yes) or just view the existing packages (No)?" + lbl = lbl + " to get a full list or just view the existing packages?" dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) - dialog.add_button(gtk.STOCK_NO, gtk.RESPONSE_NO) - dialog.add_button(gtk.STOCK_YES, gtk.RESPONSE_YES) + button = dialog.add_button("View packages", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Build packages", gtk.RESPONSE_YES) + HobButton.style_button(button) dialog.set_default_response(gtk.RESPONSE_YES) response = dialog.run() dialog.destroy() @@ -867,8 +890,10 @@ class Builder(gtk.Window): lbl = lbl + " well leave your build directory in an unusable state" lbl = lbl + " that requires manual steps to fix.\n" dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) - dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) - dialog.add_button("Force Stop", gtk.RESPONSE_YES) + button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) + HobAltButton.style_button(button) + button = dialog.add_button("Force Stop", gtk.RESPONSE_YES) + HobButton.style_button(button) else: lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this" lbl = lbl + " build?\n\n'Force Stop' will stop the build as quickly as" @@ -879,9 +904,12 @@ class Builder(gtk.Window): lbl = lbl + " lengthy compilation phase is in progress this may take" lbl = lbl + " some time." dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) - dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) - dialog.add_button("Stop", gtk.RESPONSE_OK) - dialog.add_button("Force Stop", gtk.RESPONSE_YES) + button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) + HobAltButton.style_button(button) + button = dialog.add_button("Stop", gtk.RESPONSE_OK) + HobAltButton.style_button(button) + button = dialog.add_button("Force Stop", gtk.RESPONSE_YES) + HobButton.style_button(button) response = dialog.run() dialog.destroy() if response != gtk.RESPONSE_CANCEL: diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py index 6ae682b..a30e7d9 100644 --- a/lib/bb/ui/crumbs/hig.py +++ b/lib/bb/ui/crumbs/hig.py @@ -28,7 +28,7 @@ import re import subprocess import shlex from bb.ui.crumbs.hobcolor import HobColors -from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton +from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton from bb.ui.crumbs.progressbar import HobProgressBar """ @@ -137,9 +137,11 @@ class AdvancedSettingDialog (CrumbsDialog): def entry_widget_select_path_cb(self, action, parent, entry): dialog = gtk.FileChooserDialog("", parent, - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) + gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Open", gtk.RESPONSE_YES) + HobButton.style_button(button) response = dialog.run() if response == gtk.RESPONSE_YES: path = dialog.get_filename() @@ -307,7 +309,7 @@ class AdvancedSettingDialog (CrumbsDialog): def __init__(self, title, configuration, all_image_types, all_package_formats, all_distros, all_sdk_machines, - max_threads, parent, flags, buttons): + max_threads, parent, flags, buttons=None): super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons) # class members from other objects @@ -563,7 +565,7 @@ class DeployImageDialog (CrumbsDialog): __dummy_usb__ = "--select a usb drive--" - def __init__(self, title, image_path, parent, flags, buttons): + def __init__(self, title, image_path, parent, flags, buttons=None): super(DeployImageDialog, self).__init__(title, parent, flags, buttons) self.image_path = image_path @@ -713,9 +715,11 @@ class LayerSelectionDialog (CrumbsDialog): def layer_widget_add_clicked_cb(self, action, layer_store, parent): dialog = gtk.FileChooserDialog("Add new layer", parent, - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) + gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Open", gtk.RESPONSE_YES) + HobButton.style_button(button) label = gtk.Label("Select the layer you wish to add") label.show() dialog.set_extra_widget(label) @@ -827,7 +831,7 @@ class LayerSelectionDialog (CrumbsDialog): def add_leave_cb(self, button, event): self.im.set_from_file(hic.ICON_INDI_ADD_FILE) - def __init__(self, title, layers, all_layers, parent, flags, buttons): + def __init__(self, title, layers, all_layers, parent, flags, buttons=None): super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons) # class members from other objects @@ -921,7 +925,7 @@ class ImageSelectionDialog (CrumbsDialog): }] - def __init__(self, image_folder, image_types, title, parent, flags, buttons): + def __init__(self, image_folder, image_types, title, parent, flags, buttons=None): super(ImageSelectionDialog, self).__init__(title, parent, flags, buttons) self.connect("response", self.response_cb) @@ -975,9 +979,11 @@ class ImageSelectionDialog (CrumbsDialog): def select_path_cb(self, action, parent, entry): dialog = gtk.FileChooserDialog("", parent, - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) + gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) + HobAltButton.style_button(button) + button = dialog.add_button("Open", gtk.RESPONSE_YES) + HobButton.style_button(button) response = dialog.run() if response == gtk.RESPONSE_YES: path = dialog.get_filename() -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling 2012-03-24 0:23 ` [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling Joshua Lock @ 2012-03-24 1:00 ` Xu, Dongxiao 2012-03-24 1:07 ` Joshua Lock 0 siblings, 1 reply; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 1:00 UTC (permalink / raw) To: Joshua Lock, Barros Pena, Belen, Giulia Piu; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > The design calls for primary buttons which are orange and large and > secondary buttons which are subtle with pale blue text. This is so that the > user is drawn towards the primary action and their use of the application > is more guided. > > This patch uses HobButton and HobAltButton classes to style all dialogue > buttons accordingly. > > Fixes [YOCTO #2125] > > Signed-off-by: Joshua Lock <josh@linux.intel.com> > --- > lib/bb/ui/crumbs/builder.py | 106 +++++++++++++++++++++++++++---------------- > lib/bb/ui/crumbs/hig.py | 34 ++++++++------ > 2 files changed, 87 insertions(+), 53 deletions(-) > > diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py > index 4eb374c..e27a239 100755 > --- a/lib/bb/ui/crumbs/builder.py > +++ b/lib/bb/ui/crumbs/builder.py > @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage > from bb.ui.crumbs.packageselectionpage import PackageSelectionPage > from bb.ui.crumbs.builddetailspage import BuildDetailsPage > from bb.ui.crumbs.imagedetailspage import ImageDetailsPage > -from bb.ui.crumbs.hobwidget import hwc > +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton > from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ > AdvancedSettingDialog, LayerSelectionDialog, \ > DeployImageDialog > @@ -435,7 +435,8 @@ class Builder(gtk.Window): > lbl = "<b>Error</b>\n" > lbl = lbl + "%s\n\n" % msg > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) > - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > response = dialog.run() > dialog.destroy() > self.handler.clear_busy() > @@ -608,8 +609,10 @@ class Builder(gtk.Window): > def destroy_window_cb(self, widget, event): > lbl = "<b>Do you really want to exit the Hob image creator?</b>" > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) > - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > + HobButton.style_button(button) > dialog.set_default_response(gtk.RESPONSE_YES) > response = dialog.run() > dialog.destroy() > @@ -625,7 +628,8 @@ class Builder(gtk.Window): > lbl = "<b>No selections made</b>\nYou have not made any selections" > lbl = lbl + " so there isn't anything to bake at this time." > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > dialog.run() > dialog.destroy() > return > @@ -637,7 +641,8 @@ class Builder(gtk.Window): > lbl = "<b>No selections made</b>\nYou have not made any selections" > lbl = lbl + " so there isn't anything to bake at this time." > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > dialog.run() > dialog.destroy() > return > @@ -652,7 +657,8 @@ class Builder(gtk.Window): > lbl = "<b>No selections made</b>\nYou have not made any selections" > lbl = lbl + " so there isn't anything to bake at this time." > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > dialog.run() > dialog.destroy() > return > @@ -672,8 +678,9 @@ class Builder(gtk.Window): > parent = self, > flags = gtk.DIALOG_MODAL > | gtk.DIALOG_DESTROY_WITH_PARENT > - | gtk.DIALOG_NO_SEPARATOR, > - buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) > + | gtk.DIALOG_NO_SEPARATOR) > + button = dialog.add_button("Close", gtk.RESPONSE_YES) > + HobButton.style_button(button) > response = dialog.run() > if response == gtk.RESPONSE_YES: > self.configuration.layers = dialog.layers As my previous point, I still strongly suggest we keep the "cancel" button in the layer selection and advanced setting dialog to avoid user's wrong operation. Need Belen or Giulia's input. Thanks, Dongxiao > @@ -684,9 +691,11 @@ class Builder(gtk.Window): > > def show_load_template_dialog(self): > dialog = gtk.FileChooserDialog("Load Template Files", self, > - gtk.FILE_CHOOSER_ACTION_OPEN, > - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) > + gtk.FILE_CHOOSER_ACTION_OPEN) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Open", gtk.RESPONSE_YES) > + HobButton.style_button(button) > filter = gtk.FileFilter() > filter.set_name("Hob Files") > filter.add_pattern("*.hob") > @@ -700,9 +709,11 @@ class Builder(gtk.Window): > > def show_save_template_dialog(self): > dialog = gtk.FileChooserDialog("Save Template Files", self, > - gtk.FILE_CHOOSER_ACTION_SAVE, > - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - gtk.STOCK_SAVE, gtk.RESPONSE_YES)) > + gtk.FILE_CHOOSER_ACTION_SAVE) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Save", gtk.RESPONSE_YES) > + HobButton.style_button(button) > dialog.set_current_name("hob") > response = dialog.run() > if response == gtk.RESPONSE_YES: > @@ -713,15 +724,18 @@ class Builder(gtk.Window): > def show_load_my_images_dialog(self): > dialog = ImageSelectionDialog(self.parameters.image_addr, self.parameters.image_types, > "Open My Images", self, > - gtk.FILE_CHOOSER_ACTION_SAVE, > - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) > + gtk.FILE_CHOOSER_ACTION_SAVE) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Open", gtk.RESPONSE_YES) > + HobButton.style_button(button) > response = dialog.run() > if response == gtk.RESPONSE_YES: > if not dialog.image_names: > lbl = "<b>No selections made</b>\nYou have not made any selections" > crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - crumbs_dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > crumbs_dialog.run() > crumbs_dialog.destroy() > dialog.destroy() > @@ -744,9 +758,9 @@ class Builder(gtk.Window): > parent = self, > flags = gtk.DIALOG_MODAL > | gtk.DIALOG_DESTROY_WITH_PARENT > - | gtk.DIALOG_NO_SEPARATOR, > - buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - "Save", gtk.RESPONSE_YES)) > + | gtk.DIALOG_NO_SEPARATOR) > + button = dialog.add_button("Close", gtk.RESPONSE_YES) > + HobButton.style_button(button) > response = dialog.run() > if response == gtk.RESPONSE_YES: > self.configuration = dialog.configuration > @@ -762,7 +776,8 @@ class Builder(gtk.Window): > if not image_name: > lbl = "<b>Please select an image to deploy.</b>" > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > dialog.run() > dialog.destroy() > return > @@ -773,9 +788,11 @@ class Builder(gtk.Window): > parent = self, > flags = gtk.DIALOG_MODAL > | gtk.DIALOG_DESTROY_WITH_PARENT > - | gtk.DIALOG_NO_SEPARATOR, > - buttons = ("Close", gtk.RESPONSE_NO, > - "Make usb image", gtk.RESPONSE_YES)) > + | gtk.DIALOG_NO_SEPARATOR) > + button = dialog.add_button("Close", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Make usb image", gtk.RESPONSE_YES) > + HobButton.style_button(button) > response = dialog.run() > dialog.destroy() > > @@ -783,15 +800,18 @@ class Builder(gtk.Window): > if not image_name: > lbl = "<b>Please select an image to launch in QEMU.</b>" > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > dialog.run() > dialog.destroy() > return > > dialog = gtk.FileChooserDialog("Load Kernel Files", self, > - gtk.FILE_CHOOSER_ACTION_SAVE, > - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) > + gtk.FILE_CHOOSER_ACTION_SAVE) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Open", gtk.RESPONSE_YES) > + HobButton.style_button(button) > filter = gtk.FileFilter() > filter.set_name("Kernel Files") > filter.add_pattern("*.bin") > @@ -823,7 +843,8 @@ class Builder(gtk.Window): > lbl = lbl + "source environment path:" + source_env_path + "\n" > lbl = lbl + "tmp path: " + tmp_path + "." > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > + button = dialog.add_button("Close", gtk.RESPONSE_OK) > + HobButton.style_button(button) > dialog.run() > dialog.destroy() > > @@ -831,10 +852,12 @@ class Builder(gtk.Window): > _, selected_recipes = self.recipe_model.get_selected_recipes() > if selected_recipes and ask: > lbl = "<b>Package list may be incomplete!</b>\nDo you want to build selected recipes" > - lbl = lbl + " to get a full list (Yes) or just view the existing packages (No)?" > + lbl = lbl + " to get a full list or just view the existing packages?" > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > - dialog.add_button(gtk.STOCK_NO, gtk.RESPONSE_NO) > - dialog.add_button(gtk.STOCK_YES, gtk.RESPONSE_YES) > + button = dialog.add_button("View packages", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Build packages", gtk.RESPONSE_YES) > + HobButton.style_button(button) > dialog.set_default_response(gtk.RESPONSE_YES) > response = dialog.run() > dialog.destroy() > @@ -867,8 +890,10 @@ class Builder(gtk.Window): > lbl = lbl + " well leave your build directory in an unusable state" > lbl = lbl + " that requires manual steps to fix.\n" > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) > - dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) > - dialog.add_button("Force Stop", gtk.RESPONSE_YES) > + button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) > + HobAltButton.style_button(button) > + button = dialog.add_button("Force Stop", gtk.RESPONSE_YES) > + HobButton.style_button(button) > else: > lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this" > lbl = lbl + " build?\n\n'Force Stop' will stop the build as quickly as" > @@ -879,9 +904,12 @@ class Builder(gtk.Window): > lbl = lbl + " lengthy compilation phase is in progress this may take" > lbl = lbl + " some time." > dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) > - dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) > - dialog.add_button("Stop", gtk.RESPONSE_OK) > - dialog.add_button("Force Stop", gtk.RESPONSE_YES) > + button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL) > + HobAltButton.style_button(button) > + button = dialog.add_button("Stop", gtk.RESPONSE_OK) > + HobAltButton.style_button(button) > + button = dialog.add_button("Force Stop", gtk.RESPONSE_YES) > + HobButton.style_button(button) > response = dialog.run() > dialog.destroy() > if response != gtk.RESPONSE_CANCEL: > diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py > index 6ae682b..a30e7d9 100644 > --- a/lib/bb/ui/crumbs/hig.py > +++ b/lib/bb/ui/crumbs/hig.py > @@ -28,7 +28,7 @@ import re > import subprocess > import shlex > from bb.ui.crumbs.hobcolor import HobColors > -from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton > +from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton > from bb.ui.crumbs.progressbar import HobProgressBar > > """ > @@ -137,9 +137,11 @@ class AdvancedSettingDialog (CrumbsDialog): > > def entry_widget_select_path_cb(self, action, parent, entry): > dialog = gtk.FileChooserDialog("", parent, > - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, > - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) > + gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Open", gtk.RESPONSE_YES) > + HobButton.style_button(button) > response = dialog.run() > if response == gtk.RESPONSE_YES: > path = dialog.get_filename() > @@ -307,7 +309,7 @@ class AdvancedSettingDialog (CrumbsDialog): > > def __init__(self, title, configuration, all_image_types, > all_package_formats, all_distros, all_sdk_machines, > - max_threads, parent, flags, buttons): > + max_threads, parent, flags, buttons=None): > super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons) > > # class members from other objects > @@ -563,7 +565,7 @@ class DeployImageDialog (CrumbsDialog): > > __dummy_usb__ = "--select a usb drive--" > > - def __init__(self, title, image_path, parent, flags, buttons): > + def __init__(self, title, image_path, parent, flags, buttons=None): > super(DeployImageDialog, self).__init__(title, parent, flags, buttons) > > self.image_path = image_path > @@ -713,9 +715,11 @@ class LayerSelectionDialog (CrumbsDialog): > > def layer_widget_add_clicked_cb(self, action, layer_store, parent): > dialog = gtk.FileChooserDialog("Add new layer", parent, > - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, > - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) > + gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Open", gtk.RESPONSE_YES) > + HobButton.style_button(button) > label = gtk.Label("Select the layer you wish to add") > label.show() > dialog.set_extra_widget(label) > @@ -827,7 +831,7 @@ class LayerSelectionDialog (CrumbsDialog): > def add_leave_cb(self, button, event): > self.im.set_from_file(hic.ICON_INDI_ADD_FILE) > > - def __init__(self, title, layers, all_layers, parent, flags, buttons): > + def __init__(self, title, layers, all_layers, parent, flags, buttons=None): > super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons) > > # class members from other objects > @@ -921,7 +925,7 @@ class ImageSelectionDialog (CrumbsDialog): > }] > > > - def __init__(self, image_folder, image_types, title, parent, flags, buttons): > + def __init__(self, image_folder, image_types, title, parent, flags, buttons=None): > super(ImageSelectionDialog, self).__init__(title, parent, flags, buttons) > self.connect("response", self.response_cb) > > @@ -975,9 +979,11 @@ class ImageSelectionDialog (CrumbsDialog): > > def select_path_cb(self, action, parent, entry): > dialog = gtk.FileChooserDialog("", parent, > - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, > - (gtk.STOCK_CANCEL, gtk.RESPONSE_NO, > - gtk.STOCK_OPEN, gtk.RESPONSE_YES)) > + gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) > + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > + HobAltButton.style_button(button) > + button = dialog.add_button("Open", gtk.RESPONSE_YES) > + HobButton.style_button(button) > response = dialog.run() > if response == gtk.RESPONSE_YES: > path = dialog.get_filename() ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling 2012-03-24 1:00 ` Xu, Dongxiao @ 2012-03-24 1:07 ` Joshua Lock 2012-03-24 1:19 ` Xu, Dongxiao 0 siblings, 1 reply; 27+ messages in thread From: Joshua Lock @ 2012-03-24 1:07 UTC (permalink / raw) To: Xu, Dongxiao; +Cc: bitbake-devel, Giulia Piu On 23/03/12 18:00, Xu, Dongxiao wrote: > On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: >> The design calls for primary buttons which are orange and large and >> secondary buttons which are subtle with pale blue text. This is so that the >> user is drawn towards the primary action and their use of the application >> is more guided. >> >> This patch uses HobButton and HobAltButton classes to style all dialogue >> buttons accordingly. >> >> Fixes [YOCTO #2125] >> >> Signed-off-by: Joshua Lock<josh@linux.intel.com> >> --- >> lib/bb/ui/crumbs/builder.py | 106 +++++++++++++++++++++++++++---------------- >> lib/bb/ui/crumbs/hig.py | 34 ++++++++------ >> 2 files changed, 87 insertions(+), 53 deletions(-) >> >> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py >> index 4eb374c..e27a239 100755 >> --- a/lib/bb/ui/crumbs/builder.py >> +++ b/lib/bb/ui/crumbs/builder.py >> @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage >> from bb.ui.crumbs.packageselectionpage import PackageSelectionPage >> from bb.ui.crumbs.builddetailspage import BuildDetailsPage >> from bb.ui.crumbs.imagedetailspage import ImageDetailsPage >> -from bb.ui.crumbs.hobwidget import hwc >> +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton >> from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ >> AdvancedSettingDialog, LayerSelectionDialog, \ >> DeployImageDialog >> @@ -435,7 +435,8 @@ class Builder(gtk.Window): >> lbl = "<b>Error</b>\n" >> lbl = lbl + "%s\n\n" % msg >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> + HobButton.style_button(button) >> response = dialog.run() >> dialog.destroy() >> self.handler.clear_busy() >> @@ -608,8 +609,10 @@ class Builder(gtk.Window): >> def destroy_window_cb(self, widget, event): >> lbl = "<b>Do you really want to exit the Hob image creator?</b>" >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) >> - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) >> - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) >> + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) >> + HobAltButton.style_button(button) >> + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) >> + HobButton.style_button(button) >> dialog.set_default_response(gtk.RESPONSE_YES) >> response = dialog.run() >> dialog.destroy() >> @@ -625,7 +628,8 @@ class Builder(gtk.Window): >> lbl = "<b>No selections made</b>\nYou have not made any selections" >> lbl = lbl + " so there isn't anything to bake at this time." >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> + HobButton.style_button(button) >> dialog.run() >> dialog.destroy() >> return >> @@ -637,7 +641,8 @@ class Builder(gtk.Window): >> lbl = "<b>No selections made</b>\nYou have not made any selections" >> lbl = lbl + " so there isn't anything to bake at this time." >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> + HobButton.style_button(button) >> dialog.run() >> dialog.destroy() >> return >> @@ -652,7 +657,8 @@ class Builder(gtk.Window): >> lbl = "<b>No selections made</b>\nYou have not made any selections" >> lbl = lbl + " so there isn't anything to bake at this time." >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> + HobButton.style_button(button) >> dialog.run() >> dialog.destroy() >> return >> @@ -672,8 +678,9 @@ class Builder(gtk.Window): >> parent = self, >> flags = gtk.DIALOG_MODAL >> | gtk.DIALOG_DESTROY_WITH_PARENT >> - | gtk.DIALOG_NO_SEPARATOR, >> - buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) >> + | gtk.DIALOG_NO_SEPARATOR) >> + button = dialog.add_button("Close", gtk.RESPONSE_YES) >> + HobButton.style_button(button) >> response = dialog.run() >> if response == gtk.RESPONSE_YES: >> self.configuration.layers = dialog.layers > > As my previous point, I still strongly suggest we keep the "cancel" > button in the layer selection and advanced setting dialog to avoid > user's wrong operation. Need Belen or Giulia's input. They both responded via Bugzilla, I mistakenly thought you were on CC - apologies. https://bugzilla.yoctoproject.org/show_bug.cgi?id=2083 Cheers, Joshua -- Joshua '贾詡' Lock Yocto Project "Johannes factotum" Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling 2012-03-24 1:07 ` Joshua Lock @ 2012-03-24 1:19 ` Xu, Dongxiao 2012-03-26 4:07 ` Wang, Shane 0 siblings, 1 reply; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-24 1:19 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel, Giulia Piu On Fri, 2012-03-23 at 18:07 -0700, Joshua Lock wrote: > On 23/03/12 18:00, Xu, Dongxiao wrote: > > On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > >> The design calls for primary buttons which are orange and large and > >> secondary buttons which are subtle with pale blue text. This is so that the > >> user is drawn towards the primary action and their use of the application > >> is more guided. > >> > >> This patch uses HobButton and HobAltButton classes to style all dialogue > >> buttons accordingly. > >> > >> Fixes [YOCTO #2125] > >> > >> Signed-off-by: Joshua Lock<josh@linux.intel.com> > >> --- > >> lib/bb/ui/crumbs/builder.py | 106 +++++++++++++++++++++++++++---------------- > >> lib/bb/ui/crumbs/hig.py | 34 ++++++++------ > >> 2 files changed, 87 insertions(+), 53 deletions(-) > >> > >> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py > >> index 4eb374c..e27a239 100755 > >> --- a/lib/bb/ui/crumbs/builder.py > >> +++ b/lib/bb/ui/crumbs/builder.py > >> @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage > >> from bb.ui.crumbs.packageselectionpage import PackageSelectionPage > >> from bb.ui.crumbs.builddetailspage import BuildDetailsPage > >> from bb.ui.crumbs.imagedetailspage import ImageDetailsPage > >> -from bb.ui.crumbs.hobwidget import hwc > >> +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton > >> from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \ > >> AdvancedSettingDialog, LayerSelectionDialog, \ > >> DeployImageDialog > >> @@ -435,7 +435,8 @@ class Builder(gtk.Window): > >> lbl = "<b>Error</b>\n" > >> lbl = lbl + "%s\n\n" % msg > >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) > >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> + HobButton.style_button(button) > >> response = dialog.run() > >> dialog.destroy() > >> self.handler.clear_busy() > >> @@ -608,8 +609,10 @@ class Builder(gtk.Window): > >> def destroy_window_cb(self, widget, event): > >> lbl = "<b>Do you really want to exit the Hob image creator?</b>" > >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > >> - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) > >> - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > >> + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > >> + HobAltButton.style_button(button) > >> + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > >> + HobButton.style_button(button) > >> dialog.set_default_response(gtk.RESPONSE_YES) > >> response = dialog.run() > >> dialog.destroy() > >> @@ -625,7 +628,8 @@ class Builder(gtk.Window): > >> lbl = "<b>No selections made</b>\nYou have not made any selections" > >> lbl = lbl + " so there isn't anything to bake at this time." > >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> + HobButton.style_button(button) > >> dialog.run() > >> dialog.destroy() > >> return > >> @@ -637,7 +641,8 @@ class Builder(gtk.Window): > >> lbl = "<b>No selections made</b>\nYou have not made any selections" > >> lbl = lbl + " so there isn't anything to bake at this time." > >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> + HobButton.style_button(button) > >> dialog.run() > >> dialog.destroy() > >> return > >> @@ -652,7 +657,8 @@ class Builder(gtk.Window): > >> lbl = "<b>No selections made</b>\nYou have not made any selections" > >> lbl = lbl + " so there isn't anything to bake at this time." > >> dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO) > >> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> + HobButton.style_button(button) > >> dialog.run() > >> dialog.destroy() > >> return > >> @@ -672,8 +678,9 @@ class Builder(gtk.Window): > >> parent = self, > >> flags = gtk.DIALOG_MODAL > >> | gtk.DIALOG_DESTROY_WITH_PARENT > >> - | gtk.DIALOG_NO_SEPARATOR, > >> - buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) > >> + | gtk.DIALOG_NO_SEPARATOR) > >> + button = dialog.add_button("Close", gtk.RESPONSE_YES) > >> + HobButton.style_button(button) > >> response = dialog.run() > >> if response == gtk.RESPONSE_YES: > >> self.configuration.layers = dialog.layers > > > > As my previous point, I still strongly suggest we keep the "cancel" > > button in the layer selection and advanced setting dialog to avoid > > user's wrong operation. Need Belen or Giulia's input. > > They both responded via Bugzilla, I mistakenly thought you were on CC - > apologies. > > https://bugzilla.yoctoproject.org/show_bug.cgi?id=2083 Thanks for the information. For Layer, I accept design team's idea to remove save and cancel button. But still users may miss deleted some critical layers. For example, in our Yocto project, users may wrongly deleted meta-yocto, which will cause the system reporting error like: "DISTRO poky not found. Please set a valid DISTRO in your local.conf" This is because the poky distro is defined in meta-yocto layer, and user deleted meta-yocto by mistake. Do you think if it is reasonable to add a confirmation dialog when user trying to delete a layer? What about the save/cancel buttons in advanced setting dialog? Now I only saw a "close" button there. What can we do if user miss configured something that he/she doesn't want to save? Thanks, Dongxiao > > Cheers, > Joshua ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling 2012-03-24 1:19 ` Xu, Dongxiao @ 2012-03-26 4:07 ` Wang, Shane 2012-03-26 6:10 ` Xu, Dongxiao 0 siblings, 1 reply; 27+ messages in thread From: Wang, Shane @ 2012-03-26 4:07 UTC (permalink / raw) To: Xu, Dongxiao, Joshua Lock Cc: bitbake-devel@lists.openembedded.org, Giulia Piu That is really conflict. The design team wants to make few interactions and make things simple. The engineering team wants to give the users a chance to restore to the default or skip the changes he/she has made. The previous solution with "Save" and "Cancel" is an option. The current solution with "Close" is an option. What if the user removes a layer in error? What Dongxiao suggested to ask users to confirm is also an option. But what if there are a lot of layers to remove and a lot of confirmation dialogs for impatient users? I also have a bug filed by Josh to remember settings between Hob sessions. QA raised an issue today that in Hob 1.1, when the user changes some settings and save, which is supposed to cause an error and make Hob not runable. Then, QA doesn't have any chance to initiate a clean running, unless the build directory is deleted and "source" to another directory. Comments? -- Shane Xu, Dongxiao wrote on 2012-03-24: > On Fri, 2012-03-23 at 18:07 -0700, Joshua Lock wrote: >> On 23/03/12 18:00, Xu, Dongxiao wrote: >>> On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: >>>> The design calls for primary buttons which are orange and large and >>>> secondary buttons which are subtle with pale blue text. This is so >>>> that the user is drawn towards the primary action and their use of >>>> the application is more guided. >>>> >>>> This patch uses HobButton and HobAltButton classes to style all dialogue >>>> buttons accordingly. >>>> >>>> Fixes [YOCTO #2125] >>>> >>>> Signed-off-by: Joshua Lock<josh@linux.intel.com> >>>> --- >>>> lib/bb/ui/crumbs/builder.py | 106 >>>> +++++++++++++++++++++++++++---------------- lib/bb/ui/crumbs/hig.py >>>> | 34 ++++++++------ 2 files changed, 87 insertions(+), 53 >>>> deletions(-) >>>> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py >>>> index 4eb374c..e27a239 100755 >>>> --- a/lib/bb/ui/crumbs/builder.py >>>> +++ b/lib/bb/ui/crumbs/builder.py >>>> @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import > RecipeSelectionPage >>>> from bb.ui.crumbs.packageselectionpage import PackageSelectionPage >>>> from bb.ui.crumbs.builddetailspage import BuildDetailsPage from >>>> bb.ui.crumbs.imagedetailspage import ImageDetailsPage >>>> -from bb.ui.crumbs.hobwidget import hwc >>>> +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton >>>> from bb.ui.crumbs.hig import CrumbsMessageDialog, > ImageSelectionDialog, \ >>>> AdvancedSettingDialog, >>>> LayerSelectionDialog, \ >>>> DeployImageDialog >>>> @@ -435,7 +435,8 @@ class Builder(gtk.Window): >>>> lbl = "<b>Error</b>\n" >>>> lbl = lbl + "%s\n\n" % msg >>>> dialog = CrumbsMessageDialog(self, lbl, > gtk.STOCK_DIALOG_WARNING) >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >>>> + HobButton.style_button(button) >>>> response = dialog.run() >>>> dialog.destroy() >>>> self.handler.clear_busy() >>>> @@ -608,8 +609,10 @@ class Builder(gtk.Window): >>>> def destroy_window_cb(self, widget, event): >>>> lbl = "<b>Do you really want to exit the Hob image >>>> creator?</b>" dialog = CrumbsMessageDialog(self, lbl, > gtk.STOCK_DIALOG_INFO) >>>> - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) >>>> - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) >>>> + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) >>>> + HobAltButton.style_button(button) >>>> + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) >>>> + HobButton.style_button(button) >>>> dialog.set_default_response(gtk.RESPONSE_YES) >>>> response = dialog.run() >>>> dialog.destroy() >>>> @@ -625,7 +628,8 @@ class Builder(gtk.Window): >>>> lbl = "<b>No selections made</b>\nYou have not made any >>>> selections" lbl = lbl + " so there isn't anything to >>>> bake at this time." dialog = CrumbsMessageDialog(self, >>>> lbl, > gtk.STOCK_DIALOG_INFO) >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >>>> + HobButton.style_button(button) >>>> dialog.run() dialog.destroy() return @@ -637,7 +641,8 >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections >>>> made</b>\nYou have not made any selections" lbl = lbl + >>>> " so there isn't anything to bake at this time." dialog >>>> = CrumbsMessageDialog(self, lbl, > gtk.STOCK_DIALOG_INFO) >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >>>> + HobButton.style_button(button) >>>> dialog.run() dialog.destroy() return @@ -652,7 +657,8 >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections >>>> made</b>\nYou have not made any selections" lbl = lbl + >>>> " so there isn't anything to bake at this time." dialog >>>> = CrumbsMessageDialog(self, lbl, > gtk.STOCK_DIALOG_INFO) >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >>>> + HobButton.style_button(button) >>>> dialog.run() >>>> dialog.destroy() >>>> return >>>> @@ -672,8 +678,9 @@ class Builder(gtk.Window): >>>> parent = self, >>>> flags = gtk.DIALOG_MODAL >>>> | > gtk.DIALOG_DESTROY_WITH_PARENT >>>> - | gtk.DIALOG_NO_SEPARATOR, - >>>> buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) + >>>> | gtk.DIALOG_NO_SEPARATOR) + button = >>>> dialog.add_button("Close", gtk.RESPONSE_YES) + >>>> HobButton.style_button(button) >>>> response = dialog.run() >>>> if response == gtk.RESPONSE_YES: >>>> self.configuration.layers = dialog.layers >>> >>> As my previous point, I still strongly suggest we keep the "cancel" >>> button in the layer selection and advanced setting dialog to avoid >>> user's wrong operation. Need Belen or Giulia's input. >> >> They both responded via Bugzilla, I mistakenly thought you were on CC - >> apologies. >> >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2083 > > Thanks for the information. > > For Layer, I accept design team's idea to remove save and cancel button. > But still users may miss deleted some critical layers. For example, in > our Yocto project, users may wrongly deleted meta-yocto, which will > cause the system reporting error like: > > "DISTRO poky not found. Please set a valid DISTRO in your local.conf" > > This is because the poky distro is defined in meta-yocto layer, and user > deleted meta-yocto by mistake. > > Do you think if it is reasonable to add a confirmation dialog when user > trying to delete a layer? > > What about the save/cancel buttons in advanced setting dialog? Now I > only saw a "close" button there. What can we do if user miss configured > something that he/she doesn't want to save? > > Thanks, > Dongxiao > >> >> Cheers, >> Joshua > > > > _______________________________________________ > bitbake-devel mailing list > bitbake-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling 2012-03-26 4:07 ` Wang, Shane @ 2012-03-26 6:10 ` Xu, Dongxiao 2012-03-26 14:58 ` Barros Pena, Belen 0 siblings, 1 reply; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-26 6:10 UTC (permalink / raw) To: Wang, Shane; +Cc: bitbake-devel@lists.openembedded.org, Giulia Piu On Mon, 2012-03-26 at 12:07 +0800, Wang, Shane wrote: > That is really conflict. > > The design team wants to make few interactions and make things simple. > The engineering team wants to give the users a chance to restore to the default or skip the changes he/she has made. > > The previous solution with "Save" and "Cancel" is an option. > The current solution with "Close" is an option. What if the user removes a layer in error? > What Dongxiao suggested to ask users to confirm is also an option. But what if there are a lot of layers to remove and a lot of confirmation dialogs for impatient users? > > I also have a bug filed by Josh to remember settings between Hob sessions. QA raised an issue today that in Hob 1.1, when the user changes some settings and save, which is supposed to cause an error and make Hob not runable. Then, QA doesn't have any chance to initiate a clean running, unless the build directory is deleted and "source" to another directory. > > Comments? I saw in the design document(Hob_1.2_screens_inventory.pdf), there are "save" and "cancel" button in advanced setting page. I still for the layer dialog, the question is still open. I think my point of view is similar with Shane's, that is to allow users have the chance to ignore the change that he/she made in mistake. Thanks, Dongxiao > > -- > Shane > > Xu, Dongxiao wrote on 2012-03-24: > > > On Fri, 2012-03-23 at 18:07 -0700, Joshua Lock wrote: > >> On 23/03/12 18:00, Xu, Dongxiao wrote: > >>> On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > >>>> The design calls for primary buttons which are orange and large and > >>>> secondary buttons which are subtle with pale blue text. This is so > >>>> that the user is drawn towards the primary action and their use of > >>>> the application is more guided. > >>>> > >>>> This patch uses HobButton and HobAltButton classes to style all dialogue > >>>> buttons accordingly. > >>>> > >>>> Fixes [YOCTO #2125] > >>>> > >>>> Signed-off-by: Joshua Lock<josh@linux.intel.com> > >>>> --- > >>>> lib/bb/ui/crumbs/builder.py | 106 > >>>> +++++++++++++++++++++++++++---------------- lib/bb/ui/crumbs/hig.py > >>>> | 34 ++++++++------ 2 files changed, 87 insertions(+), 53 > >>>> deletions(-) > >>>> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py > >>>> index 4eb374c..e27a239 100755 > >>>> --- a/lib/bb/ui/crumbs/builder.py > >>>> +++ b/lib/bb/ui/crumbs/builder.py > >>>> @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import > > RecipeSelectionPage > >>>> from bb.ui.crumbs.packageselectionpage import PackageSelectionPage > >>>> from bb.ui.crumbs.builddetailspage import BuildDetailsPage from > >>>> bb.ui.crumbs.imagedetailspage import ImageDetailsPage > >>>> -from bb.ui.crumbs.hobwidget import hwc > >>>> +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton > >>>> from bb.ui.crumbs.hig import CrumbsMessageDialog, > > ImageSelectionDialog, \ > >>>> AdvancedSettingDialog, > >>>> LayerSelectionDialog, \ > >>>> DeployImageDialog > >>>> @@ -435,7 +435,8 @@ class Builder(gtk.Window): > >>>> lbl = "<b>Error</b>\n" > >>>> lbl = lbl + "%s\n\n" % msg > >>>> dialog = CrumbsMessageDialog(self, lbl, > > gtk.STOCK_DIALOG_WARNING) > >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >>>> + HobButton.style_button(button) > >>>> response = dialog.run() > >>>> dialog.destroy() > >>>> self.handler.clear_busy() > >>>> @@ -608,8 +609,10 @@ class Builder(gtk.Window): > >>>> def destroy_window_cb(self, widget, event): > >>>> lbl = "<b>Do you really want to exit the Hob image > >>>> creator?</b>" dialog = CrumbsMessageDialog(self, lbl, > > gtk.STOCK_DIALOG_INFO) > >>>> - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) > >>>> - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > >>>> + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > >>>> + HobAltButton.style_button(button) > >>>> + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > >>>> + HobButton.style_button(button) > >>>> dialog.set_default_response(gtk.RESPONSE_YES) > >>>> response = dialog.run() > >>>> dialog.destroy() > >>>> @@ -625,7 +628,8 @@ class Builder(gtk.Window): > >>>> lbl = "<b>No selections made</b>\nYou have not made any > >>>> selections" lbl = lbl + " so there isn't anything to > >>>> bake at this time." dialog = CrumbsMessageDialog(self, > >>>> lbl, > > gtk.STOCK_DIALOG_INFO) > >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >>>> + HobButton.style_button(button) > >>>> dialog.run() dialog.destroy() return @@ -637,7 +641,8 > >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections > >>>> made</b>\nYou have not made any selections" lbl = lbl + > >>>> " so there isn't anything to bake at this time." dialog > >>>> = CrumbsMessageDialog(self, lbl, > > gtk.STOCK_DIALOG_INFO) > >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >>>> + HobButton.style_button(button) > >>>> dialog.run() dialog.destroy() return @@ -652,7 +657,8 > >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections > >>>> made</b>\nYou have not made any selections" lbl = lbl + > >>>> " so there isn't anything to bake at this time." dialog > >>>> = CrumbsMessageDialog(self, lbl, > > gtk.STOCK_DIALOG_INFO) > >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >>>> + HobButton.style_button(button) > >>>> dialog.run() > >>>> dialog.destroy() > >>>> return > >>>> @@ -672,8 +678,9 @@ class Builder(gtk.Window): > >>>> parent = self, > >>>> flags = gtk.DIALOG_MODAL > >>>> | > > gtk.DIALOG_DESTROY_WITH_PARENT > >>>> - | gtk.DIALOG_NO_SEPARATOR, - > >>>> buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) + > >>>> | gtk.DIALOG_NO_SEPARATOR) + button = > >>>> dialog.add_button("Close", gtk.RESPONSE_YES) + > >>>> HobButton.style_button(button) > >>>> response = dialog.run() > >>>> if response == gtk.RESPONSE_YES: > >>>> self.configuration.layers = dialog.layers > >>> > >>> As my previous point, I still strongly suggest we keep the "cancel" > >>> button in the layer selection and advanced setting dialog to avoid > >>> user's wrong operation. Need Belen or Giulia's input. > >> > >> They both responded via Bugzilla, I mistakenly thought you were on CC - > >> apologies. > >> > >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2083 > > > > Thanks for the information. > > > > For Layer, I accept design team's idea to remove save and cancel button. > > But still users may miss deleted some critical layers. For example, in > > our Yocto project, users may wrongly deleted meta-yocto, which will > > cause the system reporting error like: > > > > "DISTRO poky not found. Please set a valid DISTRO in your local.conf" > > > > This is because the poky distro is defined in meta-yocto layer, and user > > deleted meta-yocto by mistake. > > > > Do you think if it is reasonable to add a confirmation dialog when user > > trying to delete a layer? > > > > What about the save/cancel buttons in advanced setting dialog? Now I > > only saw a "close" button there. What can we do if user miss configured > > something that he/she doesn't want to save? > > > > Thanks, > > Dongxiao > > > >> > >> Cheers, > >> Joshua > > > > > > > > _______________________________________________ > > bitbake-devel mailing list > > bitbake-devel@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > > ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling 2012-03-26 6:10 ` Xu, Dongxiao @ 2012-03-26 14:58 ` Barros Pena, Belen [not found] ` <40776A41FC278F40B59438AD47D147A90FCFE9B5@SHSMSX102.ccr.corp.intel.com> 0 siblings, 1 reply; 27+ messages in thread From: Barros Pena, Belen @ 2012-03-26 14:58 UTC (permalink / raw) To: Xu, Dongxiao, Wang, Shane, Joshua Lock Cc: bitbake-devel@lists.openembedded.org, Giulia Piu Hi all, Just a few comments: >still users may miss deleted some critical layers. For example, in >our Yocto project, users may wrongly deleted meta-yocto, which will >cause the system reporting error like: "DISTRO poky not found. Please set >a valid DISTRO in your local.conf" >This is because the poky distro is defined in meta-yocto layer, and user >deleted meta-yocto by mistake. We designed the Layers dialog so that it is not possible to delete the meta layer. If deleting the meta-yocto layer is also going to cause problems that a novice might not be able to recover from, then we should consider applying the same approach to the meta-yocto layer so that it cannot be removed. If anybody has any reasons why this is not a good idea, please let me know. >I saw in the design document(Hob_1.2_screens_inventory.pdf), there are >"save" and "cancel" button in advanced setting page. Quoting the Gnome HIG (http://developer.gnome.org/hig-book/3.0/windows-utility.html.en): Do not make the user press an OK or Apply button to make the changes happen, unless either: * the change will take more than about one second to apply, in which case applying the change immediately could make the system feel slow or unresponsive, or * the changes in the window have to be applied simultaneously to prevent the system entering a potentially unstable state. For example, the hostname and proxy fields in a network properties window. The Settings dialog is so complex and edits so many different variables that I assumed it could fall into one of the 2 points above. That's why I designed it as an Explicit Apply window. If my assumption it's incorrect, please go ahead and remove the Save and Cancel buttons: I'll be very happy to see them go :) Keep in mind that we'll still need a close button to dismiss the dialog. >The design team wants to make few interactions and make things simple. >The engineering team wants to give the users a chance to restore to the >default or skip the changes he/she has made. >What if the user removes a layer in error? These are the reasons why we have designed the Layers dialog as an instant apply window: 1. Because it's how the Gnome HIG recommends doing things, and we have no evidence of any kind suggesting this is the wrong approach for the Layers dialog. 2. Because deleting a layer by mistake constitutes an edge case: I am sure you will agree users will probably not be deleting layers by mistake all the time. I try not to optimise designs for edge cases, but for the main use cases while preventing catastrophic errors (hence the decision to make the meta layer non-removable). Having said this, feel free to make the decision you consider appropriate :) >Do you think if it is reasonable to add a confirmation dialog when user >trying to delete a layer? I can see why you are suggesting this approach (particularly in the case of the meta-yocto layer), but I rather not add an extra step to any process unless it is absolutely necessary. I tend to favour providing undo functionality instead. I am going to copy this thread on the relevant bug to make sure we have all our conversations in the same place. Otherwise it'll be hard to follow and fully understand our design decisions if we need to go back to them in the future. Cheers Belen On 26/03/2012 07:10, "Xu, Dongxiao" <dongxiao.xu@intel.com> wrote: >On Mon, 2012-03-26 at 12:07 +0800, Wang, Shane wrote: >> That is really conflict. >> >> The design team wants to make few interactions and make things simple. >> The engineering team wants to give the users a chance to restore to the >>default or skip the changes he/she has made. >> >> The previous solution with "Save" and "Cancel" is an option. >> The current solution with "Close" is an option. What if the user >>removes a layer in error? >> What Dongxiao suggested to ask users to confirm is also an option. But >>what if there are a lot of layers to remove and a lot of confirmation >>dialogs for impatient users? >> >> I also have a bug filed by Josh to remember settings between Hob >>sessions. QA raised an issue today that in Hob 1.1, when the user >>changes some settings and save, which is supposed to cause an error and >>make Hob not runable. Then, QA doesn't have any chance to initiate a >>clean running, unless the build directory is deleted and "source" to >>another directory. >> >> Comments? > >I saw in the design document(Hob_1.2_screens_inventory.pdf), there are >"save" and "cancel" button in advanced setting page. > >I still for the layer dialog, the question is still open. I think my >point of view is similar with Shane's, that is to allow users have the >chance to ignore the change that he/she made in mistake. > >Thanks, >Dongxiao > >> >> -- >> Shane >> >> Xu, Dongxiao wrote on 2012-03-24: >> >> > On Fri, 2012-03-23 at 18:07 -0700, Joshua Lock wrote: >> >> On 23/03/12 18:00, Xu, Dongxiao wrote: >> >>> On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: >> >>>> The design calls for primary buttons which are orange and large and >> >>>> secondary buttons which are subtle with pale blue text. This is so >> >>>> that the user is drawn towards the primary action and their use of >> >>>> the application is more guided. >> >>>> >> >>>> This patch uses HobButton and HobAltButton classes to style all >>dialogue >> >>>> buttons accordingly. >> >>>> >> >>>> Fixes [YOCTO #2125] >> >>>> >> >>>> Signed-off-by: Joshua Lock<josh@linux.intel.com> >> >>>> --- >> >>>> lib/bb/ui/crumbs/builder.py | 106 >> >>>> +++++++++++++++++++++++++++---------------- >>lib/bb/ui/crumbs/hig.py >> >>>> | 34 ++++++++------ 2 files changed, 87 insertions(+), 53 >> >>>> deletions(-) >> >>>> diff --git a/lib/bb/ui/crumbs/builder.py >>b/lib/bb/ui/crumbs/builder.py >> >>>> index 4eb374c..e27a239 100755 >> >>>> --- a/lib/bb/ui/crumbs/builder.py >> >>>> +++ b/lib/bb/ui/crumbs/builder.py >> >>>> @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import >> > RecipeSelectionPage >> >>>> from bb.ui.crumbs.packageselectionpage import >>PackageSelectionPage >> >>>> from bb.ui.crumbs.builddetailspage import BuildDetailsPage from >> >>>> bb.ui.crumbs.imagedetailspage import ImageDetailsPage >> >>>> -from bb.ui.crumbs.hobwidget import hwc >> >>>> +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton >> >>>> from bb.ui.crumbs.hig import CrumbsMessageDialog, >> > ImageSelectionDialog, \ >> >>>> AdvancedSettingDialog, >> >>>> LayerSelectionDialog, \ >> >>>> DeployImageDialog >> >>>> @@ -435,7 +435,8 @@ class Builder(gtk.Window): >> >>>> lbl = "<b>Error</b>\n" >> >>>> lbl = lbl + "%s\n\n" % msg >> >>>> dialog = CrumbsMessageDialog(self, lbl, >> > gtk.STOCK_DIALOG_WARNING) >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> >>>> + HobButton.style_button(button) >> >>>> response = dialog.run() >> >>>> dialog.destroy() >> >>>> self.handler.clear_busy() >> >>>> @@ -608,8 +609,10 @@ class Builder(gtk.Window): >> >>>> def destroy_window_cb(self, widget, event): >> >>>> lbl = "<b>Do you really want to exit the Hob image >> >>>> creator?</b>" dialog = CrumbsMessageDialog(self, lbl, >> > gtk.STOCK_DIALOG_INFO) >> >>>> - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) >> >>>> - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) >> >>>> + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) >> >>>> + HobAltButton.style_button(button) >> >>>> + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) >> >>>> + HobButton.style_button(button) >> >>>> dialog.set_default_response(gtk.RESPONSE_YES) >> >>>> response = dialog.run() >> >>>> dialog.destroy() >> >>>> @@ -625,7 +628,8 @@ class Builder(gtk.Window): >> >>>> lbl = "<b>No selections made</b>\nYou have not made >>any >> >>>> selections" lbl = lbl + " so there isn't anything to >> >>>> bake at this time." dialog = >>CrumbsMessageDialog(self, >> >>>> lbl, >> > gtk.STOCK_DIALOG_INFO) >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> >>>> + HobButton.style_button(button) >> >>>> dialog.run() dialog.destroy() return @@ -637,7 +641,8 >> >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections >> >>>> made</b>\nYou have not made any selections" lbl = >>lbl + >> >>>> " so there isn't anything to bake at this time." >>dialog >> >>>> = CrumbsMessageDialog(self, lbl, >> > gtk.STOCK_DIALOG_INFO) >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> >>>> + HobButton.style_button(button) >> >>>> dialog.run() dialog.destroy() return @@ -652,7 +657,8 >> >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections >> >>>> made</b>\nYou have not made any selections" lbl = >>lbl + >> >>>> " so there isn't anything to bake at this time." >>dialog >> >>>> = CrumbsMessageDialog(self, lbl, >> > gtk.STOCK_DIALOG_INFO) >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) >> >>>> + HobButton.style_button(button) >> >>>> dialog.run() >> >>>> dialog.destroy() >> >>>> return >> >>>> @@ -672,8 +678,9 @@ class Builder(gtk.Window): >> >>>> parent = self, >> >>>> flags = gtk.DIALOG_MODAL >> >>>> | >> > gtk.DIALOG_DESTROY_WITH_PARENT >> >>>> - | gtk.DIALOG_NO_SEPARATOR, - >> >> >>>> buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) + >> >> >>>> | gtk.DIALOG_NO_SEPARATOR) + button = >> >>>> dialog.add_button("Close", gtk.RESPONSE_YES) + >> >>>> HobButton.style_button(button) >> >>>> response = dialog.run() >> >>>> if response == gtk.RESPONSE_YES: >> >>>> self.configuration.layers = dialog.layers >> >>> >> >>> As my previous point, I still strongly suggest we keep the "cancel" >> >>> button in the layer selection and advanced setting dialog to avoid >> >>> user's wrong operation. Need Belen or Giulia's input. >> >> >> >> They both responded via Bugzilla, I mistakenly thought you were on >>CC - >> >> apologies. >> >> >> >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2083 >> > >> > Thanks for the information. >> > >> > For Layer, I accept design team's idea to remove save and cancel >>button. >> > But still users may miss deleted some critical layers. For example, in >> > our Yocto project, users may wrongly deleted meta-yocto, which will >> > cause the system reporting error like: >> > >> > "DISTRO poky not found. Please set a valid DISTRO in your local.conf" >> > >> > This is because the poky distro is defined in meta-yocto layer, and >>user >> > deleted meta-yocto by mistake. >> > >> > Do you think if it is reasonable to add a confirmation dialog when >>user >> > trying to delete a layer? >> > >> > What about the save/cancel buttons in advanced setting dialog? Now I >> > only saw a "close" button there. What can we do if user miss >>configured >> > something that he/she doesn't want to save? >> > >> > Thanks, >> > Dongxiao >> > >> >> >> >> Cheers, >> >> Joshua >> > >> > >> > >> > _______________________________________________ >> > bitbake-devel mailing list >> > bitbake-devel@lists.openembedded.org >> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel >> >> > > > >_______________________________________________ >bitbake-devel mailing list >bitbake-devel@lists.openembedded.org >http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <40776A41FC278F40B59438AD47D147A90FCFE9B5@SHSMSX102.ccr.corp.intel.com>]
* Re: FW: [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling [not found] ` <40776A41FC278F40B59438AD47D147A90FCFE9B5@SHSMSX102.ccr.corp.intel.com> @ 2012-03-27 1:04 ` Xu, Dongxiao 0 siblings, 0 replies; 27+ messages in thread From: Xu, Dongxiao @ 2012-03-27 1:04 UTC (permalink / raw) To: Barros Pena, Belen; +Cc: bitbake-devel > -----Original Message----- > From: Barros Pena, Belen > Sent: Monday, March 26, 2012 10:59 PM > To: Xu, Dongxiao; Wang, Shane; Joshua Lock > Cc: bitbake-devel@lists.openembedded.org; Giulia Piu > Subject: Re: [bitbake-devel] [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling > > Hi all, > > Just a few comments: > > >still users may miss deleted some critical layers. For example, in our > >Yocto project, users may wrongly deleted meta-yocto, which will cause > >the system reporting error like: "DISTRO poky not found. Please set a > >valid DISTRO in your local.conf" > >This is because the poky distro is defined in meta-yocto layer, and > >user deleted meta-yocto by mistake. > > We designed the Layers dialog so that it is not possible to delete the meta layer. If deleting the meta-yocto layer is also going to cause problems that a novice might not be able to recover from, then we should consider applying the same approach to the meta-yocto layer so that it cannot be removed. If anybody has any reasons why this is not a good idea, please let me know. meta-yocto layer COULD be removed, the reason that users could see error by removing that layer is because "local.conf" defaultly set "poky" as the DISTRO, which is defined in meta-yocto layer. But anyway, we can remove that layer. > > >I saw in the design document(Hob_1.2_screens_inventory.pdf), there are > >"save" and "cancel" button in advanced setting page. > > Quoting the Gnome HIG > (http://developer.gnome.org/hig-book/3.0/windows-utility.html.en): > > Do not make the user press an OK or Apply button to make the changes happen, unless either: > > * the change will take more than about one second to apply, in which case applying the change immediately could make the system feel slow or unresponsive, or > * the changes in the window have to be applied simultaneously to prevent the system entering a potentially unstable state. For example, the hostname and proxy fields in a network properties window. > > The Settings dialog is so complex and edits so many different variables that I assumed it could fall into one of the 2 points above. That's why I designed it as an Explicit Apply window. If my assumption it's incorrect, please go ahead and remove the Save and Cancel buttons: I'll be very happy to see them go :) Keep in mind that we'll still need a close button to dismiss the dialog. Thanks for the explanation. I think we have an agreement here that we SHOULD have "cancel" and "save" button for advanced setting page. But why we still need a close button? Is "cancel" not enough for that? > > >The design team wants to make few interactions and make things simple. > >The engineering team wants to give the users a chance to restore to the > >default or skip the changes he/she has made. > >What if the user removes a layer in error? > > These are the reasons why we have designed the Layers dialog as an instant apply window: > > 1. Because it's how the Gnome HIG recommends doing things, and we have no evidence of any kind suggesting this is the wrong approach for the Layers dialog. > 2. Because deleting a layer by mistake constitutes an edge case: I am sure you will agree users will probably not be deleting layers by mistake all the time. I try not to optimise designs for edge cases, but for the main use cases while preventing catastrophic errors (hence the decision to make the meta layer non-removable). > > Having said this, feel free to make the decision you consider appropriate > :) From importance point of view, I think layer selection is the most fundamental thing to build an customized image, and I think it is more critical than "advanced setting". From other point of view, the change of layers will definitely cost more than one second to happen. There are two cases: 1) Change the layer when MACHINE is not selected. This process contains: init_cooker() --> set_layer() --> parse_config() --> get available machine/distro/sdk list, etc. The above process costs about 1~2 seconds. 2) Change the layer when MACHINE is already selected. This process contains: init_cooker() --> set_layer() --> parse_config() --> get available machine/distro/sdk list. --> Parse BB files The above process costs about 10~30 seconds, depending on the existing parsing cache. Therefore I think if we follow the HIG standard, we may also need a "save" and "cancel" button for the layer selection. > > > > >Do you think if it is reasonable to add a confirmation dialog when user > >trying to delete a layer? > > > I can see why you are suggesting this approach (particularly in the case of the meta-yocto layer), but I rather not add an extra step to any process unless it is absolutely necessary. I tend to favour providing undo functionality instead. > > I am going to copy this thread on the relevant bug to make sure we have all our conversations in the same place. Otherwise it'll be hard to follow and fully understand our design decisions if we need to go back to them in the future. > > Yes, I agree. Please ignore this comment from me. Thanks, Dongxiao > > > Cheers > > Belen > > > > On 26/03/2012 07:10, "Xu, Dongxiao" <dongxiao.xu@intel.com> wrote: > > >On Mon, 2012-03-26 at 12:07 +0800, Wang, Shane wrote: > >> That is really conflict. > >> > >> The design team wants to make few interactions and make things simple. > >> The engineering team wants to give the users a chance to restore to > >>the default or skip the changes he/she has made. > >> > >> The previous solution with "Save" and "Cancel" is an option. > >> The current solution with "Close" is an option. What if the user > >>removes a layer in error? > >> What Dongxiao suggested to ask users to confirm is also an option. > >>But what if there are a lot of layers to remove and a lot of > >>confirmation dialogs for impatient users? > >> > >> I also have a bug filed by Josh to remember settings between Hob > >>sessions. QA raised an issue today that in Hob 1.1, when the user > >>changes some settings and save, which is supposed to cause an error > >>and make Hob not runable. Then, QA doesn't have any chance to initiate > >>a clean running, unless the build directory is deleted and "source" to > >>another directory. > >> > >> Comments? > > > >I saw in the design document(Hob_1.2_screens_inventory.pdf), there are > >"save" and "cancel" button in advanced setting page. > > > >I still for the layer dialog, the question is still open. I think my > >point of view is similar with Shane's, that is to allow users have the > >chance to ignore the change that he/she made in mistake. > > > >Thanks, > >Dongxiao > > > >> > >> -- > >> Shane > >> > >> Xu, Dongxiao wrote on 2012-03-24: > >> > >> > On Fri, 2012-03-23 at 18:07 -0700, Joshua Lock wrote: > >> >> On 23/03/12 18:00, Xu, Dongxiao wrote: > >> >>> On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote: > >> >>>> The design calls for primary buttons which are orange and large > >> >>>> and secondary buttons which are subtle with pale blue text. This > >> >>>> is so that the user is drawn towards the primary action and > >> >>>> their use of the application is more guided. > >> >>>> > >> >>>> This patch uses HobButton and HobAltButton classes to style all > >>dialogue > >> >>>> buttons accordingly. > >> >>>> > >> >>>> Fixes [YOCTO #2125] > >> >>>> > >> >>>> Signed-off-by: Joshua Lock<josh@linux.intel.com> > >> >>>> --- > >> >>>> lib/bb/ui/crumbs/builder.py | 106 > >> >>>> +++++++++++++++++++++++++++---------------- > >>lib/bb/ui/crumbs/hig.py > >> >>>> | 34 ++++++++------ 2 files changed, 87 insertions(+), 53 > >> >>>> deletions(-) > >> >>>> diff --git a/lib/bb/ui/crumbs/builder.py > >>b/lib/bb/ui/crumbs/builder.py > >> >>>> index 4eb374c..e27a239 100755 > >> >>>> --- a/lib/bb/ui/crumbs/builder.py > >> >>>> +++ b/lib/bb/ui/crumbs/builder.py > >> >>>> @@ -32,7 +32,7 @@ from bb.ui.crumbs.recipeselectionpage import > >> > RecipeSelectionPage > >> >>>> from bb.ui.crumbs.packageselectionpage import > >>PackageSelectionPage > >> >>>> from bb.ui.crumbs.builddetailspage import BuildDetailsPage from > >> >>>> bb.ui.crumbs.imagedetailspage import ImageDetailsPage -from > >> >>>> bb.ui.crumbs.hobwidget import hwc > >> >>>> +from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton > >> >>>> from bb.ui.crumbs.hig import CrumbsMessageDialog, > >> > ImageSelectionDialog, \ > >> >>>> AdvancedSettingDialog, > >> >>>> LayerSelectionDialog, \ > >> >>>> DeployImageDialog @@ -435,7 > >> >>>> +435,8 @@ class Builder(gtk.Window): > >> >>>> lbl = "<b>Error</b>\n" > >> >>>> lbl = lbl + "%s\n\n" % msg > >> >>>> dialog = CrumbsMessageDialog(self, lbl, > >> > gtk.STOCK_DIALOG_WARNING) > >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> >>>> + HobButton.style_button(button) > >> >>>> response = dialog.run() > >> >>>> dialog.destroy() > >> >>>> self.handler.clear_busy() @@ -608,8 +609,10 @@ class > >> >>>> Builder(gtk.Window): > >> >>>> def destroy_window_cb(self, widget, event): > >> >>>> lbl = "<b>Do you really want to exit the Hob image > >> >>>> creator?</b>" dialog = CrumbsMessageDialog(self, lbl, > >> > gtk.STOCK_DIALOG_INFO) > >> >>>> - dialog.add_button("Keep using Hob", gtk.RESPONSE_NO) > >> >>>> - dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > >> >>>> + button = dialog.add_button("Cancel", gtk.RESPONSE_NO) > >> >>>> + HobAltButton.style_button(button) > >> >>>> + button = dialog.add_button("Exit Hob", gtk.RESPONSE_YES) > >> >>>> + HobButton.style_button(button) > >> >>>> dialog.set_default_response(gtk.RESPONSE_YES) > >> >>>> response = dialog.run() > >> >>>> dialog.destroy() > >> >>>> @@ -625,7 +628,8 @@ class Builder(gtk.Window): > >> >>>> lbl = "<b>No selections made</b>\nYou have not > >> >>>> made > >>any > >> >>>> selections" lbl = lbl + " so there isn't anything to > >> >>>> bake at this time." dialog = > >>CrumbsMessageDialog(self, > >> >>>> lbl, > >> > gtk.STOCK_DIALOG_INFO) > >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> >>>> + HobButton.style_button(button) > >> >>>> dialog.run() dialog.destroy() return @@ -637,7 +641,8 > >> >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections > >> >>>> made</b>\nYou have not made any selections" lbl = > >>lbl + > >> >>>> " so there isn't anything to bake at this time." > >>dialog > >> >>>> = CrumbsMessageDialog(self, lbl, > >> > gtk.STOCK_DIALOG_INFO) > >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> >>>> + HobButton.style_button(button) > >> >>>> dialog.run() dialog.destroy() return @@ -652,7 +657,8 > >> >>>> @@ class Builder(gtk.Window): lbl = "<b>No selections > >> >>>> made</b>\nYou have not made any selections" lbl = > >>lbl + > >> >>>> " so there isn't anything to bake at this time." > >>dialog > >> >>>> = CrumbsMessageDialog(self, lbl, > >> > gtk.STOCK_DIALOG_INFO) > >> >>>> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) > >> >>>> + button = dialog.add_button("Close", gtk.RESPONSE_OK) > >> >>>> + HobButton.style_button(button) > >> >>>> dialog.run() > >> >>>> dialog.destroy() > >> >>>> return > >> >>>> @@ -672,8 +678,9 @@ class Builder(gtk.Window): > >> >>>> parent = self, > >> >>>> flags = gtk.DIALOG_MODAL > >> >>>> | > >> > gtk.DIALOG_DESTROY_WITH_PARENT > >> >>>> - | gtk.DIALOG_NO_SEPARATOR, - > >> > >> >>>> buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES)) + > >> > >> >>>> | gtk.DIALOG_NO_SEPARATOR) + button = > >> >>>> dialog.add_button("Close", gtk.RESPONSE_YES) + > >> >>>> HobButton.style_button(button) > >> >>>> response = dialog.run() > >> >>>> if response == gtk.RESPONSE_YES: > >> >>>> self.configuration.layers = dialog.layers > >> >>> > >> >>> As my previous point, I still strongly suggest we keep the "cancel" > >> >>> button in the layer selection and advanced setting dialog to > >> >>> avoid user's wrong operation. Need Belen or Giulia's input. > >> >> > >> >> They both responded via Bugzilla, I mistakenly thought you were on > >>CC - > >> >> apologies. > >> >> > >> >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2083 > >> > > >> > Thanks for the information. > >> > > >> > For Layer, I accept design team's idea to remove save and cancel > >>button. > >> > But still users may miss deleted some critical layers. For example, > >> > in our Yocto project, users may wrongly deleted meta-yocto, which > >> > will cause the system reporting error like: > >> > > >> > "DISTRO poky not found. Please set a valid DISTRO in your local.conf" > >> > > >> > This is because the poky distro is defined in meta-yocto layer, and > >>user > >> > deleted meta-yocto by mistake. > >> > > >> > Do you think if it is reasonable to add a confirmation dialog when > >>user > >> > trying to delete a layer? > >> > > >> > What about the save/cancel buttons in advanced setting dialog? Now > >> > I only saw a "close" button there. What can we do if user miss > >>configured > >> > something that he/she doesn't want to save? > >> > > >> > Thanks, > >> > Dongxiao > >> > > >> >> > >> >> Cheers, > >> >> Joshua > >> > > >> > > >> > > >> > _______________________________________________ > >> > bitbake-devel mailing list > >> > bitbake-devel@lists.openembedded.org > >> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > >> > >> > > > > > > > >_______________________________________________ > >bitbake-devel mailing list > >bitbake-devel@lists.openembedded.org > >http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel > ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 0/9] Hob visual refinements to more closely match design 2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock ` (8 preceding siblings ...) 2012-03-24 0:23 ` [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling Joshua Lock @ 2012-03-25 11:12 ` Richard Purdie 9 siblings, 0 replies; 27+ messages in thread From: Richard Purdie @ 2012-03-25 11:12 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, 2012-03-23 at 17:22 -0700, Joshua Lock wrote: > This series of patches is developed to make the Hob GUI look more like the proposed > visual design. > > The series includes two significant changes: > > * a set of changes to change all dialogue buttons to the primary/secondary action > styling (big orange buttons that draw users in for the primary action help the > user feel guided through the GUI, blue subtle link-like buttons for secondary > actions). > > * using the PersistentTooltip widget for the 'Brought in by' dialogues to more > closely match the design. > > These can both be seen in the screenshot here: > https://wiki.yoctoproject.org/wiki/File:Hob2-visual-preview-230312.png > > Cheers, > > Joshua > > The following changes since commit 0348ef08db9ac425d83126d2e6eb465adc28b110: > > Hob: Change the descriptions for view_recipe_button and view_package_button (2012-03-23 16:09:35 +0000) > > are available in the git repository at: > git://github.com/incandescant/bitbake josh/hob > https://github.com/incandescant/bitbake/tree/josh/hob > > Joshua Lock (9): > lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue > lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when > insensitive > lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button > lib/bb/ui/crumbs/hobwidget: convert button styling logic to static > methods > lib/bb/ui/crumbs/persistenttooltip: layout tweaks > lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size > lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by > information I merged these, thanks. > lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per > design > lib/bb/ui/crumbs: apply primary/secondary dialogue button styling There were comments and I wasn't sure what I was supposed to do with these so I've left them. Cheers, Richard ^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2012-03-27 1:15 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24 0:22 [PATCH 0/9] Hob visual refinements to more closely match design Joshua Lock
2012-03-24 0:22 ` [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue Joshua Lock
2012-03-24 0:26 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 2/9] lib/bb/ui/crumbs/hobwidget: HobAltButton different visual when insensitive Joshua Lock
2012-03-24 0:27 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design Joshua Lock
2012-03-24 0:32 ` Xu, Dongxiao
2012-03-24 0:44 ` Joshua Lock
2012-03-24 0:23 ` [PATCH 4/9] lib/bb/ui/crumbs/builddetailspage: fix label on 'Back' button Joshua Lock
2012-03-24 0:32 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 5/9] lib/bb/ui/crumbs/hobwidget: convert button styling logic to static methods Joshua Lock
2012-03-24 1:01 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 6/9] lib/bb/ui/crumbs/persistenttooltip: layout tweaks Joshua Lock
2012-03-24 1:03 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 7/9] lib/bb/ui/crumbs/persistenttooltip: ensure a reasonable minimum size Joshua Lock
2012-03-24 1:03 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 8/9] lib/bb/ui/crumbs: use a PersistentTooltip for the Brought in by information Joshua Lock
2012-03-24 1:04 ` Xu, Dongxiao
2012-03-24 0:23 ` [PATCH 9/9] lib/bb/ui/crumbs: apply primary/secondary dialogue button styling Joshua Lock
2012-03-24 1:00 ` Xu, Dongxiao
2012-03-24 1:07 ` Joshua Lock
2012-03-24 1:19 ` Xu, Dongxiao
2012-03-26 4:07 ` Wang, Shane
2012-03-26 6:10 ` Xu, Dongxiao
2012-03-26 14:58 ` Barros Pena, Belen
[not found] ` <40776A41FC278F40B59438AD47D147A90FCFE9B5@SHSMSX102.ccr.corp.intel.com>
2012-03-27 1:04 ` FW: " Xu, Dongxiao
2012-03-25 11:12 ` [PATCH 0/9] Hob visual refinements to more closely match design 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.