From kde-commits Sat Apr 10 13:55:59 2004 From: Volker Krause Date: Sat, 10 Apr 2004 13:55:59 +0000 To: kde-commits Subject: kdeutils/klaptopdaemon Message-Id: <20040410135559.A1C5299F4 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=108160536409704 CVS commit by vkrause: Show an usefull message if klaptopdaemon thinks it is running without any power source. This should fix the remaining "-1% charged" message. CCMAIL: 42745-done@bugs.kde.org M +14 -8 daemondock.cpp 1.59 --- kdeutils/klaptopdaemon/daemondock.cpp #1.58:1.59 @@ -656,4 +656,5 @@ quit: } } else { + if (pdaemon->val >= 0) { if (pdaemon->left >= 0) { QString num3; @@ -665,4 +666,9 @@ quit: tmp = i18n("Running on batteries - %1% charged").arg(pdaemon->val); } + } else { + // running without any power source... + // happens eg. due to ACPI not being able to handle battery hot-plugin + tmp = i18n("No power source found"); + } } QToolTip::add(this, tmp);