browserui/browser/BrowserAppSrc/BrowserContentView.cpp
branchRCL_3
changeset 50 c9249d037530
parent 46 5dedbccec665
child 55 08ffbd51e3fd
equal deleted inserted replaced
48:5c11946e75b3 50:c9249d037530
   159     {
   159     {
   160     delete iBrowserContentViewToolbar;
   160     delete iBrowserContentViewToolbar;
   161     delete iNaviDecorator;
   161     delete iNaviDecorator;
   162     delete iBookmarksModel;
   162     delete iBookmarksModel;
   163     delete iContainer;
   163     delete iContainer;
   164     delete iEnteredURL;
       
   165     delete iEnteredKeyword;
   164     delete iEnteredKeyword;
   166     delete iTextZoomLevelArray;
   165     delete iTextZoomLevelArray;
   167     delete iFontSizeArray;
   166     delete iFontSizeArray;
   168     delete iZoomModeTimer;
   167     delete iZoomModeTimer;
   169     iNaviPane = NULL;
   168     iNaviPane = NULL;
   195     iContainer->SetRect( aRect );
   194     iContainer->SetRect( aRect );
   196     iContainer->GotoPane()->SetGPObserver(this);
   195     iContainer->GotoPane()->SetGPObserver(this);
   197     iContainer->FindKeywordPane()->SetGPObserver(this);
   196     iContainer->FindKeywordPane()->SetGPObserver(this);
   198     iEnteredKeyword = NULL;
   197     iEnteredKeyword = NULL;
   199 
   198 
   200     iEnteredURL = NULL;
       
   201     // get the StatusPane pointer
   199     // get the StatusPane pointer
   202     if ( !iNaviPane )
   200     if ( !iNaviPane )
   203         {
   201         {
   204         CEikStatusPane *sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane();
   202         CEikStatusPane *sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane();
   205         // Fetch pointer to the default navi pane control
   203         // Fetch pointer to the default navi pane control
  1681 //
  1679 //
  1682 void CBrowserContentView::GotoUrlInGotoPaneL()
  1680 void CBrowserContentView::GotoUrlInGotoPaneL()
  1683     {
  1681     {
  1684     if ( iContainer->GotoPane() )
  1682     if ( iContainer->GotoPane() )
  1685         {
  1683         {
  1686         delete iEnteredURL;
  1684         HBufC* url  = iContainer->GotoPane()->GetTextL(); // the url
  1687         iEnteredURL = NULL;
  1685         if( url )
  1688         iEnteredURL = iContainer->GotoPane()->GetTextL(); // the url
       
  1689         if( iEnteredURL )
       
  1690             {
  1686             {
  1691             iContainer->ShutDownGotoURLEditorL();
  1687             iContainer->ShutDownGotoURLEditorL();
  1692 
  1688 
  1693             TFavouritesWapAp accessPoint;
  1689             TFavouritesWapAp accessPoint;
  1694             // if current ap exists then use it. other ways use default ap.
  1690             // if current ap exists then use it. other ways use default ap.
  1704                 ApiProvider().Preferences().DefaultAccessPoint() );
  1700                 ApiProvider().Preferences().DefaultAccessPoint() );
  1705                 }
  1701                 }
  1706             UpdateCbaL();
  1702             UpdateCbaL();
  1707             UpdateFullScreenL();
  1703             UpdateFullScreenL();
  1708 
  1704 
  1709             ApiProvider().FetchL(   iEnteredURL->Des(),
  1705             ApiProvider().FetchL(   url->Des(),
  1710                                     KNullDesC,
  1706                                     KNullDesC,
  1711                                     KNullDesC,
  1707                                     KNullDesC,
  1712                                     accessPoint,
  1708                                     accessPoint,
  1713                                     CBrowserLoadObserver::ELoadUrlTypeOther );
  1709                                     CBrowserLoadObserver::ELoadUrlTypeOther );
  1714 
  1710 
  1760         }
  1756         }
  1761 
  1757 
  1762     CCoeEnv::Static()->AppUi()->RemoveFromStack( iContainer->GotoPane() );
  1758     CCoeEnv::Static()->AppUi()->RemoveFromStack( iContainer->GotoPane() );
  1763     CCoeEnv::Static()->AppUi()->AddToStackL( iContainer->GotoPane(), ECoeStackPriorityMenu );
  1759     CCoeEnv::Static()->AppUi()->AddToStackL( iContainer->GotoPane(), ECoeStackPriorityMenu );
  1764     iContainer->GotoPane()->MakeVisible( ETrue );
  1760     iContainer->GotoPane()->MakeVisible( ETrue );
  1765     if ( iEnteredURL && iEnteredURL->Length() )
  1761     HBufC* url = ApiProvider().BrCtlInterface().PageInfoLC(
       
  1762             TBrCtlDefs::EPageInfoUrl );
       
  1763     if ( url && url->Length() )
  1766        {
  1764        {
  1767             iContainer->GotoPane()->SetTextL(*iEnteredURL);
  1765             iContainer->GotoPane()->SetTextL(*url);
  1768             iContainer->GotoPane()->SelectAllL();
  1766             iContainer->GotoPane()->SelectAllL();
       
  1767             CleanupStack::PopAndDestroy(); // url
  1769        }
  1768        }
  1770     else
  1769     else
  1771         {
  1770         {
  1772             // nor iEnteredURL; use default name.
  1771             // nor url; use default name.
  1773             // set "http://www." per Browser UI spec
  1772             // set "http://www." per Browser UI spec
  1774             iContainer->GotoPane()->SetTextL(KWWWString  );
  1773             iContainer->GotoPane()->SetTextL(KWWWString  );
  1775         }
  1774         }
  1776     iContainer->GotoPane()->SetFocus( ETrue );
  1775     iContainer->GotoPane()->SetFocus( ETrue );
  1777     UpdateCbaL();
  1776     UpdateCbaL();