[gnome-settings-daemon/wip/hadess/power-notifications-device-types: 2/4] power: Add specific notifications for a number of device types
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/hadess/power-notifications-device-types: 2/4] power: Add specific notifications for a number of device types
- Date: Thu, 19 Aug 2021 14:45:56 +0000 (UTC)
commit b5107d2d22d8e450df2cb4a3a941f86d8cee1ec3
Author: Bastien Nocera <hadess hadess net>
Date: Thu Aug 19 16:32:45 2021 +0200
power: Add specific notifications for a number of device types
Including headphones, headsets and speakers, as well as game
controllers, touchpads and generic Bluetooth devices.
plugins/power/gsd-power-manager.c | 156 ++++++++++++++++++++++++++++++++++++++
1 file changed, 156 insertions(+)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 87b7a4e1..11078a00 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -592,6 +592,162 @@ static const struct {
"The device will soon shutdown if not charged."),
.crit_body_unk = N_("Attached computer is very low in power. "
"The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_GAMING_INPUT,
+ /* TRANSLATORS: notification title, an attached game controller (e.g. joystick or joypad) is
low or very low on power */
+ .title = N_("Attached game controller battery low"),
+
+ /* TRANSLATORS: notification body, an attached game controller (e.g. joystick or joypad) is
low on power */
+ .low_body = N_("Attached game controller is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached game controller is low in power"),
+ /* TRANSLATORS: notification body, an attached game controller (e.g. joystick or joypad) is
very low on power */
+ .crit_body = N_("Attached game controller is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached game controller is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_PEN,
+ /* TRANSLATORS: notification title, an attached pen is low or very low on power */
+ .title = N_("Attached pen battery low"),
+
+ /* TRANSLATORS: notification body, an attached pen is low on power */
+ .low_body = N_("Attached pen is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached pen is low in power"),
+ /* TRANSLATORS: notification body, an attached pen is very low on power */
+ .crit_body = N_("Attached pen is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached pen is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_TOUCHPAD,
+ /* TRANSLATORS: notification title, an external touchpad is low or very low on power */
+ .title = N_("Attached touchpad battery low"),
+
+ /* TRANSLATORS: notification body, an external touchpad is low on power */
+ .low_body = N_("Attached touchpad is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached touchpad is low in power"),
+ /* TRANSLATORS: notification body, an external touchpad is very low on power */
+ .crit_body = N_("Attached touchpad is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached touchpad is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_HEADSET,
+ /* TRANSLATORS: notification title, an attached headset (headphones + microphone) is low or
very low on power */
+ .title = N_("Attached headset battery low"),
+
+ /* TRANSLATORS: notification body, an attached headset (headphones + microphone) is low on
power */
+ .low_body = N_("Attached headset is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached headset is low in power"),
+ /* TRANSLATORS: notification body, an attached headset (headphones + microphone) is very low
on power */
+ .crit_body = N_("Attached headset is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached headset is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_SPEAKERS,
+ /* TRANSLATORS: notification title, an attached speaker is low or very low on power */
+ .title = N_("Attached speaker battery low"),
+
+ /* TRANSLATORS: notification body, an attached speaker is low on power */
+ .low_body = N_("Attached speaker is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached speaker is low in power"),
+ /* TRANSLATORS: notification body, an attached speaker is very low on power */
+ .crit_body = N_("Attached speaker is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached speaker is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_HEADPHONES,
+ /* TRANSLATORS: notification title, attached headphones are low or very low on power */
+ .title = N_("Attached headphones battery low"),
+
+ /* TRANSLATORS: notification body, attached headphones are low on power */
+ .low_body = N_("Attached headphones are low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached headphones are low in power"),
+ /* TRANSLATORS: notification body, an attached headphones (e.g. ipad) is very low on power */
+ .crit_body = N_("Attached headphones are very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached headphones are very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_OTHER_AUDIO,
+ /* TRANSLATORS: notification title, an attached audio device is low or very low on power */
+ .title = N_("Attached audio device battery low"),
+
+ /* TRANSLATORS: notification body, an attached audio device (e.g. ipad) is low on power */
+ .low_body = N_("Attached audio device is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached audio device is low in power"),
+ /* TRANSLATORS: notification body, an attached audio device (e.g. ipad) is very low on power
*/
+ .crit_body = N_("Attached audio device is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached audio device is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_REMOTE_CONTROL,
+ /* TRANSLATORS: notification title, a remote is low or very low on power */
+ .title = N_("Attached remote battery low"),
+
+ /* TRANSLATORS: notification body, an attached rmeote is low on power */
+ .low_body = N_("Attached remote is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached remote is low in power"),
+ /* TRANSLATORS: notification body, an attached remote is very low on power */
+ .crit_body = N_("Attached remote is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached remote is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_PRINTER,
+ /* TRANSLATORS: notification title, an attached printer is low or very low on power */
+ .title = N_("Attached printer battery low"),
+
+ /* TRANSLATORS: notification body, an attached printer is low on power */
+ .low_body = N_("Attached printer is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached printer is low in power"),
+ /* TRANSLATORS: notification body, an attached printer is very low on power */
+ .crit_body = N_("Attached printer is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached printer is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_SCANNER,
+ /* TRANSLATORS: notification title, an attached scanner is low or very low on power */
+ .title = N_("Attached scanner battery low"),
+
+ /* TRANSLATORS: notification body, an attached scanner is low on power */
+ .low_body = N_("Attached scanner is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached scanner is low in power"),
+ /* TRANSLATORS: notification body, an attached scanner is very low on power */
+ .crit_body = N_("Attached scanner is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached scanner is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_CAMERA,
+ /* TRANSLATORS: notification title, an attached camera is low or very low on power */
+ .title = N_("Attached camera battery low"),
+
+ /* TRANSLATORS: notification body, an attached camera is low on power */
+ .low_body = N_("Attached camera is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached camera is low in power"),
+ /* TRANSLATORS: notification body, an attached camera is very low on power */
+ .crit_body = N_("Attached camera is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached camera is very low in power. "
+ "The device will soon shutdown if not charged."),
+ }, {
+ .kind = UP_DEVICE_KIND_BLUETOOTH_GENERIC,
+ /* TRANSLATORS: notification title, a Bluetooth device is low or very low on power */
+ .title = N_("Attached Bluetooth device battery low"),
+
+ /* TRANSLATORS: notification body, a Bluetooth device is low on power */
+ .low_body = N_("Attached Bluetooth device is low in power (%.0f%%)"),
+ .low_body_unk = N_("Attached Bluetooth device is low in power"),
+ /* TRANSLATORS: notification body, a Bluetooth device is very low on power */
+ .crit_body = N_("Attached Bluetooth device is very low in power (%.0f%%). "
+ "The device will soon shutdown if not charged."),
+ .crit_body_unk = N_("Attached Bluetooth device is very low in power. "
+ "The device will soon shutdown if not charged."),
}, {
/* Last entry is the fallback (kind is actually unused)! */
.kind = UP_DEVICE_KIND_UNKNOWN,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]