From 27caa6b89d36af9105dc62c7735f159d3c6df64e Mon Sep 17 00:00:00 2001 From: Shane Wang Date: Mon, 9 Apr 2012 22:13:37 +0800 Subject: Hob: clean up and unify the steps for CONFIG_UPDATE to call update_config_async() For the steps in CONFIG_UPDATE, the patch consolidates them into update_config_async() to call. consequently remove CONFIG_UPDATE since MACHINE_SELECTION covers it. (Bitbake rev: f583d43e87c049bdee88890e289f14520c7c31a1) Signed-off-by: Shane Wang Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 0f32d33b2e..6ed15e9091 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -212,7 +212,6 @@ class Parameters: class Builder(gtk.Window): (MACHINE_SELECTION, - CONFIG_UPDATED, RCPPKGINFO_POPULATING, RCPPKGINFO_POPULATED, BASEIMG_SELECTED, @@ -225,7 +224,7 @@ class Builder(gtk.Window): IMAGE_GENERATED, MY_IMAGE_OPENED, BACK, - END_NOOP) = range(15) + END_NOOP) = range(14) (IMAGE_CONFIGURATION, RECIPE_DETAILS, @@ -236,7 +235,6 @@ class Builder(gtk.Window): __step2page__ = { MACHINE_SELECTION : IMAGE_CONFIGURATION, - CONFIG_UPDATED : IMAGE_CONFIGURATION, RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION, RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION, BASEIMG_SELECTED : IMAGE_CONFIGURATION, @@ -339,6 +337,11 @@ class Builder(gtk.Window): self.handler.set_extra_inherit("image_types") self.handler.parse_config() + def update_config_async(self): + self.switch_page(self.MACHINE_SELECTION) + self.set_user_config() + self.handler.parse_generate_configuration() + def load_template(self, path): self.template = TemplateMgr() self.template.load(path) @@ -348,7 +351,7 @@ class Builder(gtk.Window): if not os.path.exists(layer+'/conf/layer.conf'): return False - self.switch_page(self.CONFIG_UPDATED) + self.update_config_async() self.template.destroy() self.template = None @@ -376,12 +379,6 @@ class Builder(gtk.Window): if next_step == self.MACHINE_SELECTION: # init step self.image_configuration_page.show_machine() - elif next_step == self.CONFIG_UPDATED: - # after layers is changd by users - self.image_configuration_page.show_machine() - self.set_user_config() - self.handler.parse_generate_configuration() - elif next_step == self.RCPPKGINFO_POPULATING: # MACHINE CHANGED action or SETTINGS CHANGED # show the progress bar @@ -798,7 +795,7 @@ class Builder(gtk.Window): self.configuration.layers = dialog.layers # DO refresh layers if dialog.layers_changed: - self.switch_page(self.CONFIG_UPDATED) + self.update_config_async() dialog.destroy() def show_load_template_dialog(self): @@ -889,7 +886,7 @@ class Builder(gtk.Window): def reparse_post_adv_settings(self): # DO reparse recipes if not self.configuration.curr_mach: - self.switch_page(self.CONFIG_UPDATED) + self.update_config_async() else: self.switch_page(self.RCPPKGINFO_POPULATING) -- cgit v1.2.3-54-g00ecf