phonebookui/Phonebook2/ServerApplication/src/CPbk2ItemFetcher.cpp
branchRCL_3
changeset 57 2666d9724c76
parent 26 0d28c1c5b6dd
child 58 d4f567ce2e7c
--- a/phonebookui/Phonebook2/ServerApplication/src/CPbk2ItemFetcher.cpp	Mon Jun 21 15:24:27 2010 +0300
+++ b/phonebookui/Phonebook2/ServerApplication/src/CPbk2ItemFetcher.cpp	Thu Jul 15 18:22:55 2010 +0300
@@ -74,6 +74,23 @@
     titlePaneOperator.SetTitlePaneL( titlePaneText ); // takes ownership
     }
 
+
+/**
+ * Change the StatusPane layout to use the mentioned StatusPane ID.
+ *
+ * @param aStatusPaneId     StatusPane ID
+ */
+void SetStatusPaneL( TInt aStatusPaneId )
+    {
+    CEikStatusPane* statusPane =
+            CEikonEnv::Static()->AppUiFactory()->StatusPane();
+    
+    if ( statusPane && 0 != aStatusPaneId )
+        {
+        statusPane->SwitchLayoutL( aStatusPaneId );        
+        }                    
+    }
+
 struct TMap
     {
     TAiwCommAddressSelectType aiwType;
@@ -205,7 +222,8 @@
         ( MPbk2UiServiceObserver& aObserver,
           TPbk2FetchType aFetchType ) :
             iObserver( aObserver ),
-            iFetchType( aFetchType )
+            iFetchType( aFetchType ),
+            iStatusPaneId( 0 )
     {
     PBK2_DEBUG_PRINT( PBK2_DEBUG_STRING
         ("CPbk2ItemFetcher::CPbk2ItemFetcher()") );
@@ -263,6 +281,8 @@
 
     // Set title pane
     SetTitlePaneL( dataRetriever, flags, aMessage );
+    
+    iStatusPaneId = dataRetriever.GetStatusPaneIdL( aMessage );
 
     iPreselectedContacts = dataRetriever.GetPreselectedContactLinksL
         ( aMessage, appUi.ApplicationServices().ContactManager() );
@@ -675,6 +695,9 @@
     delete iCommAddressSelectPhase;
     iCommAddressSelectPhase = NULL;
     
+    //Restore the appropriate StatusPane
+    SetStatusPaneL( iStatusPaneId );
+    
     if ( iCommAddressSelectType != VPbkFieldTypeSelectorFactory::EEmptySelector )
         {
         iCommAddressSelectPhase = CPbk2CommAddressSelectPhase::NewL