browserui/browser/BrowserAppSrc/BrowserAppUi.cpp
changeset 18 4530440261a8
parent 10 57d5b8e231c4
child 19 16a119033e3e
--- a/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp	Fri Jul 03 15:46:41 2009 +0100
+++ b/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp	Thu Aug 27 07:42:55 2009 +0300
@@ -355,6 +355,26 @@
         // get client rect before hiding CBAs
         TRect rect = ClientRect();
         Cba()->MakeVisible( EFalse );
+        //-------------------------------------------------------------------------
+        // Create bookmarkview
+        PERFLOG_STOPWATCH_START;
+        CBrowserBookmarksView* bookmarksView = NULL;
+        TInt folderUid = doc->GetFolderToOpen();
+        if ( IsEmbeddedModeOn() && folderUid!= KFavouritesRootUid)
+            {
+            bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore, folderUid );
+            }
+        else
+            {
+            bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore );
+            }
+        PERFLOG_STOP_WRITE("\t BMView NewL")
+
+        iBookmarksView = bookmarksView;
+
+        AddViewL( bookmarksView );  // transfer ownership to CAknViewAppUi
+        CleanupStack::Pop(); // bookmarksView
+        BROWSER_LOG( ( _L( "Bookmarksview up" ) ) );
 
         //-------------------------------------------------------------------------
         // Create ContentView
@@ -417,24 +437,6 @@
 
         //-------------------------------------------------------------------------
 
-        PERFLOG_STOPWATCH_START;
-        CBrowserBookmarksView* bookmarksView = NULL;
-        TInt folderUid = doc->GetFolderToOpen();
-        if ( IsEmbeddedModeOn() && folderUid!= KFavouritesRootUid)
-            {
-            bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore, folderUid );
-            }
-        else
-            {
-            bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore );
-            }
-        PERFLOG_STOP_WRITE("\t BMView NewL")
-
-        iBookmarksView = bookmarksView;
-
-        AddViewL( bookmarksView );  // transfer ownership to CAknViewAppUi
-        CleanupStack::Pop(); // bookmarksView
-        BROWSER_LOG( ( _L( "Bookmarksview up" ) ) );
 
         CBrowserSettingsView* settingsView = CBrowserSettingsView::NewLC( *this );
         AddViewL( settingsView );   // transfer ownership to CAknViewAppUi
@@ -446,11 +448,6 @@
         CleanupStack::Pop(); // windowSelectionView
         BROWSER_LOG( ( _L( "windowSelectionView up" ) ) );
 
-        CBrowserInitialView* initialView = CBrowserInitialView::NewLC( *this );
-        AddViewL( initialView );   // transfer ownership to CAknViewAppUi
-        CleanupStack::Pop(); // initialView
-        BROWSER_LOG( ( _L( "initialView up" ) ) );
-
         //-------------------------------------------------------------------------
 
         iIdle = CIdle::NewL( CActive::EPriorityIdle );
@@ -1118,9 +1115,14 @@
 	        }
 	    else
 	        {
-	        // LastActiveViewId() might return with 0!
-	        TRAP_IGNORE( ActivateLocalViewL( LastActiveViewId() ) );
-	        }    	
+	        TVwsViewId activeViewId;
+	        if( ( GetActiveViewId( activeViewId ) == KErrNone ) &&	        		
+	            (  LastActiveViewId()  != activeViewId.iViewUid ) )
+	             {
+	             // LastActiveViewId() might return with 0!
+	             TRAP_IGNORE( ActivateLocalViewL( LastActiveViewId() ) );
+	             }
+	        }
     	}
 	iViewToBeActivatedIfNeeded.iUid = 0;    
     CAknViewAppUi::HandleForegroundEventL( aForeground );
@@ -1139,12 +1141,6 @@
             Display().StopProgressAnimationL();
             }
         }
-    else if (ContentView()->FullScreenMode())
-	    {
-	    //Disable content view full screen mode if it goes to background
-    	ContentView()->EnableFullScreenModeL( EFalse);
-	    }
-
 
     if (iWindowManager)
         {
@@ -1634,7 +1630,7 @@
                         
             if (name && name->Length())
             	{
-            	iRecentUrlStore->SaveData(*url,*name);
+            	iRecentUrlStore->SaveDataL(*url,*name);
             	}
             else
             	{
@@ -1650,12 +1646,12 @@
                   	cnameDes.Append( cnameLeft );
                    	cnameDes.AppendFill( TChar(KDot),5 );   // '.....'
                    	cnameDes.Append( cnameRight );
-                	iRecentUrlStore->SaveData(*url,*cname);
+                	iRecentUrlStore->SaveDataL(*url,*cname);
                     CleanupStack::PopAndDestroy();//cname
                 	}
                 else
             	    {
-            	    iRecentUrlStore->SaveData(*url,*url);
+            	    iRecentUrlStore->SaveDataL(*url,*url);
             	    }
             	}
             }
@@ -1684,12 +1680,12 @@
               	cnameDes.Append( cnameLeft );
                	cnameDes.AppendFill( TChar(KDot),5 );   // '.....'
                	cnameDes.Append( cnameRight );
-            	iRecentUrlStore->SaveData(*url,*cname);
+            	iRecentUrlStore->SaveDataL(*url,*cname);
                 CleanupStack::PopAndDestroy();//cname
             	}
             else
         	    {
-        	    iRecentUrlStore->SaveData(*url,*url);
+        	    iRecentUrlStore->SaveDataL(*url,*url);
         	    }
             }
         CleanupStack().PopAndDestroy(); // url
@@ -2378,6 +2374,9 @@
 		{
                  CancelFetch();
 		}
+    //Close the uploading dialog.
+    iDialogsProvider->UploadProgressNoteL(
+	                0, 0, ETrue, (MBrowserDialogsProviderObserver *)this );
 
     // SendDisconnectEventL();
     // not needed as by that point HTTPSession was already shutdown by executing disconnect menu option