aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Popa <valentin.popa@intel.com>2013-09-10 15:58:52 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-27 16:02:14 +0100
commitfdb2e0120f189e97b8fdb6eb72d77a3100ba3018 (patch)
tree6cbd2e39ff91e51fde962bdcbbfe9d4e581b635a
parent2666865a27cedbffc82800b4cab1d6cff5a0222e (diff)
downloadbitbake-fdb2e0120f189e97b8fdb6eb72d77a3100ba3018.tar.gz
bitbake-fdb2e0120f189e97b8fdb6eb72d77a3100ba3018.tar.bz2
bitbake-fdb2e0120f189e97b8fdb6eb72d77a3100ba3018.zip
HOB: Busy cursor when saving configuration
Display a busy cursor while the configuration is saved. [YOCTO #4846] Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xlib/bb/ui/crumbs/builder.py8
-rw-r--r--lib/bb/ui/crumbs/imageconfigurationpage.py10
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 86fdbfe9..82928135 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/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/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 3babc8eb..79709d0d 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/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 = []