browserui/browser/FavouritesSrc/BrowserBookmarksContainer.cpp
changeset 27 481242ead638
parent 25 92a061761a7b
child 36 c9249d037530
--- a/browserui/browser/FavouritesSrc/BrowserBookmarksContainer.cpp	Mon Jan 18 20:22:00 2010 +0200
+++ b/browserui/browser/FavouritesSrc/BrowserBookmarksContainer.cpp	Tue Feb 02 00:12:41 2010 +0200
@@ -50,6 +50,7 @@
 
 /// Tab index for Bookmarks View.
 LOCAL_D const TInt KBookmarkTabIndex = 0;
+const TInt KMaxTitleLength = 512;
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -123,7 +124,22 @@
             CleanupStack::PushL( text );
             if ( !text->Length() )
                 {
-                iSearchPane->SetTextL( *iDefaultSearchText );
+                //TODO: read possible title valu from cenrep, if not found seyt the default text
+                HBufC* searchProvider = HBufC::NewLC( KMaxTitleLength );
+                TPtr searchProviderPtr = searchProvider->Des();
+        
+                View().ApiProvider().Preferences().GetStringValueL( KBrowserSearchProviderTitle,
+                    KMaxTitleLength , searchProviderPtr);
+                if( searchProvider->Length() == 0 )
+                    {
+                    iSearchPane->SetTextL( *iDefaultSearchText );
+                    }
+                else
+                    {
+                    iSearchPane->SetTextL( searchProviderPtr );
+                    }
+                CleanupStack::PopAndDestroy(searchProvider);
+                
                 }
             CleanupStack::PopAndDestroy( text );
             }