PowerStatus: Rename 'battery low' sound, add 'critical' sound
* Renaming "Low battery" to "Battery low" so it's right next to "Battery charged" in the Sounds prefs event list. * Adding "Battery critical" sound. I think it makes sense to have a different - more urgent - sound when there's only 15% left, compared to "Low" (30%). Change-Id: I46b5975e5797a9c3a84d4619e697be162e79b1cf Reviewed-on: https://review.haiku-os.org/c/haiku/+/6900 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
36830615dd
commit
5491ece2a4
@@ -123,7 +123,8 @@ PowerStatusView::_Init()
|
|||||||
|
|
||||||
fHasNotifiedLowBattery = false;
|
fHasNotifiedLowBattery = false;
|
||||||
|
|
||||||
add_system_beep_event("Low battery");
|
add_system_beep_event("Battery critical");
|
||||||
|
add_system_beep_event("Battery low");
|
||||||
add_system_beep_event("Battery charged");
|
add_system_beep_event("Battery charged");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -609,13 +610,13 @@ PowerStatusView::_NotifyLowBattery()
|
|||||||
BNotification notification(
|
BNotification notification(
|
||||||
fHasBattery ? B_INFORMATION_NOTIFICATION : B_ERROR_NOTIFICATION);
|
fHasBattery ? B_INFORMATION_NOTIFICATION : B_ERROR_NOTIFICATION);
|
||||||
|
|
||||||
system_beep("Low battery");
|
|
||||||
|
|
||||||
if (fHasBattery) {
|
if (fHasBattery) {
|
||||||
|
system_beep("Battery low");
|
||||||
notification.SetTitle(B_TRANSLATE("Battery low"));
|
notification.SetTitle(B_TRANSLATE("Battery low"));
|
||||||
notification.SetContent(B_TRANSLATE(
|
notification.SetContent(B_TRANSLATE(
|
||||||
"The battery level is getting low, please plug in the device."));
|
"The battery level is getting low, please plug in the device."));
|
||||||
} else {
|
} else {
|
||||||
|
system_beep("Battery critical");
|
||||||
notification.SetTitle(B_TRANSLATE("Battery critical"));
|
notification.SetTitle(B_TRANSLATE("Battery critical"));
|
||||||
notification.SetContent(B_TRANSLATE(
|
notification.SetContent(B_TRANSLATE(
|
||||||
"The battery level is critical, please plug in the device "
|
"The battery level is critical, please plug in the device "
|
||||||
|
|||||||
Reference in New Issue
Block a user