[Xfce4-commits] <xfce4-battery-plugin:master> Use the same heuristic to determine if battery is present when selecting icon/setting tooltip
Landry Breuil
noreply at xfce.org
Tue Apr 24 10:12:03 CEST 2012
Updating branch refs/heads/master
to 62dd0eed1cd86490ac6994c176c28dbe7b0c4400 (commit)
from e010619a1d7ac705d760d1b932513513a52fa5ab (commit)
commit 62dd0eed1cd86490ac6994c176c28dbe7b0c4400
Author: Landry Breuil <landry at xfce.org>
Date: Tue Apr 24 10:10:02 2012 +0200
Use the same heuristic to determine if battery is present when selecting icon/setting tooltip
Use charge == 0 only in the BM_USE_APM case
panel-plugin/battery.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index 0c3e0f7..f1ac711 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -483,7 +483,7 @@ battmon.c:241: for each function it appears in.)
}
if(battmon->options.display_icon){
- if(charge == 0) {
+ if((battmon->method == BM_USE_ACPI && acpiinfo->present == 0) || (battmon->method == BM_USE_APM && charge == 0)) {
/* battery missing */
icon_name = g_strdup("xfce4-battery-missing");
new_state = BM_MISSING;
@@ -550,7 +550,7 @@ battmon.c:241: for each function it appears in.)
if(acline) {
char *t;
- if(((battmon->method == BM_USE_ACPI) && (acpiinfo->present == 0)) || charge == 0) {
+ if((battmon->method == BM_USE_ACPI && acpiinfo->present == 0) || (battmon->method == BM_USE_APM && charge == 0)) {
t=_("(No battery, AC on-line)");
} else {
t=(charge<99.9)?_("(Charging from AC)"):_("(AC on-line)");
More information about the Xfce4-commits
mailing list