phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp
branchRCL_3
changeset 14 81f8547efd4f
parent 3 04ab22b956c2
child 15 e8e3147d53eb
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp	Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp	Fri Mar 12 15:41:25 2010 +0200
@@ -258,9 +258,16 @@
         tempText.Append( KColumnListSeparator );
         tempText.Append( iButtonDataArray[ aIndex ].iText );      
         tempText.Append( KColumnListSeparator );  
-        tempText.Append( textPtr );
-        tempText.Append( KColumnListSeparator ); 
-        
+        if( textPtr.Length() + tempText.Length() >=
+                KCCAppCommLauncherMaxButtonDataTextLength )
+            {
+            tempText.Append( textPtr.Left(
+               KCCAppCommLauncherMaxButtonDataTextLength - tempText.Length() - 1 ) );
+            }
+        else
+            {
+            tempText.Append( textPtr );
+            }
         // TODO: Check presence icon
         tempText.Append( KColumnListSeparator );