Revision: 201003 PDK_3.0.g
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 00:03:31 +0200
changeset 1 d1daf54a55b5
parent 0 6a9f87576119
child 5 1e73d2d04cbc
child 6 8696bb5a6e6e
child 14 1957042d8c7e
Revision: 201003 Kit: 201005
filemanager/App/src/CFileManagerMemoryStoreView.cpp
filemanager/App/src/CFileManagerViewBase.cpp
filemanager/Engine/src/CFileManagerActiveExecute.cpp
filemanager/Engine/src/CFileManagerDocHandler.cpp
filesystemuis/memstatepopup/src/MSPUtil.cpp
--- a/filemanager/App/src/CFileManagerMemoryStoreView.cpp	Mon Jan 18 20:09:41 2010 +0200
+++ b/filemanager/App/src/CFileManagerMemoryStoreView.cpp	Tue Feb 02 00:03:31 2010 +0200
@@ -209,17 +209,15 @@
     {
     HBufC* error = NULL;
     TFileManagerDriveInfo& drvInfo( DriveInfo() );
-    TInt usb_err( KErrNone );    
     if ( drvInfo.iState & (
             TFileManagerDriveInfo::EDriveRemovable |
             TFileManagerDriveInfo::EDriveRemote ) )
         {
-        TRAP( usb_err , RefreshDriveInfoL() );
+        TRAP_IGNORE( RefreshDriveInfoL() );
         }    
-	if( usb_err != KErrNone )
-		{
-		error = StringLoader::LoadLC( R_QTN_MEMC_MAINPAGE_ERROR1 );
-        }
+
+    TInt drvNum = drvInfo.iDrive;
+    iEngine.GetDriveInfoL(drvNum,drvInfo);
 
     INFO_LOG1( "CFileManagerMemoryStoreView::DriveAvailableL-drvState=%d",
         drvInfo.iState )
--- a/filemanager/App/src/CFileManagerViewBase.cpp	Mon Jan 18 20:09:41 2010 +0200
+++ b/filemanager/App/src/CFileManagerViewBase.cpp	Tue Feb 02 00:03:31 2010 +0200
@@ -3319,19 +3319,6 @@
             dimSend = ETrue;
             }
 
-        /* Codes below will cause trouble for large amount file selection
-        if ( !dimSend )
-            {
-            // Check if there are files to send
-            TInt dummy( 0 );
-            CArrayFixFlat< TInt >* files = GetSendFilesLC( dummy );
-            if ( !files->Count() )
-                {
-                dimSend = ETrue;
-                }
-            CleanupStack::PopAndDestroy( files );
-            }
-        */
 
         // Hide empty details if no item or memory specific details 
         // can be shown.
@@ -3340,12 +3327,17 @@
             {
             aMenuPane.SetItemDimmed( EFileManagerDetails, ETrue );
             }
-        if ( ( drvInfo.iState & TFileManagerDriveInfo::EDriveRemote ) &&
-             !( drvInfo.iState & TFileManagerDriveInfo::EDriveConnected ) )
-            {
-            // Handle disconnected remote drive
-            dimSend = ETrue;
-            }
+        
+        if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) || 
+        	 ( ( drvInfo.iState & TFileManagerDriveInfo::EDriveRemote ) &&
+             !( drvInfo.iState & TFileManagerDriveInfo::EDriveConnected ) ) )
+           {
+           // Handle unavailable drive OR  disconnected remote drive
+           dimSend = ETrue;
+           aMenuPane.SetItemDimmed( EFileManagerSort, ETrue );
+           aMenuPane.SetItemDimmed( EFileManagerOrganise, ETrue );
+           aMenuPane.SetItemDimmed( EFileManagerMark, ETrue );             
+           }
         }
     else if ( iContainer->ListBoxNumberOfItems() )
         {
--- a/filemanager/Engine/src/CFileManagerActiveExecute.cpp	Mon Jan 18 20:09:41 2010 +0200
+++ b/filemanager/Engine/src/CFileManagerActiveExecute.cpp	Tue Feb 02 00:03:31 2010 +0200
@@ -114,7 +114,7 @@
         iItemIterator->CurrentL( &iSrc, &iDst, iItemType );
         }
 
-    if ( iDst && iDst->Length() > KMaxFileName )
+    if ( ( iDst && iDst->Length() > KMaxFileName ) || !iDst )
         {
         error = KErrBadName;
         TRequestStatus* status = &iStatus;
--- a/filemanager/Engine/src/CFileManagerDocHandler.cpp	Mon Jan 18 20:09:41 2010 +0200
+++ b/filemanager/Engine/src/CFileManagerDocHandler.cpp	Tue Feb 02 00:03:31 2010 +0200
@@ -187,8 +187,14 @@
 void CFileManagerDocHandler::OpenShareableFileL(
         RFile64& aShareableFile, const TDesC8& aMime )
     {
+    // Check if iFileFullPath is NULL
+    if ( !iFileFullPath )
+        {
+        User::Leave( KErrNotFound );
+        }
+    
     // Check if file open is denied
-    if ( iObserver && iFileFullPath )
+    if ( iObserver )
         {
         if ( iObserver->NotifyL(
                 MFileManagerProcessObserver::ENotifyFileOpenDenied,
--- a/filesystemuis/memstatepopup/src/MSPUtil.cpp	Mon Jan 18 20:09:41 2010 +0200
+++ b/filesystemuis/memstatepopup/src/MSPUtil.cpp	Tue Feb 02 00:03:31 2010 +0200
@@ -37,7 +37,7 @@
 
 CMSPUtil::~CMSPUtil( )
 	{
-	if(!iUnitArray)
+	if( iUnitArray )
 	    {
 	    iUnitArray->Delete( 0, iUnitArray->Count( ) );
 	    }