-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 14 | ||||
-rw-r--r-- | core/applets/batteryapplet/batterystatus.cpp | 2 | ||||
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 4 | ||||
-rw-r--r-- | core/applets/homeapplet/home.h | 4 | ||||
-rw-r--r-- | core/applets/restartapplet2/.cvsignore | 1 | ||||
-rw-r--r-- | core/applets/suspendapplet/suspend.h | 4 |
6 files changed, 11 insertions, 18 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index 480d261..078ce8d 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp @@ -117,28 +117,18 @@ void BatteryMeter::chargeTimeout() void BatteryMeter::paintEvent( QPaintEvent* ) { if ( style == 1 ) { QPainter p(this); QFont f( "Fixed", AppLnk::smallIconSize()/2 ); QFontMetrics fm( f ); p.setFont( f ); - if ( percent > 98 ) { - p.drawText( 0, 0, width(), height(), Qt::AlignCenter, tr( "F" ) ); - } - else if ( percent < 5 ) - { - p.drawText( 0, 0, width(), height(), Qt::AlignCenter, tr( "E" ) ); - } - else - { - p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) ); - p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" ); - } + p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) ); + p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" ); return; } QPainter p(this); QColor color; QColor g = gray.light( 160 ); switch ( ps->acStatus() ) { diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp index 092a48d..5936b5d 100644 --- a/core/applets/batteryapplet/batterystatus.cpp +++ b/core/applets/batteryapplet/batterystatus.cpp @@ -235,17 +235,17 @@ void BatteryStatus::paintEvent( QPaintEvent * ) { p.drawText(10,220, tr("Percentage battery remaining: ") + perc2 + " " + jackStatus); p.drawText(10,240, tr("Battery time remaining: ") + sec2); jacketMsg = tr("Jacket " + jackChem); } else { jackPercent = 0; jacketMsg = tr("No jacket with battery inserted"); } - int jackPerc = ( jackPercent / 100.0 ) * screenWidth - 47; + int jackPerc = ( jackPercent / 100.0 ) * ( screenWidth - 47 ) ; qDrawShadePanel( &p, 9, 160, rightEnd1, 39, colorGroup(), TRUE, 1, NULL); qDrawShadePanel( &p, rightEnd2, 167, 12, 24, colorGroup(), TRUE, 1, NULL); drawSegment( &p, QRect( 10, 160, jackPerc, 40 ), lightc, darkc, lightc.light(115), 6 ); drawSegment( &p, QRect( 11 + jackPerc, 160, rightEnd1 - jackPerc, 40 ), white.light(80), black, white.light(90), 6 ); drawSegment( &p, QRect( rightEnd2, 167, 10, 25 ), white.light(80), black, white.light(90), 2 ); p.setPen( black ); p.drawText(15, 180, jacketMsg); diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index b8c4553..4ed09b8 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp @@ -267,17 +267,19 @@ bool CardMonitor::getStatusPcmcia(int showPopUp) what = "on"; } else { text += tr("Ejected: "); what = "off"; } text += cardInPcmcia1Name; popUp(text, "cardmon/" + cardInPcmcia1Type); } +#ifndef QT_NO_SOUND QSound::play(Resource::findSound("cardmon/card" + what)); +#endif } } else { // no file found qDebug("no file found"); cardInPcmcia0 = FALSE; cardInPcmcia1 = FALSE; } repaint( FALSE ); @@ -319,17 +321,19 @@ bool CardMonitor::getStatusSd(int showPopUp) if (cardInSd) { text += "New card: SD/MMC"; what = "on"; } else { text += "Ejected: SD/MMC"; what = "off"; } //qDebug("TEXT: " + text ); +#ifndef QT_NO_SOUND QSound::play(Resource::findSound("cardmon/card" + what)); +#endif popUp(text, "cardmon/ide"); // XX add SD pic } #else #error "Not on Linux" #endif repaint( FALSE ); return ((cardWas == cardInSd) ? FALSE : TRUE); } diff --git a/core/applets/homeapplet/home.h b/core/applets/homeapplet/home.h index 64af97d..1186caf 100644 --- a/core/applets/homeapplet/home.h +++ b/core/applets/homeapplet/home.h @@ -27,23 +27,23 @@ class HomeApplet : public QObject, public MenuAppletInterface public: HomeApplet ( ); virtual ~HomeApplet ( ); QRESULT queryInterface( const QUuid&, QUnknownInterface** ); Q_REFCOUNT virtual int position() const; - + virtual QString name ( ) const; virtual QIconSet icon ( ) const; virtual QString text ( ) const; virtual QString tr( const char* ) const; virtual QString tr( const char*, const char* ) const; virtual QPopupMenu *popup ( QWidget *parent ) const; - + virtual void activated ( ); private: ulong ref; }; #endif diff --git a/core/applets/restartapplet2/.cvsignore b/core/applets/restartapplet2/.cvsignore index a403d26..4943911 100644 --- a/core/applets/restartapplet2/.cvsignore +++ b/core/applets/restartapplet2/.cvsignore @@ -1,7 +1,6 @@ *.moc *.~ Makefile* config.in moc_* opieobjconfig.in -opieobj diff --git a/core/applets/suspendapplet/suspend.h b/core/applets/suspendapplet/suspend.h index 0c92bcb..75467c1 100644 --- a/core/applets/suspendapplet/suspend.h +++ b/core/applets/suspendapplet/suspend.h @@ -27,23 +27,23 @@ class SuspendApplet : public QObject, public MenuAppletInterface public: SuspendApplet ( ); virtual ~SuspendApplet ( ); QRESULT queryInterface( const QUuid&, QUnknownInterface** ); Q_REFCOUNT virtual int position() const; - + virtual QString name ( ) const; virtual QIconSet icon ( ) const; virtual QString text ( ) const; virtual QString tr( const char* ) const; virtual QString tr( const char*, const char* ) const; virtual QPopupMenu *popup ( QWidget *parent ) const; - + virtual void activated ( ); private: ulong ref; }; #endif |