GNOME Bugzilla – Bug 423186
Battery info shouldn't be a notification
Last modified: 2009-07-17 16:22:33 UTC
Information of battery info should be a dialog which pops up rather than in a "notificaion." Notifications should be to notify a user of an event, not tell them about information that they requested. Only one can battery information "notification" can be viewed at a time, the information window can't be moved by the user and the text it contains can't be selected and copied. Other information: This seems to be a growing trend where GNOME projects are following Windows' mistake of abusing notificaions.
Sure, I agree. I just put it there as it was quicker to re-use the GpmNotify class again. I'm open to changing these to proper modal messageboxes. Would you like to have a go at fixing this, or shall I do it (warning, might take a few weeks/months - exams). Thanks, Richard.
Ah, that makes sense. I can try an fix it, but not for a week or two because of other projects. Also, my C/GNOME/GTK programming skills are still a little limited (but willing to learn.)
Sure, download trunk, and start having a look at gpm-tray-icon.c and gpm-notify.c - it should be quite easy to copy paste. Yell if you need a hand. Cheers.
>I can try an fix it, but not for a week or two because of other projects. Do you still want to try and fix this, or do you want me to do it? Thanks.
Other projects would be graduation, and now a summer job. So I think that you had better do this. Sorry for saying I could and then holding off.
Created attachment 128987 [details] [review] Proposed patch Here is my proposed patch from Ubuntu downstream: https://bugs.launchpad.net/gnome-power/+bug/329296
This patch contains changes that were specified by the Ubuntu Desktop Experience team. I don't have a full description of the usability rationale for all the changes requested, but I can at least give you a specific list of what changes were made here: Gnome Power Manager puts up notifications in many situations. Five of these are unusual and important and should be acknowledged, so they should be presented as alert boxes instead: * “Battery may be recalled”, with text “The battery in your computer may have been recalled by %s and you may be at risk. For more information visit the %s battery recall website.”, and buttons labelled “Visit recall website” and “Do not show me this again". * “Battery may be broken”, with text “Your battery has a very low capacity (%i%%), which means that it may be old or broken.” and a button "Do not show me this again". (This will fix bug 155191 (Battery Broken message cut off).) * “UPS Discharging”, with text "The AC power has been unplugged. The system is now using backup power." and a button "Do not show me this again". * “Sleep Problem”, with text “Your computer failed to hibernate. Check the help file for common problems.” or “Your computer failed to suspend. Check the help file for common problems.” and containing a "Do not show me this again" button and a “Visit quirk website” button. * “Power Critically Low”, with text “You have approximately X minutes of remaining battery life (Y%). Plug in your AC Adapter to avoid losing data.”, or “The battery is below the critical level and this computer will power-off when the battery becomes completely empty.”. * “Battery Discharging”, “The AC power has been unplugged. The system is now using battery power.” with a “Do not show me this again” button. This button should be made conditional on whether the notification server supports actions. Two others should put up neither a notification bubble nor an alert, so their bubbles should be removed: * “Sleep warning”, “Your laptop will not sleep if you shut the lid as a running program has prevented this. Some laptops can overheat if they do not sleep when the lid is closed.” * “Battery Charged”, “Your laptop battery is now fully charged”. Also, I added code to check the notification server's caps for "actions" before setting notify_notification_add_action().
Is this patch against trunk?
No, sorry.. I'll fix this to apply to trunk.
Created attachment 131137 [details] [review] Updated patch for trunk Hey Richard, sorry for taking so long. Here is a new patch that applies against trunk.
Created attachment 134181 [details] [review] An updated patch
hughsie, ping. Do you have time to check this out sometime?
ping hughsie :)
Reviewing and committing bits now.
I've rewritten your patch, and ended up removing the GpmNotify class completely. I've removed all the actions on the libnotify bubbles, and have also converted the battery recall and suspend failed notifications into GtkDialogs. Could you test out git master, and tell me what you think? Thanks. commit 3c721b77404f59e23ab712c099b0c179fd1e491c Author: Richard Hughes <richard@hughsie.com> Date: Fri Jul 17 17:21:19 2009 +0100 Remove GpmNotify, and do the notifications in a more sane way. Fixes #423186