29 #include "vimpstui.hrh" |
29 #include "vimpstui.hrh" |
30 #include "cvimpstuitabbedview.h" |
30 #include "cvimpstuitabbedview.h" |
31 #include "mvimpstengine.h" |
31 #include "mvimpstengine.h" |
32 #include "cvimpststoragemanagerfactory.h" |
32 #include "cvimpststoragemanagerfactory.h" |
33 #include "mvimpststorageserviceview.h" |
33 #include "mvimpststorageserviceview.h" |
34 |
34 #include "vimpstdebugtrace.h" |
35 // system include |
35 // system include |
36 #include <aknenv.h> |
36 #include <aknenv.h> |
37 #include <aknlists.h> |
37 #include <aknlists.h> |
38 #include <AknIconArray.h> |
38 #include <AknIconArray.h> |
39 #include <eikclbd.h> |
39 #include <eikclbd.h> |
111 iListBox->CreateScrollBarFrameL(ETrue); |
111 iListBox->CreateScrollBarFrameL(ETrue); |
112 iListBox->ScrollBarFrame()->SetScrollBarVisibilityL |
112 iListBox->ScrollBarFrame()->SetScrollBarVisibilityL |
113 (CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); |
113 (CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); |
114 // set marquee on |
114 // set marquee on |
115 iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue ); |
115 iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue ); |
116 CVIMPSTUiSingleListboxArray* friendsArray = CVIMPSTUiSingleListboxArray::NewL( iArrayProcess, |
116 // If engine is uninstalled, do not construct the list view. |
117 iListBox->ItemDrawer()->ColumnData(), |
117 // Display empty message |
118 *iListBox ); |
118 if (iEngine.IsUnInstalled()) |
119 // now set the array |
119 { |
120 iListBox->Model()->SetItemTextArray(friendsArray ); |
120 SetListEmptyTextL( R_QTN_SERVTAB_SWUPDATE_RESTART ); |
121 |
121 return; |
122 iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray); |
122 } |
123 // if there is any contact other than owndata , show findpane |
123 else |
124 if( iListBox->Model()->NumberOfItems() > KMinContact) |
124 { |
125 { |
125 // Construction of the listbox view. Engine is not uninstalled. |
126 // Create find-pane |
126 CVIMPSTUiSingleListboxArray* friendsArray = |
127 ActivateFindPaneL(); |
127 CVIMPSTUiSingleListboxArray::NewL(iArrayProcess, |
128 } |
128 iListBox->ItemDrawer()->ColumnData(), *iListBox); |
129 LoadBitmapsL(); |
129 // now set the array |
130 |
130 iListBox->Model()->SetItemTextArray(friendsArray); |
131 SetCbaLockL( EFalse ); |
131 |
|
132 iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray); |
|
133 // if there is any contact other than owndata , show findpane |
|
134 if (iListBox->Model()->NumberOfItems() > KMinContact) |
|
135 { |
|
136 // Create find-pane |
|
137 ActivateFindPaneL(); |
|
138 } |
|
139 LoadBitmapsL(); |
|
140 SetCbaLockL(EFalse); |
|
141 } |
|
142 |
|
143 |
132 } |
144 } |
133 |
145 |
134 |
146 |
135 // -------------------------------------------------------------------------- |
147 // -------------------------------------------------------------------------- |
136 // CVIMPSTUiSingleListBoxTabViewControl::NewL |
148 // CVIMPSTUiSingleListBoxTabViewControl::NewL |
502 // CVIMPSTUiSingleListBoxTabViewControl::SetListEmptyTextL |
514 // CVIMPSTUiSingleListBoxTabViewControl::SetListEmptyTextL |
503 // -------------------------------------------------------------------------- |
515 // -------------------------------------------------------------------------- |
504 // |
516 // |
505 void CVIMPSTUiSingleListBoxTabViewControl::SetListEmptyTextL(TInt aResourceId) |
517 void CVIMPSTUiSingleListBoxTabViewControl::SetListEmptyTextL(TInt aResourceId) |
506 { |
518 { |
507 HBufC* emptyText = iCoeEnv->AllocReadResourceLC(aResourceId); |
519 HBufC* msgText; |
508 iListBox->View()->SetListEmptyTextL(*emptyText); |
520 TRACE( T_LIT("CVIMPSTUiSingleListBoxTabViewControl:SetListEmptyTextL:Start")); |
509 CleanupStack::PopAndDestroy(emptyText); |
521 // Get Service Name from Engine , load string from resource and display. |
|
522 // This text is shown to tell the user to restart phone to get the service again. |
|
523 TPtrC serviceNamePtr(iEngine.ServiceName()); |
|
524 msgText = StringLoader::LoadLC(aResourceId, serviceNamePtr, iCoeEnv); |
|
525 iListBox->View()->SetListEmptyTextL(*msgText); |
|
526 TRACE( T_LIT("Display Text %S"), msgText ); |
|
527 TRACE( T_LIT("CVIMPSTUiSingleListBoxTabViewControl:SetListEmptyTextL:End")); |
|
528 CleanupStack::PopAndDestroy(msgText); |
510 } |
529 } |
511 |
530 |
512 // --------------------------------------------------------- |
531 // --------------------------------------------------------- |
513 // CVIMPSTUiSingleListBoxTabViewControl::LoadBitmapsL |
532 // CVIMPSTUiSingleListBoxTabViewControl::LoadBitmapsL |
514 // Called by framework when the view size is changed |
533 // Called by framework when the view size is changed |