browserui/browser/BrowserAppSrc/BrowserContentView.cpp
changeset 1 57d5b8e231c4
parent 0 84ad3b177aa3
child 5 e45c3f40ea5f
equal deleted inserted replaced
0:84ad3b177aa3 1:57d5b8e231c4
   303                                             (TInt)TBrCtlDefs::ECommandHistoryNavigateForward +
   303                                             (TInt)TBrCtlDefs::ECommandHistoryNavigateForward +
   304                                             (TInt)TBrCtlDefs::ECommandIdBase );
   304                                             (TInt)TBrCtlDefs::ECommandIdBase );
   305             UpdateTitleL( iApiProvider );
   305             UpdateTitleL( iApiProvider );
   306             break;
   306             break;
   307             }
   307             }
   308 
   308 		// Set search pane active and then launch editor.	
       
   309         case EIsCmdSearchWeb:
       
   310             {
       
   311             iContainer->GotoPane()->SetSearchPaneActiveL();
       
   312             LaunchGotoAddressEditorL();
       
   313             break;
       
   314             }
   309         case EWmlCmdGoToAddress:
   315         case EWmlCmdGoToAddress:
   310             {
   316 		case EWmlCmdGoToAddressAndSearch:
       
   317             {
       
   318 			iContainer->GotoPane()->SetGotoPaneActiveL();
   311             LaunchGotoAddressEditorL();
   319             LaunchGotoAddressEditorL();
   312             break;
   320             break;
   313             }
   321             }
   314 
   322 
   315         case EWmlCmdGotoPaneCancel:
   323         case EWmlCmdGotoPaneCancel:
   341         }
   349         }
   342 
   350 
   343         case EWmlCmdGotoPaneGoTo:
   351         case EWmlCmdGotoPaneGoTo:
   344             {
   352             {
   345             HBufC* input = iContainer->GotoPane()->GetTextL();
   353             HBufC* input = iContainer->GotoPane()->GetTextL();
   346             if ((input) && (input->CompareF(KWWWString)))
   354 	    CleanupStack::PushL( input );
       
   355 	    if( iContainer->GotoPane()->GotoPaneActive() )
       
   356 	        {
       
   357             if ((input) && (input->CompareF(KWWWString)) && input->Length() )
   347                 {
   358                 {
   348                 if (iPenEnabled)
   359                 if (iPenEnabled)
   349                     {
   360                     {
   350                     Toolbar()->SetDimmed(EFalse);
   361                     Toolbar()->SetDimmed(EFalse);
   351                     Toolbar()->DrawNow();
   362                     Toolbar()->DrawNow();
   361                 if ( ApiProvider().Preferences().FullScreen() == EWmlSettingsFullScreenFullScreen )
   372                 if ( ApiProvider().Preferences().FullScreen() == EWmlSettingsFullScreenFullScreen )
   362                     {
   373                     {
   363                     MakeCbaVisible( EFalse );
   374                     MakeCbaVisible( EFalse );
   364                     }
   375                     }
   365                 }
   376                 }
   366             if (iPenEnabled)
   377 	        }
       
   378 	    else 
       
   379 	        {
       
   380 	        // Search Editor was active, So launch Search application with 
       
   381 	        // search parameters and cancel editing of search and goto.
       
   382 	        if ( (input) && input->Length()  )
       
   383                {
       
   384                 if (iPenEnabled)
       
   385                   {
       
   386                   Toolbar()->SetDimmed(EFalse);
       
   387                   Toolbar()->DrawNow();
       
   388                   }
       
   389                       
       
   390                 CCoeEnv::Static()->AppUi()->RemoveFromStack( iContainer->GotoPane() );
       
   391                 if ( iContainer->GotoPane() )
       
   392                     {
       
   393                     iContainer->ShutDownGotoURLEditorL();
       
   394                     LaunchSearchApplicationL( *input );
       
   395                     }
       
   396                 UpdateCbaL();
       
   397                 UpdateFullScreenL();
       
   398                }
       
   399 	        }
       
   400 	        CleanupStack::PopAndDestroy( input );
       
   401 			if (iPenEnabled)
   367               	{
   402               	{
   368                	StartAutoFullScreenTimer();
   403                	StartAutoFullScreenTimer();
   369                 }
   404                 }
   370             break;
   405             break;
   371             }
   406             }
  1144 
  1179 
  1145     if( iContainer->GotoPane()->IsVisible() )
  1180     if( iContainer->GotoPane()->IsVisible() )
  1146         // when goto pane is up there is no focusable element or active fetching
  1181         // when goto pane is up there is no focusable element or active fetching
  1147         // process in place
  1182         // process in place
  1148         {
  1183         {
  1149         //check wheter there is an active popuplist
  1184         if( iContainer->GotoPane()->SearchPaneActive() )
  1150         if( (iContainer->GotoPane()->PopupList() != NULL) &&
  1185             {
  1151                    ( iContainer->GotoPane()->PopupList()->IsOpenDirToShow() ))
  1186             result = R_BROWSER_BOOKMARKS_CBA_SEARCH_PANE_SEARCH_CANCEL;
  1152             {
       
  1153             result = R_BROWSER_BOOKMARKS_CBA_GOTO_PANE_OPENDIR_CANCEL;
       
  1154             }
       
  1155         else if(iContainer->GotoPane()->PopupList() &&
       
  1156                 iContainer->GotoPane()->PopupList()->IsPoppedUp() &&
       
  1157                 !iPenEnabled)
       
  1158             {
       
  1159             // LSK Select is only for non-touch devices
       
  1160             result =  R_BROWSER_BOOKMARKS_CBA_GOTO_PANE_SELECT_CANCEL;
       
  1161             }
  1187             }
  1162         else
  1188         else
  1163             {
  1189             {
  1164             result =  R_BROWSER_BOOKMARKS_CBA_GOTO_PANE_GOTO_CANCEL;
  1190             //check wheter there is an active popuplist
       
  1191             if( (iContainer->GotoPane()->PopupList() != NULL) &&
       
  1192                        ( iContainer->GotoPane()->PopupList()->IsOpenDirToShow() ))
       
  1193                 {
       
  1194                 result = R_BROWSER_BOOKMARKS_CBA_GOTO_PANE_OPENDIR_CANCEL;
       
  1195                 }
       
  1196             else if(iContainer->GotoPane()->PopupList() &&
       
  1197                     iContainer->GotoPane()->PopupList()->IsPoppedUp() &&
       
  1198                     !iPenEnabled)
       
  1199                 {
       
  1200                 // LSK Select is only for non-touch devices
       
  1201                 result =  R_BROWSER_BOOKMARKS_CBA_GOTO_PANE_SELECT_CANCEL;
       
  1202                 }
       
  1203             else
       
  1204                 {
       
  1205                 result =  R_BROWSER_BOOKMARKS_CBA_GOTO_PANE_GOTO_CANCEL;
       
  1206                 }
  1165             }
  1207             }
  1166         }
  1208         }
  1167     else if ( iContainer->FindKeywordPane()->IsVisible() )
  1209     else if ( iContainer->FindKeywordPane()->IsVisible() )
  1168         {
  1210         {
  1169         result = R_BROWSER_CBA_FIND_KEYWORD_PANE_OPTION_CLOSE;
  1211         result = R_BROWSER_CBA_FIND_KEYWORD_PANE_OPTION_CLOSE;
  1331             aMenuPane->SetItemDimmed( EWmlCmdOpenFeedsFolder, ETrue );
  1373             aMenuPane->SetItemDimmed( EWmlCmdOpenFeedsFolder, ETrue );
  1332             }
  1374             }
  1333 
  1375 
  1334         // home
  1376         // home
  1335         aMenuPane->SetItemDimmed( EWmlCmdLaunchHomePage, ApiProvider().IsLaunchHomePageDimmedL() );
  1377         aMenuPane->SetItemDimmed( EWmlCmdLaunchHomePage, ApiProvider().IsLaunchHomePageDimmedL() );
       
  1378         //search 
       
  1379          if ( ! ApiProvider().Preferences().SearchFeature() )
       
  1380              {
       
  1381              aMenuPane->SetItemDimmed( EIsCmdSearchWeb, ETrue );
       
  1382              }
  1336         }
  1383         }
  1337     else if ( aResourceId == R_PAGEACTIONS_SUBMENU )
  1384     else if ( aResourceId == R_PAGEACTIONS_SUBMENU )
  1338         {
  1385         {
  1339         // bookmark
  1386         // bookmark
  1340         if ( ApiProvider().IsEmbeddedModeOn() && CBrowserAppUi::Static()->IsEmbeddedInOperatorMenu() )
  1387         if ( ApiProvider().IsEmbeddedModeOn() && CBrowserAppUi::Static()->IsEmbeddedInOperatorMenu() )