| Submitter | Joshua Lock |
|---|---|
| Date | March 24, 2012, 12:23 a.m. |
| Message ID | <0873c2b5ad4810eb019ec860760b46c917dc6d68.1332545580.git.josh@linux.intel.com> |
| Download | mbox | patch |
| Permalink | /patch/24403/ |
| State | New |
| Headers | show |
Comments
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()
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
Patch
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()
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(-)