GNOME Bugzilla – Bug 730202
gnome-settings-daemon handles power sound effects, but does not alert on plugging or unplugging power
Last modified: 2014-05-16 13:15:07 UTC
My AC connector does not stay seated well, and I recall in older versions of gnome that a sound would play when the power was plugged in or unplugged. Trying to identify where this happens, it appears that a canberra sound event should be triggered with an event id of "power-plug" or "power-unplug". Checking gnome-power-manager shows in the NEWS page an entry for 3.1.3 saying "remove the critical event sounds, they've all moved to g-s-d (Richard Hughes)". There now seems to be no other use of libcanberra in gnome-power-manager. Checking gnome-settings-daemon we can indeed see a number of calls to play sound events for "battery-low" and "battery-caution", however, there are none for "power-plug" or "power-unplug". If these have been lost somewhere along the way, they should be readded, most likely to gnome-settings-daemon. If not then I've got another problem and I'll have to go off and investigate some more...
Created attachment 276610 [details] [review] power: Add sound notification on power plug/unplug
Review of attachment 276610 [details] [review]: Looks good in any case ::: plugins/power/gsd-power-manager.c @@ +1746,3 @@ + CA_PROP_EVENT_ID, "power-unplug", + /* TRANSLATORS: this is the sound description */ + CA_PROP_EVENT_DESCRIPTION, _("On battery power"), NULL); Do these strings show up on the UI?
(In reply to comment #2) > Review of attachment 276610 [details] [review]: > > Looks good in any case > > ::: plugins/power/gsd-power-manager.c > @@ +1746,3 @@ > + CA_PROP_EVENT_ID, "power-unplug", > + /* TRANSLATORS: this is the sound description > */ > + CA_PROP_EVENT_DESCRIPTION, _("On battery > power"), NULL); > > Do these strings show up on the UI? No, but they're passed to pulseaudio for a11y purposes. We can probably remove the translation markers to push to 3.12 though.
Attachment 276610 [details] pushed as 16c7f3d - power: Add sound notification on power plug/unplug