From: Joshua Lock <josh@linux.intel.com>
To: poky@yoctoproject.org
Subject: Re: [IMAGE_CREATOR 1/1] bitbake/hob: Fixed the "build again" hang.
Date: Fri, 10 Jun 2011 10:30:23 -0700 [thread overview]
Message-ID: <1307727023.8304.2.camel@scimitar> (raw)
In-Reply-To: <3f3af21a2adf8a3737368abc816aac4280a65515.1307691323.git.lianhao.lu@intel.com>
On Fri, 2011-06-10 at 15:40 +0800, Lianhao Lu wrote:
> Using gobject.threads_init() instead of gtk.gdk.threads_init(). These
> two modes are conflict to each other. Using gobject.threads_init()
> allows only the main thread to touch GUI(gtk) part.
Great catch! Thanks for the patch.
I'm going to merge just the hunk which drops the gtk.gdk.threads_init()
(with your SOB, hope that's OK?) into the image-creator branch as I have
changes with similar intent to the other hunks in my WIP tree
(josh/hob).
Thanks again,
Joshua
>
> Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
> ---
> bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 3 +++
> bitbake/lib/bb/ui/hob.py | 5 +++--
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> index c474491..a11e6d4 100644
> --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> @@ -134,6 +134,9 @@ class HobHandler(gobject.GObject):
> self.building = True
> self.server.runCommand(["buildTargets", targets, "build"])
>
> + def notify_building_state(self, building):
> + self.building = building
> +
> def cancel_build(self):
> # Note: this may not be the right way to stop an in-progress build
> self.server.runCommand(["stateStop"])
> diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
> index ab6022b..46fb563 100644
> --- a/bitbake/lib/bb/ui/hob.py
> +++ b/bitbake/lib/bb/ui/hob.py
> @@ -63,9 +63,11 @@ class MainWindow (gtk.Window):
>
> def running_build_failed_cb(self, running_build):
> # FIXME: handle this
> + self.handler.notify_building_state(False)
> return
>
> def running_build_succeeded_cb(self, running_build):
> + self.handler.notify_building_state(False)
> label = gtk.Label("Build completed, start another build?")
> dialog = gtk.Dialog("Build complete",
> self,
> @@ -76,7 +78,7 @@ class MainWindow (gtk.Window):
> label.show()
> response = dialog.run()
> dialog.destroy()
> - if not response == gtk.RESPONSE_YES:
> + if response == gtk.RESPONSE_YES:
> self.model.reset() # NOTE: really?
> self.nb.set_current_page(0)
> return
> @@ -555,7 +557,6 @@ class MainWindow (gtk.Window):
>
> def main (server, eventHandler):
> gobject.threads_init()
> - gtk.gdk.threads_init()
>
> taskmodel = TaskListModel()
> handler = HobHandler(taskmodel, server)
--
Joshua Lock
Yocto Build System Monkey
Intel Open Source Technology Centre
prev parent reply other threads:[~2011-06-10 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 7:40 [IMAGE_CREATOR 0/1] Fixed the "build again" hang Lianhao Lu
2011-06-10 7:40 ` [IMAGE_CREATOR 1/1] bitbake/hob: " Lianhao Lu
2011-06-10 17:30 ` Joshua Lock [this message]
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=1307727023.8304.2.camel@scimitar \
--to=josh@linux.intel.com \
--cc=poky@yoctoproject.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.