GNOME Bugzilla – Bug 332150
Gnome power manager tells us we are about to shutdown when critical, and locks gui
Last modified: 2006-02-23 10:14:29 UTC
We should display the policy action we are about to do, rather than just "shutdown". We also lock the GUI, when we should do this with a g_timeout that allows the GUI to continue working.
Created attachment 59919 [details] [review] example patch How about something like this?
Seems OK to me
Thanks for the review Jaap. 2006-02-23 Richard Hughes <richard@hughsie.com> src/gpm-manager.c (manager_critical_action_do): Do the critical action as part of a g_timeout, rather than a just a delay so we don't lock the GUI. Fixes #332150 src/gpm-manager.c (battery_status_changed_primary): Describe what we are going to do better, so we don't say we are going to shutdown when we just are going to hibernate. Fixes https://launchpad.net/malone/bugs/32250
Hey guys, I'm sorry to always be so late with reviews... Just one problem with the patch. In this context, you always need to use the return value of g_timeout_add and remove the GSource by id when finalizing or entering action_do again. Look in gpm-idle.c or gpm-dpms-x11.c for examples.
Ahh, Jon. Is there an easy way to do this without a fully blown state machine? What's the worst case scenario if we don't remove GSource? Thanks.