messagingappbase/mce/src/MceMainViewListView.cpp
branchRCL_3
changeset 22 52d61119153d
parent 17 caea42e26caa
child 28 fbb813aef148
--- a/messagingappbase/mce/src/MceMainViewListView.cpp	Wed Mar 31 21:25:02 2010 +0300
+++ b/messagingappbase/mce/src/MceMainViewListView.cpp	Wed Apr 14 15:53:21 2010 +0300
@@ -51,7 +51,8 @@
 #include <MNcnInternalNotification.h>
 #include <NcnNotificationDefs.h>
 #include "MceListItem.h"
-
+#include "MceIds.hrh"
+#include "MceIds.h"
 #include <ImumInternalApi.h>
 #include <ImumInHealthServices.h>
 #include <muiumsvuiserviceutilitiesinternal.h>
@@ -331,8 +332,13 @@
         iMsgListContainer->ListItems()->SetListItemArrayObserver( this );
         ResetBitmapsL();
         iMsgListContainer->SetMskL();
+        TInt defaultview = KMceConversationview;
+        defaultview =    GetMceDefaultViewL();
+        if(defaultview != KErrNotFound)
+            {
+            iMsgListContainer->ListItems()->SetDefaultViewSettings(defaultview);
+            }
         }
-
     if ( !iDrawListbox )
         {
         return;
@@ -492,14 +498,14 @@
         case EAknCmdHideInBackground:
             break;
         case EMceDefaultConversationsView:
-            if ( SetMceDefaultViewL(EMceConversationview) )
+            if ( SetMceDefaultViewL(KMceConversationview) )
                 {
                 ShowConfirmationNoteL(R_DEFAULTVIEW_CONVERSATION_SELECTED);  
                 }
              break;
              
         case EMceDefaultInboxView:     
-            if ( SetMceDefaultViewL(EMceInboxview) )
+            if ( SetMceDefaultViewL(KMceInboxView) )
                 {
                 ShowConfirmationNoteL(R_DEFAULTVIEW_INBOX_SELECTED);
                 }
@@ -797,12 +803,12 @@
        {
        TInt defaultview = KErrGeneral;
        defaultview = GetMceDefaultViewL();
-       if(defaultview == EMceInboxview )
+       if(defaultview == KMceInboxView )
            {
            aMenuPane->SetItemButtonState( EMceDefaultInboxView,
                     EEikMenuItemSymbolOn );
            }
-       if(defaultview == EMceConversationview )
+       else if(defaultview == KMceConversationview )
            {
            aMenuPane->SetItemButtonState( EMceDefaultConversationsView,
                     EEikMenuItemSymbolOn );
@@ -1163,6 +1169,11 @@
        CleanupStack::PushL( repository );
        repository->Set(KMuiuMceDefaultView,aVal);
        CleanupStack::PopAndDestroy( repository );
+      if(iMsgListContainer)
+          {
+          iMsgListContainer->ListItems()->SetDefaultViewSettings(aVal);
+          iMsgListContainer->ListBox()->DrawDeferred();  
+          }
        return ETrue;
        }
     else