uiservicetab/vimpstui/src/cvimpstuidoublelistboxtabviewcontrol.cpp
branchRCL_3
changeset 10 78867dafe7eb
parent 0 5e5d6b214f4f
child 14 9fdee5e1da30
equal deleted inserted replaced
4:f5911524345e 10:78867dafe7eb
   104     iListBox->CreateScrollBarFrameL(ETrue);
   104     iListBox->CreateScrollBarFrameL(ETrue);
   105     iListBox->ScrollBarFrame()->SetScrollBarVisibilityL
   105     iListBox->ScrollBarFrame()->SetScrollBarVisibilityL
   106         (CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
   106         (CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
   107 	// set marquee on
   107 	// set marquee on
   108     iListBox->ItemDrawer()->FormattedCellData()->EnableMarqueeL( ETrue );
   108     iListBox->ItemDrawer()->FormattedCellData()->EnableMarqueeL( ETrue );
   109     CVIMPSTUiDoubleListboxArray* friendsArray = CVIMPSTUiDoubleListboxArray::NewL( iArrayProcess,
   109     // If engine is uninstalled, do not construct the list view.
   110                                                           iListBox->ItemDrawer()->ColumnData(),
   110     // Display empty message
   111                                                           *iListBox ,
   111     if (iEngine.IsUnInstalled())
   112                                                           *this);
   112         {
   113     // now set the array
   113         SetListEmptyTextL( R_QTN_SERVTAB_SWUPDATE_RESTART );
   114     iListBox->Model()->SetItemTextArray(friendsArray );
   114         return;
   115     
   115         }
   116     iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
   116     else
   117     // if there is any contact other than owndata , show findpane
   117         {
   118     if( iListBox->Model()->NumberOfItems() > KMinContact) 													
   118     // Construction of the listbox view. Engine is not uninstalled.
   119         { 											 	 
   119         CVIMPSTUiDoubleListboxArray* friendsArray =
   120         // Create find-pane
   120                 CVIMPSTUiDoubleListboxArray::NewL(iArrayProcess,
   121         ActivateFindPaneL();
   121                         iListBox->ItemDrawer()->ColumnData(), *iListBox,
   122         }
   122                         *this);
   123     LoadBitmapsL();
   123         // now set the array
   124    
   124         iListBox->Model()->SetItemTextArray(friendsArray);
   125     SetCbaLockL( EFalse );
   125 
       
   126         iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
       
   127         // if there is any contact other than owndata , show findpane
       
   128         if (iListBox->Model()->NumberOfItems() > KMinContact)
       
   129             {
       
   130             // Create find-pane
       
   131             ActivateFindPaneL();
       
   132             }
       
   133         LoadBitmapsL();
       
   134         SetCbaLockL(EFalse);
       
   135         }
       
   136 
   126     }
   137     }
   127 // --------------------------------------------------------------------------
   138 // --------------------------------------------------------------------------
   128 // CVIMPSTUiDoubleListBoxTabViewControl::NewL
   139 // CVIMPSTUiDoubleListBoxTabViewControl::NewL
   129 // --------------------------------------------------------------------------
   140 // --------------------------------------------------------------------------
   130 //
   141 //
   594 // CVIMPSTUiDoubleListBoxTabViewControl::SetListEmptyTextL
   605 // CVIMPSTUiDoubleListBoxTabViewControl::SetListEmptyTextL
   595 // --------------------------------------------------------------------------
   606 // --------------------------------------------------------------------------
   596 //
   607 //
   597 void CVIMPSTUiDoubleListBoxTabViewControl::SetListEmptyTextL(TInt aResourceId)
   608 void CVIMPSTUiDoubleListBoxTabViewControl::SetListEmptyTextL(TInt aResourceId)
   598     {
   609     {
   599     HBufC* emptyText = iCoeEnv->AllocReadResourceLC(aResourceId);
   610     HBufC* msgText;
   600     iListBox->View()->SetListEmptyTextL(*emptyText);
   611     TRACE( T_LIT("CVIMPSTUiDoubleListBoxTabViewControl:SetListEmptyTextL:Start"));  
   601     CleanupStack::PopAndDestroy(emptyText);
   612     // Get Service Name from Engine , load string from resource and display.
       
   613     // This text is shown to tell the user to restart phone to get the service again.
       
   614     TPtrC serviceNamePtr(iEngine.ServiceName());
       
   615     msgText = StringLoader::LoadLC(aResourceId, serviceNamePtr, iCoeEnv);
       
   616     iListBox->View()->SetListEmptyTextL(*msgText);
       
   617     TRACE( T_LIT("Display Text %S"), msgText );
       
   618     TRACE( T_LIT("CVIMPSTUiDoubleListBoxTabViewControl:SetListEmptyTextL:End"));
       
   619     CleanupStack::PopAndDestroy(msgText);
   602     }
   620     }
   603 
   621 
   604 // ---------------------------------------------------------
   622 // ---------------------------------------------------------
   605 // CVIMPSTUiDoubleListBoxTabViewControl::LoadBitmapsL
   623 // CVIMPSTUiDoubleListBoxTabViewControl::LoadBitmapsL
   606 // Called by framework when the view size is changed
   624 // Called by framework when the view size is changed