-rw-r--r-- | core/applets/batteryapplet/batterystatus.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp index 34043f4..08ddc85 100644 --- a/core/applets/batteryapplet/batterystatus.cpp +++ b/core/applets/batteryapplet/batterystatus.cpp @@ -6,49 +6,50 @@ #include <qpe/power.h> /* QT */ #include <qpushbutton.h> #include <qdrawutil.h> #include <qfile.h> #include <qtextstream.h> #include <qmessagebox.h> using namespace Opie::Core; BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent, WFlags f ) : QFrame( parent, 0, f), ps(p), bat2(false) { UpdateBatteryStatus(); } BatteryStatus::~BatteryStatus() {} void BatteryStatus::UpdateBatteryStatus() { jackPercent = 0; if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) { - getProcApmStatusIpaq(); + if ( ODevice::inst ( ) -> model() != Model_iPAQ_H191x ) + getProcApmStatusIpaq(); } percent = ps->batteryPercentRemaining(); } /* * Make use of the advanced apm interface of the ipaq */ bool BatteryStatus::getProcApmStatusIpaq() { bat2 = false; QFile procApmIpaq("/proc/hal/battery"); if (procApmIpaq.open(IO_ReadOnly) ) { QStringList list; // since it is /proc we _must_ use QTextStream QTextStream stream ( &procApmIpaq); QString streamIn; streamIn = stream.read(); list = QStringList::split("\n", streamIn); sec2 = sec1 = ""; for(QStringList::Iterator line=list.begin(); line!=list.end(); line++) { |