photosgallery/slideshow/view/src/shwslideshowbacklighttimer.cpp
branchRCL_3
changeset 13 71da52165949
parent 9 6b87b143d312
child 18 bcb43dc84c44
--- a/photosgallery/slideshow/view/src/shwslideshowbacklighttimer.cpp	Fri Feb 19 22:51:01 2010 +0200
+++ b/photosgallery/slideshow/view/src/shwslideshowbacklighttimer.cpp	Fri Mar 12 15:42:44 2010 +0200
@@ -83,18 +83,20 @@
 	TRACER("CShwSlideshowBackLightTimer::ConstructL");
 	GLX_LOG_ENTRY_EXIT("CShwSlideshowBackLightTimer::ConstructL");
 	
-    CRepository* repository = CRepository::NewLC( KCRUidPeripheralSettings );
+    CRepository* lightsRepo = CRepository::NewLC( KCRUidPeripheralSettings );
     // What's the timeout value (in seconds ) for the display light?
-    repository->Get( KSettingsDisplayLightsTimeout, iSettingsDelay );
+    lightsRepo->Get( KSettingsDisplayLightsTimeout, iSettingsDelay );
     GLX_LOG_INFO1("CShwSlideshowBackLightTimer, lights timeout = %d",
         iSettingsDelay );
+    CleanupStack::PopAndDestroy( lightsRepo );
     
+    CRepository* scrSaverRepo = CRepository::NewLC( KCRUidPersonalizationSettings );
     // What's the screen saver's timeout value (in seconds)?
     TInt screenSaverTimeout = 0;
-    repository->Get( KSettingsScreenSaverPeriod, screenSaverTimeout );
+    scrSaverRepo->Get( KSettingsScreenSaverPeriod, screenSaverTimeout );
     GLX_LOG_INFO1("CShwSlideshowBackLightTimer, scr saver timeout = %d",
         screenSaverTimeout );
-    CleanupStack::PopAndDestroy( repository );
+    CleanupStack::PopAndDestroy( scrSaverRepo );
     
     // Take the smaller of the two timeout values
     iSettingsDelay = Min( iSettingsDelay, screenSaverTimeout );