Improve notifications

Bug #329296 reported by Cody Russell
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-power
Fix Released
Low
gnome-power-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gnome-power-manager

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.”.

Revision history for this message
Cody Russell (bratsche) wrote :
Revision history for this message
Cody Russell (bratsche) wrote :

An updated patch. This fixes a memory leak in the previous patch (the hash table entry wasn't freed after the alert callback is executed). This also addresses the following issues that I failed to post in the bug description above:

Another situation is fairly common, but any response involves the hardware rather than the software, so it should use a notification bubble:

    * “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”.

Revision history for this message
Cody Russell (bratsche) wrote :

Corrected patch. The last patch accidentally contained some code in gpm-engine.c I was using to test the changes with. This patch fixes that but is otherwise the same.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Cody. Can you please submit this to upstream, together with a rationale of the change (which should include a pointer to the general DX design philosophy, in the sense of "why are actions in notifications bad?"). Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

Sebastien, can you please review this?

Changed in gnome-power-manager:
assignee: nobody → seb128
Revision history for this message
Martin Pitt (pitti) wrote :

Doing myself now.

Changed in gnome-power-manager:
assignee: seb128 → pitti
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.24.2-2ubuntu3

---------------
gnome-power-manager (2.24.2-2ubuntu3) jaunty; urgency=low

  * Add 26-notifications.patch: Show alert boxes for important
    situations (“Battery may be recalled”, “Battery may be broken”,
    etc., and do not use actions in notifications if the
    notification-daemon does not support them. Thanks to Cody Russell!
    (LP: #329296) This also fixes the problem of cut-off notifications
    for broken batteries. (LP: #155191)
  * 74-disable-quirks-reference.patch: Updated for above patch, and
    simplified.

 -- Martin Pitt <email address hidden> Tue, 17 Feb 2009 16:34:44 +0100

Changed in gnome-power-manager:
status: New → Fix Released
Changed in gnome-power:
status: Unknown → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Cody, the linked upstream bug might indeed be a good place to put this patch at.

Revision history for this message
Cody Russell (bratsche) wrote :

Thanks, I've posted the patch upstream to http://bugzilla.gnome.org/show_bug.cgi?id=423186

Revision history for this message
David Barth (dbarth) wrote :

Here is also a new patch for providing feedback notifications with gnome-power-manager. The patch has been updated to reflect the hints changes in the latest notify-osd-0.9 version. This patch replaces the "96_feedback-notify.patch" patch file.

Martin Pitt (pitti)
Changed in gnome-power-manager:
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.24.2-2ubuntu5

---------------
gnome-power-manager (2.24.2-2ubuntu5) jaunty; urgency=low

  * Update 96_feedback-notify-osd.patch to notify-osd's new hint names.
    Patch by David Barth. (LP: #329296)

 -- Martin Pitt <email address hidden> Tue, 03 Mar 2009 14:50:35 +0100

Changed in gnome-power-manager:
status: In Progress → Fix Released
Revision history for this message
David Barth (dbarth) wrote :

New version of the patch:
 * resync with the latest versions of the hints returned by notify-osd (x-canonical-private-*)
 * provide a title to notifications for accessibility purposes (the title is not "displayed" except by readers like gnome-orca)
 * i18n (accessible) titles

Revision history for this message
Martin Pitt (pitti) wrote :

David, please reopen bugs if you update patches, or create a new bug. Comments on closed bugs just fall through the cracks too easily.

Changed in gnome-power-manager (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

David, Cody, please also send the latest version to the upstream bug, and create it against trunk. If you wish, you can also test 2.25 from my PPA, which is very close to trunk.

http://martinpitt.wordpress.com/2009/03/11/wanna-touch-devicekit/

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.24.2-2ubuntu7

---------------
gnome-power-manager (2.24.2-2ubuntu7) jaunty; urgency=low

  * Update 96_feedback-notify-osd.patch to notify-osd's new hint names, and
    provide a title to notifications for accessibility purposes (the title is
    not "displayed" except by readers like gnome-orca). Patch by David Barth.
    (LP: #329296)

 -- Martin Pitt <email address hidden> Wed, 18 Mar 2009 21:04:49 +0100

Changed in gnome-power-manager:
status: In Progress → Fix Released
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

By the way, would somebody change the icon used by the "Your battery is discharging" bubble? For now, it's a warning triangle, which is obviously not appropriate...

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Milan, that bubble shouldn't exist any more; please report that as a separate bug.

Revision history for this message
Martin Pitt (pitti) wrote :

The new gnome-power-manager (2.27.3, to be released next Monday) has a completely rewritten notification system, so our current patch does not apply at all any more. I disabled it in lp:~gnome-power-manager-team/gnome-power/trunk for now. Can you please update the patch? Thanks!

Changed in gnome-power-manager (Ubuntu):
assignee: Martin Pitt (pitti) → Cody Russell (bratsche)
status: Fix Released → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

I'm sorry, I meant the "support notify-osd" patch, not the actual changes to the notifications.

Changed in gnome-power-manager (Ubuntu):
assignee: Cody Russell (bratsche) → nobody
status: Triaged → Fix Released
Revision history for this message
Mirco Müller (macslow) wrote :

I've sent pitti, seb128 and kenvandine a slew of new .dsc, .diff.gz and orig.tar.gz for karmics gnome-power-manager-2.27.5 with the updated and reworked patch. But for the sake of completeness I provide you with my changelog-entry and the extracted new/reworked patch here too.

changelog-entry:

gnome-power-manager (2.27.5-0ubuntu3) karmic; urgency=low

  * reworked the notify-osd integration patch 02-notify-osd-support, but had
    to drop keyboard-brightness as this has been moved out of g.p.m. and also
    dropped general brightness-changed support (bubble showing up when laptop-
    -lid is opened)

 -- Mirco Müller (MacSlow) <email address hidden> Fri, 14 Aug 2009 12:09:12 +0200

Revision history for this message
Mirco Müller (macslow) wrote :

Upon request from seb128 I also opened a new bug https://bugs.edge.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/415932 for my updated patch alone.

Changed in gnome-power:
importance: Unknown → Low
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.