author | sandman <sandman> | 2002-10-29 15:44:30 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-29 15:44:30 (UTC) |
commit | 6224d462ef211b3b4cffa42d4a7f261caa92834b (patch) (unidiff) | |
tree | 7cb1ccbd7a3cf7c0340cc2283cd7b5040636fd4d /core/launcher/desktop.cpp | |
parent | f47abe11e3e0281fab06e2b4b9d23a2e35960a2c (diff) | |
download | opie-6224d462ef211b3b4cffa42d4a7f261caa92834b.zip opie-6224d462ef211b3b4cffa42d4a7f261caa92834b.tar.gz opie-6224d462ef211b3b4cffa42d4a7f261caa92834b.tar.bz2 |
- use sane default values for screensaver timeouts
- fixed the "Battery low warning" when plugging the device into AC
-rw-r--r-- | core/launcher/desktop.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index bc43475..f2e00d8 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -222,18 +222,18 @@ void DesktopApplication::apmTimeout() | |||
222 | if ( m_ps-> acStatus ( ) != m_ps_last-> acStatus ( )) | 222 | if ( m_ps-> acStatus ( ) != m_ps_last-> acStatus ( )) |
223 | m_screensaver-> powerStatusChanged ( *m_ps ); | 223 | m_screensaver-> powerStatusChanged ( *m_ps ); |
224 | 224 | ||
225 | int bat = m_ps-> batteryPercentRemaining ( ); | 225 | if ( m_ps-> acStatus ( ) != PowerStatus::Online ) { |
226 | 226 | int bat = m_ps-> batteryPercentRemaining ( ); | |
227 | if ( m_ps_last-> batteryPercentRemaining ( ) != bat ) { | 227 | |
228 | if ( bat <= m_powerCritical ) | 228 | if ( bat < m_ps_last-> batteryPercentRemaining ( )) { |
229 | pa->alert( tr( "Battery level is critical!\nKeep power off until power restored!" ), 1 ); | 229 | if ( bat <= m_powerCritical ) |
230 | else if ( bat <= m_powerVeryLow ) | 230 | pa->alert( tr( "Battery level is critical!\nKeep power off until power restored!" ), 1 ); |
231 | pa->alert( tr( "Battery is running very low." ), 2 ); | 231 | else if ( bat <= m_powerVeryLow ) |
232 | 232 | pa->alert( tr( "Battery is running very low." ), 2 ); | |
233 | 233 | } | |
234 | if ( m_ps-> backupBatteryStatus ( ) == PowerStatus::VeryLow ) | 234 | if ( m_ps-> backupBatteryStatus ( ) == PowerStatus::VeryLow ) |
235 | pa->alert( tr( "The Back-up battery is very low.\nPlease charge the back-up battery." ), 2 ); | 235 | pa->alert( tr( "The Back-up battery is very low.\nPlease charge the back-up battery." ), 2 ); |
236 | } | 236 | } |
237 | } | 237 | } |
238 | 238 | ||
239 | void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &data ) | 239 | void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &data ) |