phonebookui/Phonebook2/GroupExtension/src/CPguGroupNameQueryDlg.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 0 e686773b3f54
child 9 0d28c1c5b6dd
equal deleted inserted replaced
5:81f8547efd4f 6:e8e3147d53eb
   165 // CPguGroupNameQueryDlg::UpdateGroupTitleL
   165 // CPguGroupNameQueryDlg::UpdateGroupTitleL
   166 // --------------------------------------------------------------------------
   166 // --------------------------------------------------------------------------
   167 //
   167 //
   168 void CPguGroupNameQueryDlg::UpdateGroupTitleL()
   168 void CPguGroupNameQueryDlg::UpdateGroupTitleL()
   169     {
   169     {
   170     TBool found = EFalse;
       
   171     HBufC* groupTitle;
   170     HBufC* groupTitle;
   172     for ( TInt number = 1; !found; ++number )
   171     TInt newGroupNumber = iGroupsListView.ContactCountL() + 1;
   173         {
   172     groupTitle = StringLoader::LoadL( R_PHONEBOOK2_QTN_FLDR_DEFAULT_GROUP_NAME, newGroupNumber );
   174         groupTitle = StringLoader::LoadLC
   173     Text().Copy( *groupTitle );
   175             ( R_PHONEBOOK2_QTN_FLDR_DEFAULT_GROUP_NAME, number );
   174     delete groupTitle;
   176 
       
   177         // Convert the digits if necessary
       
   178         TPtr ptr = groupTitle->Des();
       
   179         AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
       
   180 
       
   181         if ( !ContainsL( *groupTitle ) )
       
   182             {
       
   183             Text().Copy( *groupTitle );
       
   184             found = ETrue;
       
   185             }
       
   186         CleanupStack::PopAndDestroy( groupTitle );
       
   187         }
       
   188     }
   175     }
   189 
   176 
   190 // --------------------------------------------------------------------------
   177 // --------------------------------------------------------------------------
   191 // CPguGroupNameQueryDlg::ContainsL
   178 // CPguGroupNameQueryDlg::ContainsL
   192 // Checks if the group view contains a group named similarly as the given
   179 // Checks if the group view contains a group named similarly as the given