summaryrefslogtreecommitdiffstats
path: root/bitbake
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-30 22:11:58 +0100
commitb43c8126def45bb28f89322ad648f555b0f15464 (patch)
tree529b670f4b770b3fc20a5b527b5feddf37481cc9 /bitbake
parent0fe5d9d657446df695e8c810203da469e49ab553 (diff)
downloadpoky-b43c8126def45bb28f89322ad648f555b0f15464.tar.gz
bitbake: HOB: Busy cursor when saving configuration
Display a busy cursor while the configuration is saved. [YOCTO #4846] (Bitbake rev: fdb2e0120f189e97b8fdb6eb72d77a3100ba3018) Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py8
-rw-r--r--bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py10
2 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 86fdbfe9f7..829281357d 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -31,6 +31,7 @@ import re
31import logging 31import logging
32import sys 32import sys
33import signal 33import signal
34import time
34from bb.ui.crumbs.imageconfigurationpage import ImageConfigurationPage 35from bb.ui.crumbs.imageconfigurationpage import ImageConfigurationPage
35from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage 36from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
36from bb.ui.crumbs.packageselectionpage import PackageSelectionPage 37from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
@@ -1466,3 +1467,10 @@ class Builder(gtk.Window):
1466 1467
1467 def get_topdir(self): 1468 def get_topdir(self):
1468 return self.handler.get_topdir() 1469 return self.handler.get_topdir()
1470
1471 def wait(self, delay):
1472 time_start = time.time()
1473 time_end = time_start + delay
1474 while time_end > time.time():
1475 while gtk.events_pending():
1476 gtk.main_iteration()
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 3babc8eb47..79709d0d97 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -300,7 +300,12 @@ class ImageConfigurationPage (HobPage):
300 def view_warnings_button_clicked_cb(self, button): 300 def view_warnings_button_clicked_cb(self, button):
301 self.builder.show_warning_dialog() 301 self.builder.show_warning_dialog()
302 302
303 def machine_combo_changed_idle_cb(self):
304 self.builder.window.set_cursor(None)
305
303 def machine_combo_changed_cb(self, machine_combo): 306 def machine_combo_changed_cb(self, machine_combo):
307 self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
308 self.builder.wait(0.1) #wait for combo and cursor to update
304 self.stopping = False 309 self.stopping = False
305 self.builder.parsing_warnings = [] 310 self.builder.parsing_warnings = []
306 combo_item = machine_combo.get_active_text() 311 combo_item = machine_combo.get_active_text()
@@ -324,6 +329,8 @@ class ImageConfigurationPage (HobPage):
324 # Do reparse recipes 329 # Do reparse recipes
325 self.builder.populate_recipe_package_info_async() 330 self.builder.populate_recipe_package_info_async()
326 331
332 glib.idle_add(self.machine_combo_changed_idle_cb)
333
327 def update_machine_combo(self): 334 def update_machine_combo(self):
328 self.disable_warnings_bar() 335 self.disable_warnings_bar()
329 all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines 336 all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines
@@ -527,7 +534,10 @@ class ImageConfigurationPage (HobPage):
527 if not response: 534 if not response:
528 return 535 return
529 if settings_changed: 536 if settings_changed:
537 self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
538 self.builder.wait(0.1) #wait for adv_settings_dialog to terminate
530 self.builder.reparse_post_adv_settings() 539 self.builder.reparse_post_adv_settings()
540 self.builder.window.set_cursor(None)
531 541
532 def just_bake_button_clicked_cb(self, button): 542 def just_bake_button_clicked_cb(self, button):
533 self.builder.parsing_warnings = [] 543 self.builder.parsing_warnings = []