Patchwork [bitbake-devel,3/4] hob: unsetting busy cursor after hitting Stop button

login
register
mail settings
Submitter Irina Patru
Date Jan. 21, 2014, 3:59 p.m.
Message ID <1390319978-31756-3-git-send-email-irina.patru@intel.com>
Download mbox | patch
Permalink /patch/65377/
State New
Headers show

Comments

Irina Patru - Jan. 21, 2014, 3:59 p.m.
The busy cursor would never change after pressing Stop button.
It should be set after the possible return inside machine_combo_changed_cb()
method.

Signed-off-by: Irina Patru <irina.patru@intel.com>
---
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Valentin Popa - Jan. 24, 2014, 3:55 p.m.
On 01/21/2014 05:59 PM, Irina Patru wrote:
> The busy cursor would never change after pressing Stop button.
> It should be set after the possible return inside machine_combo_changed_cb()
> method.
>
> Signed-off-by: Irina Patru <irina.patru@intel.com>
> ---
>   bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> index 79709d0..6372592 100644
> --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -304,14 +304,15 @@ class ImageConfigurationPage (HobPage):
>           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()
>           if not combo_item or combo_item == self.__dummy_machine__:
>               return
>   
> +        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
> +        self.builder.wait(0.1) #wait for combo and cursor to update
> +
>           # remove __dummy_machine__ item from the store list after first user selection
>           # because it is no longer valid
>           combo_store = machine_combo.get_model()

Looks good to me.

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 79709d0..6372592 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -304,14 +304,15 @@  class ImageConfigurationPage (HobPage):
         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()
         if not combo_item or combo_item == self.__dummy_machine__:
             return
 
+        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.builder.wait(0.1) #wait for combo and cursor to update
+
         # remove __dummy_machine__ item from the store list after first user selection
         # because it is no longer valid
         combo_store = machine_combo.get_model()