--- a/browserui/browser/BrowserAppInc/BrowserAppUi.h Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/BrowserAppInc/BrowserAppUi.h Tue May 25 12:45:31 2010 +0300
@@ -797,11 +797,12 @@
* @param none
*/
void StartFetchHomePageL();
-
+ TUid FindAppIdL(TUid aMessageUid);
#ifdef BRDO_OCC_ENABLED_FF
//For Call back for reconnectivity
static TInt RetryConnectivity(TAny* aCBrowserAppUi);
TInt RetryInternetConnection();
+ void CheckOccConnectionStage();
#endif
#ifdef BRDO_IAD_UPDATE_ENABLED_FF
@@ -1085,7 +1086,8 @@
CIAUpdateParameters* iParameters;
RFs iFs;
#endif
-
+ TBool iCalledFromExternApp;
+ TInt iWindowIdFromFromExternApp;
protected:
CBrowserCommsModel* iCommsModel;
--- a/browserui/browser/BrowserAppInc/BrowserGotoPane.h Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/BrowserAppInc/BrowserGotoPane.h Tue May 25 12:45:31 2010 +0300
@@ -362,6 +362,8 @@
* @return editor control of goto pane
*/
CEikEdwin* Editor() const;
+
+ void ResetPrevText();
public: // observer support
--- a/browserui/browser/BrowserAppInc/BrowserPreferences.h Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/BrowserAppInc/BrowserPreferences.h Tue May 25 12:45:31 2010 +0300
@@ -989,7 +989,7 @@
* By default constructor is private.
*/
void ConstructL( TBrowserOverriddenSettings* aSettings );
-
+ TInt GetSearchFeatureStatusL( TUint32 aKey, RApaLsSession& aLs );
private:
MApiProvider& iApiProvider; // enables access to CBrowserAppUi
--- a/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp Tue May 25 12:45:31 2010 +0300
@@ -138,6 +138,9 @@
const TInt64 KMaxTimeToPostponeUpdate = 604800000000;
#endif
+//Following array stores Uids for external applications.
+//This can be appended. This is used in HandleMessageL to enable Single Window browsing.
+static TInt mArrayOfExternalAppUid[] = { 0x2001f3a9, 0x200159D0};
// ================= MEMBER FUNCTIONS =======================
// -----------------------------------------------------------------------------
@@ -158,7 +161,8 @@
iUserExit( EFalse ),
iPgNotFound( EFalse ),
iOverriddenLaunchContextId( EBrowserContextIdNormal ),
-iBrowserAlreadyRunning (EFalse)
+iBrowserAlreadyRunning (EFalse),
+iCalledFromExternApp( EFalse )
{
iViewToBeActivatedIfNeeded.iUid = 0;
iViewToReturnOnClose.iUid = 0;
@@ -211,6 +215,14 @@
}
delete iWindowManager;
LOG_WRITE( " iWindowManager deleted" );
+
+#ifdef BRDO_OCC_ENABLED_FF
+ if(iRetryConnectivity)
+ iRetryConnectivity->Cancel();
+
+ delete iRetryConnectivity;
+ iRetryConnectivity = NULL;
+#endif
// Delete the inetconman after deleting window manager
CInternetConnectionManager* inetconman = (CInternetConnectionManager*)iConnection;
@@ -1686,7 +1698,23 @@
TRAP_IGNORE( iFeedsClientUtilities->DisconnectManualUpdateConnectionL() );
#endif
}
- Exit();
+ if (SpecialLoadObserver().IsConnectionStarted()) // If Connection request is in processing calling CAknAppUI::Exit() causes crash (JSAA-84RG9R)
+ {
+ //ensure that the params are saved in BrCtl
+ if ( iWindowManager )
+ {
+ BROWSER_LOG( ( _L( " iWindowManager->SetUserExit( iUserExit )" ) ) );
+ iWindowManager->SetUserExit( iUserExit );
+ }
+ delete iWindowManager;
+ BROWSER_LOG( ( _L( " User::Exit(KErrNone)" ) ) );
+ User::Exit(KErrNone);
+ }
+ else
+ {
+ // normal exit
+ Exit();
+ }
}
}
@@ -1792,6 +1820,7 @@
//
CBrowserPopupEngine& CBrowserAppUi::PopupEngine() const
{
+ LOG_ENTERFN("CBrowserAppUi::PopupEngine");
if(!iPopupEngine)
{
if ( Preferences().UiLocalFeatureSupported( KBrowserMultipleWindows ) )
@@ -2363,7 +2392,20 @@
// there is already a window, so create a new one
CBrowserWindow *win = NULL;
if(WindowMgr().CurrentWindow())
- win = WindowMgr().CreateWindowL( (WindowMgr().CurrentWindow()->WindowId()) ? WindowMgr().CurrentWindow()->WindowId() : 0, &KNullDesC );
+ {
+ if(iCalledFromExternApp)
+ {
+ //We will be using same/already opened window if call is from external
+ //application. So no new windows will be opened.
+ win = WindowMgr().CurrentWindow();
+ iWindowIdFromFromExternApp = win->WindowId();
+ }
+ if(!win)
+ {
+ //If not called from external app, then create window.
+ win = WindowMgr().CreateWindowL( (WindowMgr().CurrentWindow()->WindowId()) ? WindowMgr().CurrentWindow()->WindowId() : 0, &KNullDesC );
+ }
+ }
else
win = WindowMgr().CreateWindowL( 0, &KNullDesC );
if (win != NULL)
@@ -2692,6 +2734,42 @@
return err;
}
+
+void CBrowserAppUi::CheckOccConnectionStage()
+ {
+ LOG_ENTERFN("CBrowserAppUi::CheckOccConnectionStage");
+
+ //Disconnect first
+ BROWSER_LOG( ( _L( "CBrowserAppUi::CheckOccConnectionStage Disconnecting..." ) ) );
+ iConnection->Disconnect();
+
+ TNifProgressBuf buf = iConnStageNotifier->GetProgressBuffer();
+ if( buf().iError == KErrDisconnected )
+ {
+ BROWSER_LOG( ( _L("CBrowserAppUi::CheckOccConnectionStage This is OCC roaming error : %d"), buf().iError ) );
+ BROWSER_LOG( ( _L( "CBrowserAppUi::CheckOccConnectionStage Set retry flags " ) ) );
+ TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) );
+ SetRetryFlag(ETrue);
+ TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelQueuedTransactions + (TInt)TBrCtlDefs::ECommandIdBase ) );
+
+ if( iRetryConnectivity && iRetryConnectivity->IsActive())
+ {
+ iRetryConnectivity->Cancel();
+ }
+ iRetryConnectivity->Start(KRetryConnectivityTimeout, 0,TCallBack(RetryConnectivity,this));
+ }
+ else
+ {
+ BROWSER_LOG( ( _L("CBrowserAppUi::CheckOccConnectionStage This is NOT OCC roaming error : %d"), buf().iError ) );
+ Display().StopProgressAnimationL();
+ if ( Fetching() )
+ {
+ CancelFetch();
+ }
+ iDialogsProvider->UploadProgressNoteL(0, 0, ETrue, (MBrowserDialogsProviderObserver *)this );
+ iDialogsProvider->CancelAll();
+ }
+ }
#endif
// -----------------------------------------------------------------------------
@@ -2702,22 +2780,7 @@
{
#ifdef BRDO_OCC_ENABLED_FF
LOG_ENTERFN("CBrowserAppUi::ConnectionStageAchievedL");
- //Disconnect first
- BROWSER_LOG( ( _L( "CBrowserAppUi::ConnectionStageAchievedL Disconnecting..." ) ) );
- iConnection->Disconnect();
-
- BROWSER_LOG( ( _L( "CBrowserAppUi::ConnectionStageAchievedL Some transactions are on-going. Need to reconnect. " ) ) );
- BROWSER_LOG( ( _L( "CBrowserAppUi::ConnectionStageAchievedL Set retry flags " ) ) );
- TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) );
- SetRetryFlag(ETrue);
- TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelQueuedTransactions + (TInt)TBrCtlDefs::ECommandIdBase ) );
-
- if( iRetryConnectivity && iRetryConnectivity->IsActive())
- {
- iRetryConnectivity->Cancel();
- }
- iRetryConnectivity->Start(KRetryConnectivityTimeout, 0,TCallBack(RetryConnectivity,this));
-
+ CheckOccConnectionStage();
#else
// this function is called only when network is lost
// because we set notifier for KAgentUnconnected only
@@ -3041,6 +3104,13 @@
TUid wapUid = KUidBrowserApplication;
TApaTask task = taskList.FindApp( wapUid );
task.BringToForeground();
+ //Check for aMessageUid. If it is in array then set iCalledFromExternApp = ETrue
+ TUid aAppId;
+ TRAPD(err, aAppId = FindAppIdL(aMessageUid););
+ if(!err && (aMessageUid == aAppId))
+ {
+ iCalledFromExternApp = ETrue;
+ }
if ( aMessageParameters.Compare( KLongZeroIdString ) )
{
ParseAndProcessParametersL( aMessageParameters );
@@ -3950,7 +4020,12 @@
// so if user initiated the process, we really delete the window
forceDelete = ETrue;
}
-
+ //If this window has been created from Search app
+ if(aWindowId == iWindowIdFromFromExternApp)
+ {
+ //Make it false as window is going to close down
+ iCalledFromExternApp = EFalse;
+ }
#ifdef __RSS_FEEDS
// If we are closing a Feeds Full Story then go back to feeds
TBool feedsWindow(EFalse);
@@ -4491,6 +4566,7 @@
// ---------------------------------------------------------
TBool CBrowserAppUi::CheckUpdateFileAvailable()
{
+ LOG_ENTERFN("CBrowserAppUi::CheckUpdateFileAvailable");
TBuf<KMaxFileName> privatePath;
TBuf<KMaxFileName> updateFileName;
iFs.PrivatePath( privatePath );
@@ -4516,6 +4592,7 @@
// ---------------------------------------------------------
void CBrowserAppUi::WriteUpdateFile()
{
+ LOG_ENTERFN("CBrowserAppUi::WriteUpdateFile");
TBuf<KMaxFileName> privatePath;
TBuf<KMaxFileName> updateFileName;
iFs.PrivatePath( privatePath );
@@ -4583,4 +4660,19 @@
return dataValue;
}
#endif
+
+TUid CBrowserAppUi::FindAppIdL(TUid aMessageUid)
+{
+ TUid aRetVal = TUid::Uid(NULL);
+ TInt nElements = sizeof(mArrayOfExternalAppUid)/sizeof(TInt);
+ for(TInt nIndex = 0;nIndex < nElements; nIndex++)
+ {
+ if(aMessageUid == TUid::Uid(mArrayOfExternalAppUid[nIndex]))
+ {
+ aRetVal = TUid::Uid(mArrayOfExternalAppUid[nIndex]);
+ break;
+ }
+ }
+ return aRetVal;
+}
// End of File
--- a/browserui/browser/BrowserAppSrc/BrowserContentView.cpp Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/BrowserAppSrc/BrowserContentView.cpp Tue May 25 12:45:31 2010 +0300
@@ -628,6 +628,7 @@
case EWmlCmdFindKeywordPaneClose :
{
+ iContainer->FindKeywordPane()->ResetPrevText();
CCoeEnv::Static()->AppUi()->RemoveFromStack( iContainer->FindKeywordPane() );
// Cancel editing and sets Goto Pane text back.
iContainer->ShutDownFindKeywordEditorL();
--- a/browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp Tue May 25 12:45:31 2010 +0300
@@ -624,6 +624,7 @@
if ( iFindKeywordMode )
{
CBrowserAppUi::Static()->ActiveView()->HandleCommandL(EWmlCmdFindKeywordPaneClose);
+ ResetPrevText();
}
else
{
@@ -1378,5 +1379,9 @@
}
}
+void CBrowserGotoPane::ResetPrevText()
+ {
+ iPrevKeyword->Des().SetLength(0);
+ }
// END OF FILE
--- a/browserui/browser/BrowserAppSrc/BrowserPreferences.cpp Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/BrowserAppSrc/BrowserPreferences.cpp Tue May 25 12:45:31 2010 +0300
@@ -63,7 +63,7 @@
#include <cmdestination.h>
// CONSTANTS
-
+#define KSearchAppUid 0x2001f3a9
//Shared data values for Full Screen setting
const TInt KBrowserFullScreenSettingDataSoftkeysOff = 0; //full screen
const TInt KBrowserFullScreenSettingDataSoftkeysOn = 1; //softkeys displayed
@@ -748,8 +748,13 @@
iAllPreferences.iMaxRecentUrlsToShow = GetIntValue( KBrowserNGMaxRecentUrls );
- iAllPreferences.iSearch = GetIntValue( KBrowserSearch );
- iAllPreferences.iService = GetIntValue( KBrowserServices );
+ RApaLsSession aLs;
+ User::LeaveIfError(aLs.Connect());
+ CleanupClosePushL(aLs);
+ iAllPreferences.iSearch = GetSearchFeatureStatusL( KBrowserSearch, aLs );
+ iAllPreferences.iService = GetSearchFeatureStatusL( KBrowserServices, aLs );
+ CleanupStack::PopAndDestroy(&aLs);
+
iAllPreferences.iCursorShowMode = (TBrCtlDefs::TCursorSettings)GetIntValue( KBrowserCursorShowMode );
iAllPreferences.iEnterKeyMode = (TBrCtlDefs::TEnterKeySettings)GetIntValue( KBrowserEnterKeyMode );
}
@@ -2269,4 +2274,22 @@
ptr.Copy( aSetting->Des() );
}
+//Following function is specific for Search application.
+//It will check if search application present in device and will turn the feature ON.
+TInt CBrowserPreferences::GetSearchFeatureStatusL( TUint32 aKey, RApaLsSession& aLs)
+{
+ TInt aVal = EFalse;
+ //Search for 'Search' application. If its there then only enable feature, otherwise disable.
+ TApaAppInfo aInfo;
+ aLs.GetAppInfo(aInfo, TUid::Uid( KSearchAppUid ));
+ if(aInfo.iUid == TUid::Uid( KSearchAppUid ))
+ {
+ //Now, Turn on the Search feature.
+ aVal = ETrue;
+ }
+ //Set value to key;
+ SetIntValueL(aKey, aVal);
+ //Again Read if feature is enabled.
+ return GetIntValue(aKey);
+}
// End of File
--- a/browserui/browser/FavouritesSrc/BrowserAdaptiveListPopup.cpp Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/FavouritesSrc/BrowserAdaptiveListPopup.cpp Tue May 25 12:45:31 2010 +0300
@@ -56,7 +56,8 @@
_LIT( KProtocolIdentifier,"://" );
const TUint KSlash('/');
const TUint KPeriod('.');
-const TInt KListHeight = 45;
+const TInt KListHeight = 36;
+const TInt KLandscapeListItems = 5;
const TInt KFontHeight = 150;
static void TextPos(TPoint *aResultArray, const TAknTextLineLayout
@@ -576,8 +577,15 @@
iItemNamesToShow->AppendL( buf );
}
//set how many item will be shown
+
+#ifdef BRDO_TOUCH_ENABLED_FF
+ TInt appWidth = iEikonEnv->EikAppUi()->ApplicationRect().Width();
+ TInt appHeight = iEikonEnv->EikAppUi()->ApplicationRect().Height();
+ //For landscape mode only 5 items can be shown on the screen
+ if(appWidth > appHeight)
+ iMaxRecentUrlsToShow = KLandscapeListItems;
+#endif
TInt itemstoshow;
-
if ( k > iMaxRecentUrlsToShow)
{
itemstoshow = iMaxRecentUrlsToShow;
@@ -586,7 +594,9 @@
{
itemstoshow = k;
}
-
+ //resetting to original value
+ iMaxRecentUrlsToShow = CBrowserAppUi::Static()->ContentView()->ApiProvider().Preferences().MaxRecentUrls();
+
//set the main rect of the window
// fixing bug RFON-7E2PPV, don't use ApplicationRect()
TRect rect;
--- a/browserui/browser/FavouritesSrc/BrowserFavouritesContainer.cpp Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/FavouritesSrc/BrowserFavouritesContainer.cpp Tue May 25 12:45:31 2010 +0300
@@ -221,7 +221,6 @@
if( (aKeyEvent.iCode == EKeyDownArrow) || (aKeyEvent.iCode == EKeyUpArrow) )
{
- BROWSER_LOG( ( _L("Need to update tool bar buttons") ) );
iView->UpdateToolbarButtonsState();
}
--- a/browserui/browser/FeedsSrc/FeedsEditFeedDialog.cpp Tue May 11 16:16:13 2010 +0300
+++ b/browserui/browser/FeedsSrc/FeedsEditFeedDialog.cpp Tue May 25 12:45:31 2010 +0300
@@ -130,13 +130,13 @@
//
void CFeedsEditFeedDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
+ CAknForm::HandlePointerEventL(aPointerEvent);
if ((iSelectedDlgLine != IdOfFocusControl()) && (aPointerEvent.iType == TPointerEvent::EButton1Up))
{
LineChangedL(IdOfFocusControl());
}
else
- {
- CAknForm::HandlePointerEventL(aPointerEvent);
+ {
if ( aPointerEvent.iType == TPointerEvent::EButton1Down)
{
iPointerEvent = aPointerEvent;