Hello Tomeu , I actually worked upon your suggestion quoted in <a href="http://lists.sugarlabs.org/archive/sugar-devel/2010-September/026741.html">http://lists.sugarlabs.org/archive/sugar-devel/2010-September/026741.html</a> to solve this bug. Actually I changed the cursor in homewindow this time and used glib.idle_add( ) to break out of the infinite gtk.main() loop to shutdown the system when the processor is idle and untill that time it will show a busy cursor which i think will be the proper method to shutdown while providing a visual confirmation of the process.<br>
<br><span dir="ltr" id=":12m">Please let me know if adding this information
in description would be sufficient. If required, I can add more
information.</span>Also I will resubmit a new patch which will be more descriptive than this one.<br><br>Regards,<br><br>Anurag<br><br><div class="gmail_quote">On Mon, Sep 27, 2010 at 7:21 PM, Tomeu Vizoso <span dir="ltr"><<a href="mailto:tomeu@sugarlabs.org">tomeu@sugarlabs.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Sat, Sep 25, 2010 at 23:29, Anurag Chowdhury <<a href="mailto:anurag@seeta.in">anurag@seeta.in</a>> wrote:<br>
> Shutdown (and Logout) menu items should activate the buzzy cursor (or provide some other visual feedback, perhaps dimming/locking the UI from use).<br>
<br>
</div>Hi Anurag, could you explain what you have changed since the last<br>
revision and why?<br>
<br>
With the information you have made available I would have to guess too much.<br>
<br>
Thanks,<br>
<br>
Tomeu<br>
<div><div></div><div class="h5"><br>
> ---<br>
> src/jarabe/view/buddymenu.py | 42 ++++++++++++++++++++++++++++++++++--------<br>
> 1 files changed, 34 insertions(+), 8 deletions(-)<br>
><br>
> v1 was Reviewed-By: James Cameron <quozl at <a href="http://laptop.org" target="_blank">laptop.org</a>><br>
> v1->v2: Set the cursor in its appropriate window<br>
><br>
> diff --git a/src/jarabe/view/buddymenu.py b/src/jarabe/view/buddymenu.py<br>
> index 0ba6cc1..7135d9e 100644<br>
> --- a/src/jarabe/view/buddymenu.py<br>
> +++ b/src/jarabe/view/buddymenu.py<br>
> @@ -21,6 +21,8 @@ from gettext import gettext as _<br>
> import gtk<br>
> import gconf<br>
> import dbus<br>
> +import jarabe<br>
> +import glib<br>
><br>
> from sugar.graphics.palette import Palette<br>
> from sugar.graphics.menuitem import MenuItem<br>
> @@ -98,16 +100,40 @@ class BuddyMenu(Palette):<br>
> item.show()<br>
><br>
> def __logout_activate_cb(self, menu_item):<br>
> - session_manager = get_session_manager()<br>
> - session_manager.logout()<br>
> + def update_cur(window):<br>
> + window.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))<br>
> + return False<br>
> + def shut(self, menu_item):<br>
> + session_manager = get_session_manager()<br>
> + session_manager.logout()<br>
> + window = jarabe.desktop.homewindow.get_instance()<br>
> + glib.timeout_add(3, update_cur, window)<br>
> + glib.idle_add(shut,self,menu_item)<br>
> + gtk.main()<br>
><br>
> def __reboot_activate_cb(self, menu_item):<br>
> - session_manager = get_session_manager()<br>
> - session_manager.reboot()<br>
> -<br>
> - def __shutdown_activate_cb(self, menu_item):<br>
> - session_manager = get_session_manager()<br>
> - session_manager.shutdown()<br>
> + def update_cur(window):<br>
> + window.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))<br>
> + return False<br>
> + def shut(self, menu_item):<br>
> + session_manager = get_session_manager()<br>
> + session_manager.reboot()<br>
> + window = jarabe.desktop.homewindow.get_instance()<br>
> + glib.timeout_add(3, update_cur, window)<br>
> + glib.idle_add(shut,self,menu_item)<br>
> + gtk.main()<br>
> +<br>
> + def __shutdown_activate_cb(self, menu_item):<br>
> + def update_cur(window):<br>
> + window.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))<br>
> + return False<br>
> + def shut(self, menu_item):<br>
> + session_manager = get_session_manager()<br>
> + session_manager.shutdown()<br>
> + window = jarabe.desktop.homewindow.get_instance()<br>
> + glib.timeout_add(3, update_cur, window)<br>
> + glib.idle_add(shut,self,menu_item)<br>
> + gtk.main()<br>
><br>
> def __controlpanel_activate_cb(self, menu_item):<br>
> panel = ControlPanel()<br>
> --<br>
> 1.7.2.2<br>
><br>
</div></div>> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</blockquote></div><br>