messagingappbase/mce/src/mceui.cpp
branchRCL_3
changeset 9 1d7827e39b52
parent 5 4697dfb2d7ad
child 12 caea42e26caa
--- a/messagingappbase/mce/src/mceui.cpp	Tue Feb 02 00:08:43 2010 +0200
+++ b/messagingappbase/mce/src/mceui.cpp	Fri Feb 19 22:47:38 2010 +0200
@@ -470,7 +470,8 @@
         }
     iMsgDeletedStatus = EFalse;
     iServerStarted = EFalse ;
-		
+    iEmailNotifHandler = NULL;
+#ifndef __WINSCW__ 
     // Handling of NCN reset
     TRAPD( err, iEmailNotifHandler = CMceEmailNotifHandler::NewL() );
     MCELOGGER_WRITE_FORMAT("ConstructL iEmailNotifHandler err %d", err);
@@ -478,7 +479,7 @@
         {
         iEmailNotifHandler = NULL;
         }
-
+#endif
     ZoomLevelChangedL( ReadZoomLevelL() );
 
     iEmailApi = CreateEmailApiL( iSession );
@@ -4892,8 +4893,8 @@
     CMsvEntrySelection* sel = iMceListView->ListContainer()
         ->CurrentItemSelectionL();
     CleanupStack::PushL( sel );
-
-    if (  sel->Count() <= 0 )
+    TInt selCount = sel->Count();
+    if ( selCount <= 0 )
         {
         CleanupStack::PopAndDestroy( 2 ); // singleOpWatcher, sel
         return;
@@ -4922,6 +4923,10 @@
     type, *iSession, op->RequestStatus(), sel );
 
     op->SetOperationL( subOp ); // this takes ownership immediately, so no cleanupstack needed.
+    if ( selCount ==  1 )
+        {
+        op->MakeProgressVisibleL(EFalse);
+        }
     op->SetProgressDecoder( *subOp );
     CleanupStack::Pop( op );
 
@@ -5504,14 +5509,17 @@
             
             if ( iMceMainView->ListContainer() ) // Cannot set roaming if ListContainer is empty
                 {
-                // Set roaming status
-                iMceMainView->ListContainer()->ListItems()->SetRoaming(
-                    event->RegistrationStatus() == ENetworkRegistrationRoaming );
+                CMceMainViewListItemArray* array = iMceMainView->ListContainer()->ListItems();
+                if ( array && (array->Count() > 0) ) // List item array should not be empty
+                    {
+                    // Set roaming status
+                    array->SetRoaming( event->RegistrationStatus() == ENetworkRegistrationRoaming );
                     
-                if ( MceViewActive( EMceMainViewActive ) )
-                    {
-                    //update icon only if main view is open
-                    iMceMainView->ListContainer()->DrawDeferred();
+                    if ( MceViewActive( EMceMainViewActive ) )
+                        {
+                        //update icon only if main view is open
+                        iMceMainView->ListContainer()->DrawDeferred();
+                        }
                     }
                 }
             }