summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp
index 5d8929e..b2c1649 100644
--- a/noncore/multimedia/opieplayer2/skin.cpp
+++ b/noncore/multimedia/opieplayer2/skin.cpp
@@ -28,6 +28,7 @@
28#include <qtimer.h> 28#include <qtimer.h>
29 29
30#include <qpe/config.h> 30#include <qpe/config.h>
31#include <qpe/global.h>
31 32
32#include <assert.h> 33#include <assert.h>
33 34
@@ -179,11 +180,11 @@ SkinData *SkinCache::lookupAndTake( const QString &skinPath, const QString &file
179 if ( !data ) 180 if ( !data )
180 data = new SkinData; 181 data = new SkinData;
181 else 182 else
182 odebug << "SkinCache: hit" << oendl; 183 odebug << "SkinCache: hit" << oendl;
183 184
184 QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath ); 185 QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath );
185 if ( bgPixmap ) { 186 if ( bgPixmap ) {
186 odebug << "SkinCache: hit on bgpixmap" << oendl; 187 odebug << "SkinCache: hit on bgpixmap" << oendl;
187 data->backgroundPixmap = *bgPixmap; 188 data->backgroundPixmap = *bgPixmap;
188 } 189 }
189 else 190 else
@@ -219,23 +220,23 @@ SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadS
219{ 220{
220 switch ( m_currentState ) { 221 switch ( m_currentState ) {
221 case LoadBackgroundPixmap: 222 case LoadBackgroundPixmap:
222 odebug << "load bgpixmap" << oendl; 223 odebug << "load bgpixmap" << oendl;
223 m_skin.backgroundPixmap(); 224 m_skin.backgroundPixmap();
224 m_currentState = LoadButtonUpImage; 225 m_currentState = LoadButtonUpImage;
225 break; 226 break;
226 case LoadButtonUpImage: 227 case LoadButtonUpImage:
227 odebug << "load upimage" << oendl; 228 odebug << "load upimage" << oendl;
228 m_skin.buttonUpImage(); 229 m_skin.buttonUpImage();
229 m_currentState = LoadButtonDownImage; 230 m_currentState = LoadButtonDownImage;
230 break; 231 break;
231 case LoadButtonDownImage: 232 case LoadButtonDownImage:
232 odebug << "load downimage" << oendl; 233 odebug << "load downimage" << oendl;
233 m_skin.buttonDownImage(); 234 m_skin.buttonDownImage();
234 m_currentState = LoadButtonMasks; 235 m_currentState = LoadButtonMasks;
235 m_currentButton = 0; 236 m_currentButton = 0;
236 break; 237 break;
237 case LoadButtonMasks: 238 case LoadButtonMasks:
238 odebug << "load button masks " << m_currentButton << "" << oendl; 239 odebug << "load button masks " << m_currentButton << "" << oendl;
239 m_skin.buttonMaskImage( m_info.buttonInfo[ m_currentButton ].fileName ); 240 m_skin.buttonMaskImage( m_info.buttonInfo[ m_currentButton ].fileName );
240 241
241 m_currentButton++; 242 m_currentButton++;
@@ -244,7 +245,7 @@ SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadS
244 245
245 break; 246 break;
246 case LoadButtonMask: 247 case LoadButtonMask:
247 odebug << "load whole mask" << oendl; 248 odebug << "load whole mask" << oendl;
248 m_skin.buttonMask( m_info.buttonInfo, m_info.buttonCount ); 249 m_skin.buttonMask( m_info.buttonInfo, m_info.buttonCount );
249 return LoadingCompleted; 250 return LoadingCompleted;
250 } 251 }
@@ -259,7 +260,7 @@ SkinLoader::SkinLoader()
259 260
260SkinLoader::~SkinLoader() 261SkinLoader::~SkinLoader()
261{ 262{
262 odebug << "SkinLoader::~SkinLoader()" << oendl; 263 Global::statusMessage( tr( "Loading of Skin finished" ) );
263 killTimers(); 264 killTimers();
264 delete m_currentLoader; 265 delete m_currentLoader;
265} 266}
@@ -278,7 +279,7 @@ void SkinLoader::start()
278{ 279{
279 assert( m_timerId == -1 ); 280 assert( m_timerId == -1 );
280 m_timerId = startTimer( 100 /* ms */ ); 281 m_timerId = startTimer( 100 /* ms */ );
281 odebug << "SkinLoader::start() " << pendingSkins.count() << " jobs" << oendl; 282 odebug << "SkinLoader::start() " << pendingSkins.count() << " jobs" << oendl;
282} 283}
283 284
284void SkinLoader::timerEvent( QTimerEvent *ev ) 285void SkinLoader::timerEvent( QTimerEvent *ev )
@@ -291,7 +292,7 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
291 if ( !m_currentLoader ) { 292 if ( !m_currentLoader ) {
292 293
293 if ( pendingSkins.isEmpty() ) { 294 if ( pendingSkins.isEmpty() ) {
294 odebug << "all jobs done" << oendl; 295 odebug << "all jobs done" << oendl;
295 killTimer( m_timerId ); 296 killTimer( m_timerId );
296 m_timerId = -1; 297 m_timerId = -1;
297 // ### qt3: use deleteLater(); 298 // ### qt3: use deleteLater();
@@ -303,7 +304,7 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
303 pendingSkins.remove( pendingSkins.begin() ); 304 pendingSkins.remove( pendingSkins.begin() );
304 305
305 m_currentLoader = new IncrementalLoader( nfo ); 306 m_currentLoader = new IncrementalLoader( nfo );
306 odebug << "new loader " << pendingSkins.count() << " jobs left" << oendl; 307 odebug << "new loader " << pendingSkins.count() << " jobs left" << oendl;
307 } 308 }
308 309
309 if ( m_currentLoader->loadStep() == IncrementalLoader::LoadingCompleted ) { 310 if ( m_currentLoader->loadStep() == IncrementalLoader::LoadingCompleted ) {
@@ -311,7 +312,7 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
311 m_currentLoader = 0; 312 m_currentLoader = 0;
312 } 313 }
313 314
314 odebug << "finished step" << oendl; 315 odebug << "finished step" << oendl;
315} 316}
316 317
317void SkinLoader::deleteMe() 318void SkinLoader::deleteMe()