phonebookui/Phonebook2/GroupExtension/src/CPguGroupNameQueryDlg.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 0 e686773b3f54
child 9 0d28c1c5b6dd
--- a/phonebookui/Phonebook2/GroupExtension/src/CPguGroupNameQueryDlg.cpp	Fri Mar 12 15:41:25 2010 +0200
+++ b/phonebookui/Phonebook2/GroupExtension/src/CPguGroupNameQueryDlg.cpp	Mon Mar 15 12:39:26 2010 +0200
@@ -167,24 +167,11 @@
 //
 void CPguGroupNameQueryDlg::UpdateGroupTitleL()
     {
-    TBool found = EFalse;
     HBufC* groupTitle;
-    for ( TInt number = 1; !found; ++number )
-        {
-        groupTitle = StringLoader::LoadLC
-            ( R_PHONEBOOK2_QTN_FLDR_DEFAULT_GROUP_NAME, number );
-
-        // Convert the digits if necessary
-        TPtr ptr = groupTitle->Des();
-        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
-
-        if ( !ContainsL( *groupTitle ) )
-            {
-            Text().Copy( *groupTitle );
-            found = ETrue;
-            }
-        CleanupStack::PopAndDestroy( groupTitle );
-        }
+    TInt newGroupNumber = iGroupsListView.ContactCountL() + 1;
+    groupTitle = StringLoader::LoadL( R_PHONEBOOK2_QTN_FLDR_DEFAULT_GROUP_NAME, newGroupNumber );
+    Text().Copy( *groupTitle );
+    delete groupTitle;
     }
 
 // --------------------------------------------------------------------------