commonuis/CommonUi/src/DocDefaultHandler.cpp
changeset 22 75713bee6484
parent 14 3320e4e6e8bb
child 54 4e76f14a5917
equal deleted inserted replaced
21:558113899881 22:75713bee6484
    33 #include "DocResourceFile.h"        // CDocResourceFile
    33 #include "DocResourceFile.h"        // CDocResourceFile
    34 
    34 
    35 #include <AiwGenericParam.h>        // Generic parameters
    35 #include <AiwGenericParam.h>        // Generic parameters
    36 
    36 
    37 #ifdef RD_MULTIPLE_DRIVE
    37 #ifdef RD_MULTIPLE_DRIVE
    38 #include <CAknMemorySelectionDialogMultiDrive.h>
       
    39 #include <driveinfo.h>      //DriveInfo
    38 #include <driveinfo.h>      //DriveInfo
    40 #include <AknCommonDialogsDynMem.h>
       
    41 #include <coemain.h>
    39 #include <coemain.h>
    42 #else
       
    43 #include "CAknMemorySelectionDialog.h" // CAknMemorySelectionDialog
       
    44 #endif
    40 #endif
    45 
    41 
    46 #include "pathinfo.h"               // PathInfo
    42 #include "pathinfo.h"               // PathInfo
    47 #include <featmgr.h>                // FeatureManager
    43 #include <featmgr.h>                // FeatureManager
    48 
    44 
  1125                     return KErrCancel;
  1121                     return KErrCancel;
  1126                     }
  1122                     }
  1127                 }
  1123                 }
  1128             path.Copy( iRootPath );
  1124             path.Copy( iRootPath );
  1129             }
  1125             }
  1130 #ifdef RD_MULTIPLE_DRIVE 
       
  1131         else if( (!CanOnlyBeSavedToPhoneMemoryL())&&(1 < GetAvailableDrivesCountL()) )
       
  1132         	{
       
  1133         	TFileName defaultFolder;
       
  1134             CAknMemorySelectionDialogMultiDrive* dlg =NULL;
       
  1135 			// Remote drives are not shown in the list of available drives.. FIX for error ANAE-76S7KX
       
  1136 	        dlg = CAknMemorySelectionDialogMultiDrive::NewL(ECFDDialogTypeBrowse,0,EFalse, 
       
  1137 	        			AknCommonDialogsDynMem::EMemoryTypePhone | AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage | AknCommonDialogsDynMem::EMemoryTypeMMCExternal);
       
  1138 		    CleanupStack::PushL( dlg );
       
  1139 			TDriveNumber driveNumber;
       
  1140 		    TBool result(dlg->ExecuteL(driveNumber,&path,&defaultFolder));// driveNumber );
       
  1141 			CleanupStack::PopAndDestroy( dlg );
       
  1142 			if (!result)
       
  1143 				{
       
  1144 		        SetAndReturnStatus( KErrCancel );
       
  1145 		        return KErrCancel;
       
  1146 		        }
       
  1147            }
       
  1148 #else  
       
  1149         else if ( CanBeSavedToMmcL() )
       
  1150             {
       
  1151             CAknMemorySelectionDialog::TMemory mem( CAknMemorySelectionDialog::EPhoneMemory);
       
  1152             AddResourcesL();
       
  1153             TFileName defaultFolder;
       
  1154             CAknMemorySelectionDialog* memoryDialog = CAknMemorySelectionDialog::NewL(
       
  1155                                                             ECFDDialogTypeSave,
       
  1156                                                             R_DOCHANDLER_MEMORY_SELECTION_DIALOG,
       
  1157                                                             EFalse );
       
  1158             CleanupStack::PushL( memoryDialog );    
       
  1159             
       
  1160             TBool result( memoryDialog->ExecuteL( mem, &path, &defaultFolder ) );
       
  1161             if (!result)
       
  1162                 {
       
  1163                 RemoveResources();
       
  1164                 CleanupStack::PopAndDestroy();  // memoryDialog
       
  1165                 SetAndReturnStatus( KErrCancel );
       
  1166                 return KErrCancel;
       
  1167                 }
       
  1168 
       
  1169             CleanupStack::PopAndDestroy();  // memoryDialog
       
  1170 
       
  1171             RemoveResources();
       
  1172             }
       
  1173         #endif
       
  1174         else 
  1126         else 
  1175             {
  1127             {
  1176             path.Copy( PathInfo::PhoneMemoryRootPath() );
  1128             path.Copy( PathInfo::PhoneMemoryRootPath() );
  1177             }
  1129             }
  1178 
  1130