idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockcontrol.cpp
branchRCL_3
changeset 11 ff572dfe6d86
parent 0 f72a12da539e
child 23 7be2816dbabd
equal deleted inserted replaced
9:f966699dea19 11:ff572dfe6d86
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // SYSTEM INCLUDE FILES
    19 // SYSTEM INCLUDE FILES
    20 #include <e32std.h>         // for RChangeNotifier
    20 #include <e32std.h>         // for RChangeNotifier
       
    21 #include <debug.h>
    21 
    22 
    22 // USER INCLUDE FILES
    23 // USER INCLUDE FILES
    23 #include "xncontroladapter.h"
    24 #include "xncontroladapter.h"
    24 #include "xnclockadapter.h"
    25 #include "xnclockadapter.h"
    25 #include "xnclockface.h"
    26 #include "xnclockface.h"
    59             // Return value is ignored.
    60             // Return value is ignored.
    60             }
    61             }
    61 
    62 
    62         void RunL()
    63         void RunL()
    63             {
    64             {
       
    65             __PRINTS( "CXnClockChangeHandler::RunL, timer runs" );            
    64             if( iStatus.Int() & ( EChangesLocale | EChangesSystemTime ) )
    66             if( iStatus.Int() & ( EChangesLocale | EChangesSystemTime ) )
    65                 {
    67                 {
    66                 iClient.TimeOrLocaleChanged();
    68                 iClient.TimeOrLocaleChanged();
    67                 }
    69                 }
    68 
    70 
   242         {
   244         {
   243         TTime homeTime;
   245         TTime homeTime;
   244         homeTime.HomeTime();
   246         homeTime.HomeTime();
   245 
   247 
   246         TRAP_IGNORE( iFace->DrawL( *iAdapter, aGc, aRect, homeTime ) );
   248         TRAP_IGNORE( iFace->DrawL( *iAdapter, aGc, aRect, homeTime ) );
   247         
       
   248         // Ensure timer is active
       
   249         const_cast< CXnClockControl* >( this )->StartTimer();
       
   250         }
   249         }
   251     }
   250     }
   252 
   251 
   253 // -----------------------------------------------------------------------------
   252 // -----------------------------------------------------------------------------
   254 // CXnClockControl::TimerCallback
   253 // CXnClockControl::TimerCallback
   255 // (other items were commented in a header).
   254 // (other items were commented in a header).
   256 // -----------------------------------------------------------------------------
   255 // -----------------------------------------------------------------------------
   257 //
   256 //
   258 TInt CXnClockControl::TimerCallback( TAny* aThis )
   257 TInt CXnClockControl::TimerCallback( TAny* aThis )
   259     {
   258     {
       
   259     __PRINTS( "CXnClockControl::TimerCallback, timer runs" );
   260     CXnClockControl* self = static_cast< CXnClockControl* >( aThis );
   260     CXnClockControl* self = static_cast< CXnClockControl* >( aThis );
   261 
   261 
   262     // Update the clock display
   262     // Update the clock display
   263     self->UpdateDisplay();
   263     self->UpdateDisplay();
   264 
   264