htiui/HtiAdminQt/chtiadminengine.cpp
branchRCL_3
changeset 42 d40e813b23c0
parent 18 454d022d514b
--- a/htiui/HtiAdminQt/chtiadminengine.cpp	Mon Jun 21 15:41:16 2010 +0300
+++ b/htiui/HtiAdminQt/chtiadminengine.cpp	Thu Jul 15 18:39:46 2010 +0300
@@ -121,6 +121,7 @@
     iHtiCfg = CHtiCfg::NewL();
     
     CheckStatusesL();
+    StartTimer();
     }
 
 // ---------------------------------------------------------------------------
@@ -594,15 +595,6 @@
             case EExitPending:
                 {
                 iEngineWrapper->updateStatus(HtiEngineWrapper::Running);
-		
-                // start timer to watch the status
-                if ( !iPeriodic )
-                    {
-                    iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard );
-                    iPeriodic->Start( 5 * 1000 * 1000,
-                                      5 * 1000 * 1000,
-                                      TCallBack( TimerCallBackL, this ) );
-                    }
                 }
                 break;
 
@@ -610,23 +602,17 @@
             case EExitTerminate:
                 {
                 iEngineWrapper->updateStatus(HtiEngineWrapper::Stopped);
-                KillTimer();
                 }
                 break;
 
             case EExitPanic:
                 {
                 iEngineWrapper->updateStatus(HtiEngineWrapper::Panic);
-                KillTimer();
                 }
                 break;
             };
         prs.Close();
         }
-    else
-        {
-        KillTimer();
-        }
     }
 
 // ---------------------------------------------------------------------------
@@ -647,6 +633,18 @@
     }
 
 // ---------------------------------------------------------------------------
+void CHtiAdminEngine::StartTimer()
+    {
+    // start timer to watch the status
+    if ( !iPeriodic )
+        {
+        iPeriodic = CPeriodic::NewL( CActive::EPriorityIdle );
+        iPeriodic->Start( 1 * 1000 * 1000,
+                          10 * 1000 * 1000,
+                          TCallBack( TimerCallBackL, this ) );
+        }
+    }
+// ---------------------------------------------------------------------------
 void CHtiAdminEngine::KillTimer()
     {
     if ( iPeriodic )