-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index 18e368e..98b61b5 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp | |||
@@ -70,33 +70,33 @@ void BatteryMeter::mousePressEvent( QMouseEvent* e ) | |||
70 | Config c( "qpe" ); | 70 | Config c( "qpe" ); |
71 | c.setGroup( "Battery" ); | 71 | c.setGroup( "Battery" ); |
72 | c.writeEntry( "Style", style ); | 72 | c.writeEntry( "Style", style ); |
73 | repaint( true ); | 73 | repaint( true ); |
74 | } | 74 | } |
75 | QWidget::mousePressEvent( e ); | 75 | QWidget::mousePressEvent( e ); |
76 | } | 76 | } |
77 | 77 | ||
78 | void BatteryMeter::mouseReleaseEvent( QMouseEvent* /*e*/ ) | 78 | void BatteryMeter::mouseReleaseEvent( QMouseEvent* /*e*/ ) |
79 | { | 79 | { |
80 | if ( batteryView && batteryView->isVisible() ) { | 80 | if ( batteryView && batteryView->isVisible() ) { |
81 | delete (QWidget *) batteryView; | 81 | delete (QWidget *) batteryView; |
82 | } else { | 82 | } else { |
83 | if ( !batteryView ) batteryView = new BatteryStatus( ps ); | 83 | if ( !batteryView ) batteryView = new BatteryStatus( ps ); |
84 | QPEApplication::showWidget( batteryView ); | 84 | QPEApplication::showWidget( batteryView ); |
85 | batteryView->raise(); | 85 | batteryView->raise(); |
86 | batteryView->show(); | 86 | batteryView->showMaximized(); |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | void BatteryMeter::timerEvent( QTimerEvent * ) | 90 | void BatteryMeter::timerEvent( QTimerEvent * ) |
91 | { | 91 | { |
92 | PowerStatus prev = *ps; | 92 | PowerStatus prev = *ps; |
93 | 93 | ||
94 | *ps = PowerStatusManager::readStatus(); | 94 | *ps = PowerStatusManager::readStatus(); |
95 | 95 | ||
96 | if ( prev != *ps ) { | 96 | if ( prev != *ps ) { |
97 | percent = ps->batteryPercentRemaining(); | 97 | percent = ps->batteryPercentRemaining(); |
98 | if ( !charging && ps->batteryStatus() == PowerStatus::Charging ) { | 98 | if ( !charging && ps->batteryStatus() == PowerStatus::Charging ) { |
99 | percent = 0; | 99 | percent = 0; |
100 | charging = true; | 100 | charging = true; |
101 | chargeTimer->start( 500 ); | 101 | chargeTimer->start( 500 ); |
102 | } else if ( charging && ps->batteryStatus() != PowerStatus::Charging ) { | 102 | } else if ( charging && ps->batteryStatus() != PowerStatus::Charging ) { |