Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: "cristiana.voicu" <cristiana.voicu@intel.com>
To: Valentin Popa <valentin.popa@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] HOB: Busy cursor when saving configuration
Date: Fri, 27 Sep 2013 13:40:32 +0300	[thread overview]
Message-ID: <524560A0.8050307@intel.com> (raw)
In-Reply-To: <1378817932-5304-1-git-send-email-valentin.popa@intel.com>

On 09/10/2013 03:58 PM, Valentin Popa wrote:
> Display a busy cursor while the configuration is saved.
>
> [YOCTO #4846]
> Signed-off-by: Valentin Popa <valentin.popa@intel.com>
> ---
>   bitbake/lib/bb/ui/crumbs/builder.py                |  8 ++++++++
>   bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 10 ++++++++++
>   2 files changed, 18 insertions(+)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
> index 86fdbfe..8292813 100755
> --- a/bitbake/lib/bb/ui/crumbs/builder.py
> +++ b/bitbake/lib/bb/ui/crumbs/builder.py
> @@ -31,6 +31,7 @@ import re
>   import logging
>   import sys
>   import signal
> +import time
>   from bb.ui.crumbs.imageconfigurationpage import ImageConfigurationPage
>   from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
>   from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
> @@ -1466,3 +1467,10 @@ class Builder(gtk.Window):
>   
>       def get_topdir(self):
>           return self.handler.get_topdir()
> +
> +    def wait(self, delay):
> +        time_start = time.time()
> +        time_end = time_start + delay
> +        while time_end > time.time():
> +            while gtk.events_pending():
> +                gtk.main_iteration()
> diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> index 3babc8e..79709d0 100644
> --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -300,7 +300,12 @@ class ImageConfigurationPage (HobPage):
>       def view_warnings_button_clicked_cb(self, button):
>           self.builder.show_warning_dialog()
>   
> +    def machine_combo_changed_idle_cb(self):
> +        self.builder.window.set_cursor(None)
> +
>       def machine_combo_changed_cb(self, machine_combo):
> +        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
> +        self.builder.wait(0.1) #wait for combo and cursor to update
>           self.stopping = False
>           self.builder.parsing_warnings = []
>           combo_item = machine_combo.get_active_text()
> @@ -324,6 +329,8 @@ class ImageConfigurationPage (HobPage):
>           # Do reparse recipes
>           self.builder.populate_recipe_package_info_async()
>   
> +        glib.idle_add(self.machine_combo_changed_idle_cb)
> +
>       def update_machine_combo(self):
>           self.disable_warnings_bar()
>           all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines
> @@ -527,7 +534,10 @@ class ImageConfigurationPage (HobPage):
>           if not response:
>               return
>           if settings_changed:
> +            self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
> +            self.builder.wait(0.1) #wait for adv_settings_dialog to terminate
>               self.builder.reparse_post_adv_settings()
> +            self.builder.window.set_cursor(None)
>   
>       def just_bake_button_clicked_cb(self, button):
>           self.builder.parsing_warnings = []
Hi Richard,
I think this patch was forgotten. Can you please merge it?
Thanks!


      reply	other threads:[~2013-09-27 10:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 12:58 [PATCH] HOB: Busy cursor when saving configuration Valentin Popa
2013-09-27 10:40 ` cristiana.voicu [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=524560A0.8050307@intel.com \
    --to=cristiana.voicu@intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=valentin.popa@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox