src/screensaverctrlplugin.cpp
branchRCL_3
changeset 31 8f536f98e1f8
parent 29 65be1d84df1f
equal deleted inserted replaced
29:65be1d84df1f 31:8f536f98e1f8
    61 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
    62 //
    62 //
    63 void CScreensaverCtrlPlugin::StartTimer()
    63 void CScreensaverCtrlPlugin::StartTimer()
    64     {
    64     {
    65     // Notify plugin that screensaver is starting
    65     // Notify plugin that screensaver is starting
       
    66     Model().SharedDataInterface()->SetSSForcedLightsOn( ESSForceLightsOn );
       
    67     
    66     SendPluginEvent( EScreensaverEventStarting );
    68     SendPluginEvent( EScreensaverEventStarting );
    67     
    69     
    68     
    70     
    69     StartPluginRefreshTimer();
    71     StartPluginRefreshTimer();
    70 
    72 
   280 void CScreensaverCtrlPlugin::ExitPartialMode()
   282 void CScreensaverCtrlPlugin::ExitPartialMode()
   281     {
   283     {
   282     SCRLOGGER_WRITE("Host: ExitPartialMode()");
   284     SCRLOGGER_WRITE("Host: ExitPartialMode()");
   283 
   285 
   284     LcdPartialMode()->Exit();
   286     LcdPartialMode()->Exit();
   285     Model().SharedDataInterface()->SetSSForcedLightsOn( ESSForceLightsOn );
       
   286     // Make sure the partial area is empty
   287     // Make sure the partial area is empty
   287     // Make this less idiotic
   288     // Make this less idiotic
   288     TRect psRect( 0, 0, 0, 0);
   289     TRect psRect( 0, 0, 0, 0);
   289     SetPowerSaveDisplayActiveArea( psRect );
   290     SetPowerSaveDisplayActiveArea( psRect );
   290     }
   291     }
   586     TRAP( err, err = iPlugin->InitializeL( this ) );
   587     TRAP( err, err = iPlugin->InitializeL( this ) );
   587     
   588     
   588     if( err != KErrNone )
   589     if( err != KErrNone )
   589         {
   590         {
   590         // Loaded OK, but failed to initialize - cannot use plugin
   591         // Loaded OK, but failed to initialize - cannot use plugin
   591         TBool changed = Model().SharedDataInterface()->GetDisplayObjChanged();
       
   592         if( !changed )
       
   593             {
       
   594             //Just activate the screensaver revert to defaultsaver
       
   595             RevertToDefaultSaver();
       
   596             }
       
   597         Model().SharedDataInterface()->SetDisplayObjChanged( EFalse );
       
   598         delete iPlugin;
   592         delete iPlugin;
   599         iPlugin = NULL;
   593         iPlugin = NULL;
   600         }
   594         }
   601     
   595     
   602     }
   596     }