browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp
changeset 37 481242ead638
parent 32 92a061761a7b
child 48 5c11946e75b3
--- a/browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp	Mon Jan 18 20:22:00 2010 +0200
+++ b/browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp	Tue Feb 02 00:12:41 2010 +0200
@@ -55,6 +55,7 @@
 
 #include <StringLoader.h>
 
+const TInt KMaxTitleLength = 512;
 
 // ---------------------------------------------------------------------------
 // CBrowserGotoPane::NewL
@@ -1197,7 +1198,22 @@
         // Set the default text if not active//
         if ( ! iSearchPaneActive )
             {
-            SetSearchTextL( *iDefaultSearchText );
+            HBufC* searchProvider = HBufC::NewLC( KMaxTitleLength );
+            TPtr searchProviderPtr = searchProvider->Des();
+            iContentView->ApiProvider().Preferences().GetStringValueL( KBrowserSearchProviderTitle,
+                KMaxTitleLength , searchProviderPtr);
+            if( searchProvider->Length() == 0 )
+                {
+                 SetSearchTextL( *iDefaultSearchText );
+                }
+            else
+                {
+                SetSearchTextL( *searchProvider );
+                delete iDefaultSearchText;
+                iDefaultSearchText = NULL;
+                iDefaultSearchText = searchProvider->AllocL();
+                }
+            CleanupStack::PopAndDestroy(searchProvider);
             }
         iSearchInputFrame->ActivateL();
         }
@@ -1221,7 +1237,19 @@
         // if searchpane is empty add default text
         if ( !SearchTextLength() )
             {
-            SetSearchTextL( *iDefaultSearchText );
+            HBufC* searchProvider = HBufC::NewLC( KMaxTitleLength );
+            TPtr searchProviderPtr = searchProvider->Des();
+            iContentView->ApiProvider().Preferences().GetStringValueL( KBrowserSearchProviderTitle,
+                KMaxTitleLength , searchProviderPtr);
+            if( searchProvider->Length() == 0 )
+                {
+                SetSearchTextL( *iDefaultSearchText );
+                }
+            else
+                {
+                SetSearchTextL( *searchProvider );
+                }
+            CleanupStack::PopAndDestroy(searchProvider);
             }
 
         // if gotopane is empty add default text