[Xfce4-commits] <xfce4-battery-plugin:master> Show "No battery, AC on-line" in tooltip if charge == 0 too, let's be consistent with the icon.

Landry Breuil noreply at xfce.org
Mon Apr 23 11:50:01 CEST 2012


Updating branch refs/heads/master
         to 419d999e79d5a331299620cbfc6a54fc47d42212 (commit)
       from 2c13a8ba52e72b41d378fce1c8392c480523ff5f (commit)

commit 419d999e79d5a331299620cbfc6a54fc47d42212
Author: Landry Breuil <landry at xfce.org>
Date:   Mon Apr 23 11:36:30 2012 +0200

    Show "No battery, AC on-line" in tooltip if charge == 0 too, let's be consistent with the icon.

 panel-plugin/battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index d245e9f..e3e0a52 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -547,7 +547,7 @@ battmon.c:241: for each function it appears in.)
 
     if(acline) {
         char *t;
-        if((battmon->method == BM_USE_ACPI) && (acpiinfo->present == 0)) {
+        if(((battmon->method == BM_USE_ACPI) && (acpiinfo->present == 0)) || 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