[Sugar-devel] [PATCH] Added busy cursor when we open any section in control panel. (Ticket #245)

Tomeu Vizoso tomeu at sugarlabs.org
Tue Sep 21 03:58:38 EDT 2010


On Mon, Sep 20, 2010 at 22:33, Sascha Silbe
<sascha-ml-reply-to-2010-3 at silbe.org> wrote:
> Excerpts from Ishan Bansal's message of Mon Sep 20 17:36:03 +0200 2010:
>
>> The sections in control panel should activate busy cursor so that user could be given a impression that their request is in progress.
>
> Like for the other patch, please wrap lines so they fit into 80 columns
> (70-75 for the subject).
>
> [src/jarabe/controlpanel/gui.py]
>> @@ -214,11 +214,14 @@ class ControlPanel(gtk.Window):
>>                           globals(), locals(), ['model'])
>>          model = ModelWrapper(mod)
>>
>
>> +        self.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
>> +
>>          self._section_view = view_class(model,
>>                                          self._options[option]['alerts'])
>>
>>          self._set_canvas(self._section_view)
>>          self._section_view.show()
>> +        self.get_window().set_cursor(None)
>
> The cursor shape is global state, so it should be reset in a finally:
> clause with everything between the two set_cursor() calls in the try:
> block.

There's also the question of which window we want the cursor to be
changed. As the CP is modal, would we want it to be on the whole
screen?

If so, we could add a public method on HomeWindow which would be used
here and in the other places where we are changing the cursor.

It could also prove handy in debugging wtf the cursor is not coming
back to the default shape in the future.

Regards,

Tomeu

> Sascha
>
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


More information about the Sugar-devel mailing list