Hob: Simplify the init process

This commit merges some functionalities together and avoid unnecessary
signal handling. This can help to speed up the Hob startup.

(Bitbake rev: e5a6eb4f007bf270f2fddc814eb856da46e20eee)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dongxiao Xu
2012-04-15 15:26:38 +08:00
committed by Richard Purdie
parent 74211e0372
commit e3e6d2a744
2 changed files with 5 additions and 19 deletions

View File

@@ -398,12 +398,12 @@ class Builder(gtk.Window):
if self.load_template(TemplateMgr.convert_to_template_pathfilename("default", ".hob/")) == None:
self.handler.init_cooker()
self.handler.set_extra_inherit("image_types")
self.handler.parse_config()
self.handler.generate_configuration()
def update_config_async(self):
self.switch_page(self.MACHINE_SELECTION)
self.set_user_config()
self.handler.parse_generate_configuration()
self.handler.generate_configuration()
def populate_recipe_package_info_async(self):
self.switch_page(self.RCPPKGINFO_POPULATING)
@@ -456,9 +456,6 @@ class Builder(gtk.Window):
def cancel_build_sync(self, force=False):
self.handler.cancel_build(force)
def generate_configuration_async(self):
self.handler.generate_configuration()
def cancel_parse_sync(self):
self.handler.cancel_parse()
@@ -604,11 +601,7 @@ class Builder(gtk.Window):
self.parameters.all_package_formats = formats
def handler_command_succeeded_cb(self, handler, initcmd):
if initcmd == self.handler.PARSE_CONFIG:
# settings
self.update_configuration_parameters(self.get_parameters_sync())
self.generate_configuration_async()
elif initcmd == self.handler.GENERATE_CONFIGURATION:
if initcmd == self.handler.GENERATE_CONFIGURATION:
self.update_configuration_parameters(self.get_parameters_sync())
self.image_configuration_page.switch_machine_combo()
elif initcmd in [self.handler.GENERATE_RECIPES,