From: Joshua Lock <josh@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 07/11] Hob: Remove the recipe/package populated signal
Date: Wed, 14 Mar 2012 12:37:39 -0700 [thread overview]
Message-ID: <4F60F383.4040109@linux.intel.com> (raw)
In-Reply-To: <c5a2b26da70c94f26bfd2e2297cc7b69139ec78c.1331716896.git.dongxiao.xu@intel.com>
On 14/03/12 02:26, Dongxiao Xu wrote:
> Handle the recipe and package list update in
> handler_command_succeeded_cb(), which could avoid potential race
> condition when doing recipe/package list updating and page switching.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
AFAICS this switches the GUI even if the model is not ready, which seems
like a reasonable change.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/builder.py | 18 ++++++++----------
> lib/bb/ui/crumbs/hoblistmodel.py | 14 --------------
> 2 files changed, 8 insertions(+), 24 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index f9844de..c6b1a3d 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -200,8 +200,6 @@ class Builder(gtk.Window):
> self.connect("delete-event", self.destroy_window_cb)
> self.recipe_model.connect ("recipe-selection-changed", self.recipelist_changed_cb)
> self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
> - self.recipe_model.connect ("recipelist-populated", self.recipelist_populated_cb)
> - self.package_model.connect("packagelist-populated", self.packagelist_populated_cb)
> self.handler.connect("config-updated", self.handler_config_updated_cb)
> self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb)
> self.handler.connect("layers-updated", self.handler_layers_updated_cb)
> @@ -413,10 +411,14 @@ class Builder(gtk.Window):
> self.handler.GENERATE_IMAGE]:
> self.handler.request_package_info_async()
> elif initcmd == self.handler.POPULATE_PACKAGEINFO:
> + if self.current_step == self.RCPPKGINFO_POPULATING:
> + self.switch_page(self.RCPPKGINFO_POPULATED)
> + self.rcppkglist_populated()
> + return
> +
> + self.rcppkglist_populated()
> if self.current_step == self.FAST_IMAGE_GENERATING:
> self.switch_page(self.IMAGE_GENERATING)
> - elif self.current_step == self.RCPPKGINFO_POPULATING:
> - self.switch_page(self.RCPPKGINFO_POPULATED)
> elif self.current_step == self.PACKAGE_GENERATING:
> self.switch_page(self.PACKAGE_GENERATED)
> elif self.current_step == self.IMAGE_GENERATING:
> @@ -448,7 +450,7 @@ class Builder(gtk.Window):
> def handler_data_generated_cb(self, handler):
> self.window_sensitive(True)
>
> - def recipelist_populated_cb(self, recipe_model):
> + def rcppkglist_populated(self):
> selected_image = self.configuration.selected_image
> selected_recipes = self.configuration.selected_recipes[:]
> selected_packages = self.configuration.selected_packages[:]
> @@ -458,11 +460,7 @@ class Builder(gtk.Window):
> " ".join(selected_packages))
>
> self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
> -
> self.update_recipe_model(selected_image, selected_recipes)
> -
> - def packagelist_populated_cb(self, package_model):
> - selected_packages = self.configuration.selected_packages[:]
> self.update_package_model(selected_packages)
>
> def recipelist_changed_cb(self, recipe_model):
> @@ -825,7 +823,7 @@ class Builder(gtk.Window):
> self.switch_page(self.RECIPE_SELECTION)
>
> def initiate_new_build(self):
> - self.configuration.curr_mach = ""
> + self.configuration.curr_mach = ""
> self.image_configuration_page.switch_machine_combo()
> self.switch_page(self.MACHINE_SELECTION)
>
> diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> index c19aaa8..edd61b5 100644
> --- a/lib/bb/ui/crumbs/hoblistmodel.py
> +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> @@ -36,9 +36,6 @@ class PackageListModel(gtk.TreeStore):
> (COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC) = range(11)
>
> __gsignals__ = {
> - "packagelist-populated" : (gobject.SIGNAL_RUN_LAST,
> - gobject.TYPE_NONE,
> - ()),
> "package-selection-changed" : (gobject.SIGNAL_RUN_LAST,
> gobject.TYPE_NONE,
> ()),
> @@ -135,8 +132,6 @@ class PackageListModel(gtk.TreeStore):
> """
> The populate() function takes as input the data from a
> bb.event.PackageInfo event and populates the package list.
> - Once the population is done it emits gsignal packagelist-populated
> - to notify any listeners that the model is ready
> """
> def populate(self, pkginfolist):
> self.clear()
> @@ -194,8 +189,6 @@ class PackageListModel(gtk.TreeStore):
> self.COL_RPROV, rprov, self.COL_SIZE, size,
> self.COL_BINB, "", self.COL_INC, False)
>
> - self.emit("packagelist-populated")
> -
> """
> Check whether the item at item_path is included or not
> """
> @@ -425,9 +418,6 @@ class RecipeListModel(gtk.ListStore):
> __dummy_image__ = "Start from scratch"
>
> __gsignals__ = {
> - "recipelist-populated" : (gobject.SIGNAL_RUN_LAST,
> - gobject.TYPE_NONE,
> - ()),
> "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
> gobject.TYPE_NONE,
> ()),
> @@ -524,8 +514,6 @@ class RecipeListModel(gtk.ListStore):
> """
> The populate() function takes as input the data from a
> bb.event.TargetsTreeGenerated event and populates the RecipeList.
> - Once the population is done it emits gsignal recipelist-populated
> - to notify any listeners that the model is ready
> """
> def populate(self, event_model):
> # First clear the model, in case repopulating
> @@ -580,8 +568,6 @@ class RecipeListModel(gtk.ListStore):
> self.pn_path[pn] = path
> it = self.iter_next(it)
>
> - self.emit("recipelist-populated")
> -
> """
> Update the model, send out the notification.
> """
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-03-14 19:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
2012-03-14 9:26 ` [PATCH 01/11] Hob: add "Close" button to "BinbDialog" Dongxiao Xu
2012-03-14 19:38 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 02/11] Hob: Disable the handling of "NoProvider" event Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-15 8:31 ` Xu, Dongxiao
2012-03-15 22:35 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 03/11] cooker: add package rdepends and rrecommends info Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 04/11] Hob: Fix the image installation dependency Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-15 6:02 ` Xu, Dongxiao
2012-03-15 17:47 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 05/11] Hob: Remove the reset button in recipe/package selection page Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 06/11] Hob: Remove the indication in machine/base image combobox Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 07/11] Hob: Remove the recipe/package populated signal Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock [this message]
2012-03-14 9:26 ` [PATCH 08/11] Hob: Show recipe/package editing button after base image is selected Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 10/11] Hob: Add stop button for parsing progress Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-15 0:44 ` Xu, Dongxiao
2012-03-14 9:26 ` [PATCH 11/11] Hob: improve recipe/package selection performance Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 23:54 ` Xu, Dongxiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F60F383.4040109@linux.intel.com \
--to=josh@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.