author | mickeyl <mickeyl> | 2004-04-07 13:36:16 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-07 13:36:16 (UTC) |
commit | 4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (unidiff) | |
tree | 59b4879b1065086c9a2e28f16f7d48540c8a9456 /core/launcher/screensaver.cpp | |
parent | 8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff) | |
download | opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2 |
use Opie debugging framework
Diffstat (limited to 'core/launcher/screensaver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/screensaver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/screensaver.cpp b/core/launcher/screensaver.cpp index 6aaab3a..a7d23c4 100644 --- a/core/launcher/screensaver.cpp +++ b/core/launcher/screensaver.cpp | |||
@@ -137,49 +137,49 @@ void OpieScreenSaver::setIntervals ( int dim, int lightoff, int suspend ) | |||
137 | Config config ( "apm" ); | 137 | Config config ( "apm" ); |
138 | config. setGroup ( m_on_ac ? "AC" : "Battery" ); | 138 | config. setGroup ( m_on_ac ? "AC" : "Battery" ); |
139 | 139 | ||
140 | int v[ 4 ]; | 140 | int v[ 4 ]; |
141 | if ( dim < 0 ) | 141 | if ( dim < 0 ) |
142 | dim = config. readNumEntry ( "Dim", m_on_ac ? 60 : 30 ); | 142 | dim = config. readNumEntry ( "Dim", m_on_ac ? 60 : 30 ); |
143 | if ( lightoff < 0 ) | 143 | if ( lightoff < 0 ) |
144 | lightoff = config. readNumEntry ( "LightOff", m_on_ac ? 120 : 20 ); | 144 | lightoff = config. readNumEntry ( "LightOff", m_on_ac ? 120 : 20 ); |
145 | if ( suspend < 0 ) | 145 | if ( suspend < 0 ) |
146 | suspend = config. readNumEntry ( "Suspend", m_on_ac ? 0 : 60 ); | 146 | suspend = config. readNumEntry ( "Suspend", m_on_ac ? 0 : 60 ); |
147 | 147 | ||
148 | if ( m_on_ac ) { | 148 | if ( m_on_ac ) { |
149 | m_enable_dim_ac = ( dim > 0 ); | 149 | m_enable_dim_ac = ( dim > 0 ); |
150 | m_enable_lightoff_ac = ( lightoff > 0 ); | 150 | m_enable_lightoff_ac = ( lightoff > 0 ); |
151 | m_enable_suspend_ac = ( suspend > 0 ); | 151 | m_enable_suspend_ac = ( suspend > 0 ); |
152 | m_onlylcdoff_ac = config.readBoolEntry ( "LcdOffOnly", false ); | 152 | m_onlylcdoff_ac = config.readBoolEntry ( "LcdOffOnly", false ); |
153 | } | 153 | } |
154 | else { | 154 | else { |
155 | m_enable_dim = ( dim > 0 ); | 155 | m_enable_dim = ( dim > 0 ); |
156 | m_enable_lightoff = ( lightoff > 0 ); | 156 | m_enable_lightoff = ( lightoff > 0 ); |
157 | m_enable_suspend = ( suspend > 0 ); | 157 | m_enable_suspend = ( suspend > 0 ); |
158 | m_onlylcdoff = config.readBoolEntry ( "LcdOffOnly", false ); | 158 | m_onlylcdoff = config.readBoolEntry ( "LcdOffOnly", false ); |
159 | } | 159 | } |
160 | 160 | ||
161 | //qDebug("screen saver intervals: %d %d %d", dim, lightoff, suspend); | 161 | //odebug << "screen saver intervals: " << dim << " " << lightoff << " " << suspend << "" << oendl; |
162 | 162 | ||
163 | v [ 0 ] = QMAX( 1000 * dim, 100 ); | 163 | v [ 0 ] = QMAX( 1000 * dim, 100 ); |
164 | v [ 1 ] = QMAX( 1000 * lightoff, 100 ); | 164 | v [ 1 ] = QMAX( 1000 * lightoff, 100 ); |
165 | v [ 2 ] = QMAX( 1000 * suspend, 100 ); | 165 | v [ 2 ] = QMAX( 1000 * suspend, 100 ); |
166 | v [ 3 ] = 0; | 166 | v [ 3 ] = 0; |
167 | 167 | ||
168 | if ( !dim && !lightoff && !suspend ) | 168 | if ( !dim && !lightoff && !suspend ) |
169 | QWSServer::setScreenSaverInterval( 0 ); | 169 | QWSServer::setScreenSaverInterval( 0 ); |
170 | else | 170 | else |
171 | QWSServer::setScreenSaverIntervals( v ); | 171 | QWSServer::setScreenSaverIntervals( v ); |
172 | } | 172 | } |
173 | 173 | ||
174 | 174 | ||
175 | /** | 175 | /** |
176 | * Set suspend time. Will read the dim and lcd-off times from the config file. | 176 | * Set suspend time. Will read the dim and lcd-off times from the config file. |
177 | * | 177 | * |
178 | * @param suspend time in seconds to go into APM suspend, -1 to | 178 | * @param suspend time in seconds to go into APM suspend, -1 to |
179 | * read value from config file, 0 to disable | 179 | * read value from config file, 0 to disable |
180 | */ | 180 | */ |
181 | void OpieScreenSaver::setInterval ( int interval ) | 181 | void OpieScreenSaver::setInterval ( int interval ) |
182 | { | 182 | { |
183 | setIntervals ( -1, -1, interval ); | 183 | setIntervals ( -1, -1, interval ); |
184 | } | 184 | } |
185 | 185 | ||