# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1268649578 -7200 # Node ID 1772663c5b4ef0daaee04e22347636fc780235bc # Parent 8812206c49a00527e0c6edc69472552a30efd0e1 Revision: 201009 Kit: 201010 diff -r 8812206c49a0 -r 1772663c5b4e filemanager/App/data/FileManager.rss --- a/filemanager/App/data/FileManager.rss Fri Mar 12 15:41:37 2010 +0200 +++ b/filemanager/App/data/FileManager.rss Mon Mar 15 12:39:38 2010 +0200 @@ -281,6 +281,18 @@ }, MENU_ITEM { + command = EFileManagerMoveToFolder; + txt = qtn_options_org_move_to_folder; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = EFileManagerCopyToFolder; + txt = qtn_options_org_copy_to; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { command = EFileManagerMark; cascade = r_filemanager_mark_unmark_menu; txt = qtn_options_list; @@ -418,18 +430,6 @@ { MENU_ITEM { - command = EFileManagerMoveToFolder; - txt = qtn_options_org_move_to_folder; - flags = EEikMenuItemSpecific; - }, - MENU_ITEM - { - command = EFileManagerCopyToFolder; - txt = qtn_options_org_copy_to; - flags = EEikMenuItemSpecific; - }, - MENU_ITEM - { command = EFileManagerNewFolder; txt = qtn_options_org_new_folder; } diff -r 8812206c49a0 -r 1772663c5b4e filemanager/App/inc/CFileManagerFoldersView.h --- a/filemanager/App/inc/CFileManagerFoldersView.h Fri Mar 12 15:41:37 2010 +0200 +++ b/filemanager/App/inc/CFileManagerFoldersView.h Mon Mar 15 12:39:38 2010 +0200 @@ -176,8 +176,6 @@ // Own: For showing info popups CAknInfoPopupNoteController* iPopupController; - // Own: Indicate USB storage was removed - TBool usbWrongRemoved; }; diff -r 8812206c49a0 -r 1772663c5b4e filemanager/App/src/CFileManagerBackupView.cpp --- a/filemanager/App/src/CFileManagerBackupView.cpp Fri Mar 12 15:41:37 2010 +0200 +++ b/filemanager/App/src/CFileManagerBackupView.cpp Mon Mar 15 12:39:38 2010 +0200 @@ -244,17 +244,21 @@ StoreIndex(); CFileManagerBackupSettings& settings( iEngine.BackupSettingsL() ); TInt drive( settings.TargetDrive() ); - TInt MemoryCardDriveF( KFmgrMemoryCardDrive + 1 ); - //KFmgrMemoryCardDrive has been changed as Mass memory,MemoryCard is changed to F - - if( drive != MemoryCardDriveF && !IsDriveAvailable( drive ) ) - { - drive = MemoryCardDriveF; - settings.SetTargetDrive( drive ); - settings.SaveL(); - } - TFileManagerDriveInfo drvInfo; - iEngine.GetDriveInfoL( drive, drvInfo ); + TFileManagerDriveInfo drvInfo; + if( !IsDriveAvailable( drive ) ) + { + for( TInt i ( EDriveA ) ; i <= EDriveZ ; i++ ) + { + iEngine.GetDriveInfoL( i , drvInfo ); + if( ( IsDriveAvailable( i ) ) && ( drvInfo.iState & TFileManagerDriveInfo::EDriveEjectable ) ) + { + drive = i; + settings.SetTargetDrive( drive ); + settings.SaveL(); + break; + } + } + } RArray< CFileManagerRestoreSettings::TInfo > info; CleanupClosePushL( info ); iEngine.GetRestoreInfoArrayL( info, drive ); diff -r 8812206c49a0 -r 1772663c5b4e filemanager/App/src/CFileManagerFoldersView.cpp --- a/filemanager/App/src/CFileManagerFoldersView.cpp Fri Mar 12 15:41:37 2010 +0200 +++ b/filemanager/App/src/CFileManagerFoldersView.cpp Mon Mar 15 12:39:38 2010 +0200 @@ -18,10 +18,9 @@ // INCLUDE FILES -#include -#include -#include -#include +#include +#include +#include #include #include #include @@ -257,51 +256,27 @@ { appUi->ExitEmbeddedAppIfNeededL(); } - TInt usb_err(KErrNone); - TRAP( usb_err,RefreshDriveInfoL() ); - if (usb_err != KErrNone) - { - usbWrongRemoved = ETrue; - HBufC* error = StringLoader::LoadLC(R_QTN_SELEC_EMPTY_LIST); - - if (iContainer) - { - iContainer->ListBoxSetTextL(*error); - } - CleanupStack::PopAndDestroy(error); - } - else - { - TFileManagerDriveInfo& drvInfo( DriveInfo() ); - if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) ) - { - //User::Leave(KErrPathNotFound); - HBufC* error = StringLoader::LoadLC(R_QTN_SELEC_EMPTY_LIST); - - if (iContainer) - { - iContainer->ListBoxSetTextL(*error); - } - CleanupStack::PopAndDestroy(error); - } - else - { - usbWrongRemoved = EFalse; - TInt index( iEngine.CurrentIndex() ); - if ( index != KErrNotFound ) - { - iContainer->RefreshListL( index ); - } - else - { - iContainer->RefreshListL( iIndex ); - } - - } - } - RefreshTitleL(); - iFolderDepth = iEngine.FolderLevel(); - } + TRAP_IGNORE( RefreshDriveInfoL() ); + TFileManagerDriveInfo& drvInfo( DriveInfo() ); + if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) ) + { + User::Leave(KErrPathNotFound); + } + else + { + TInt index( iEngine.CurrentIndex() ); + if ( index != KErrNotFound ) + { + iContainer->RefreshListL( index ); + } + else + { + iContainer->RefreshListL( iIndex ); + } + RefreshTitleL(); + } + iFolderDepth = iEngine.FolderLevel(); + } } // ----------------------------------------------------------------------------- @@ -335,28 +310,13 @@ void CFileManagerFoldersView::BackstepL( TInt aBacksteps ) { - - - - if ( usbWrongRemoved ) - { - CFileManagerAppUi* appUi = static_cast (AppUi()); - usbWrongRemoved = EFalse; - iFolderDepth = 0; - iIndex = 0; - appUi->CloseFoldersViewL(); - } - else - { - if (iActiveProcess != ENoProcess) - { - return; // Ignore to avoid container mess up - } - - iPopupController->HideInfoPopupNote(); - CFileManagerAppUi* appUi = static_cast (AppUi()); - TInt level(iEngine.FolderLevel()); - + if (iActiveProcess != ENoProcess) + { + return; // Ignore to avoid container mess up + } + iPopupController->HideInfoPopupNote(); + CFileManagerAppUi* appUi = static_cast (AppUi()); + TInt level(iEngine.FolderLevel()); while ( aBacksteps > 0 ) { if ( level < iInitialFolderDepth ) @@ -373,19 +333,18 @@ appUi->ExitEmbeddedAppIfNeededL(); } - if (level < iInitialFolderDepth) - { - iFolderDepth = 0; - iIndex = 0; - appUi->CloseFoldersViewL(); - } - else - { - iEngine.SetObserver(this); - iEngine.RefreshDirectory(); - } - } - } + if (level < iInitialFolderDepth) + { + iFolderDepth = 0; + iIndex = 0; + appUi->CloseFoldersViewL(); + } + else + { + iEngine.SetObserver(this); + iEngine.RefreshDirectory(); + } + } // ------------------------------------------------------------------------------ // CFileManagerFoldersView::FolderName diff -r 8812206c49a0 -r 1772663c5b4e filemanager/App/src/CFileManagerViewBase.cpp --- a/filemanager/App/src/CFileManagerViewBase.cpp Fri Mar 12 15:41:37 2010 +0200 +++ b/filemanager/App/src/CFileManagerViewBase.cpp Mon Mar 15 12:39:38 2010 +0200 @@ -86,7 +86,7 @@ const TInt64 KMinToMicroSecMultiplier = KMSecToMicroSecMultiplier * 60; const TInt64 KHourToMicroSecMultiplier = KMinToMicroSecMultiplier * 60; const TUint KProgressBarAsyncStartDelay = 1500000; // microseconds - +const TInt KMinificationFactor = 1024; // Used to zoom processbar's proportion // ============================ LOCAL FUNCTIONS ================================ @@ -2352,7 +2352,7 @@ // Update progress indicator if ( iProgressDialog && iProgressInfo ) { - iProgressInfo->SetAndDraw( iTotalTransferredBytes/1024 ); + iProgressInfo->SetAndDraw( iTotalTransferredBytes / KMinificationFactor ); } } @@ -3187,6 +3187,29 @@ // Common remote drive filtering RemoteDriveCommonFilteringL( aMenuPane ); + if ( iContainer->ListBoxNumberOfItems() ) + { + if ( !iContainer->ListBoxSelectionIndexesCount() ) + { + TUint32 fileType( iEngine.FileTypeL( + iContainer->ListBoxCurrentItemIndex() ) ); + if ( ( fileType & KDefaultFolderMask ) == KDefaultFolderMask ) + { + aMenuPane.SetItemDimmed( EFileManagerMoveToFolder, ETrue ); + } + } + } + else + { + aMenuPane.SetItemDimmed( EFileManagerMoveToFolder, ETrue ); + aMenuPane.SetItemDimmed( EFileManagerCopyToFolder, ETrue ); + } + TInt index(iContainer->ListBoxCurrentItemIndex()); + TUint32 fileType(iEngine.FileTypeL(index)); + if (!(fileType & CFileManagerItemProperties::EFolder)) + { + aMenuPane.SetItemDimmed(EFileManagerMoveToFolder, ETrue); + } CFileManagerFeatureManager& featureManager( FeatureManager() ); #ifdef RD_MULTIPLE_DRIVE @@ -3478,23 +3501,6 @@ { // CEikListBox& listBox( iContainer->ListBox() ); - if ( iContainer->ListBoxNumberOfItems() ) - { - if ( !iContainer->ListBoxSelectionIndexesCount() ) - { - TUint32 fileType( iEngine.FileTypeL( - iContainer->ListBoxCurrentItemIndex() ) ); - if ( ( fileType & KDefaultFolderMask ) == KDefaultFolderMask ) - { - aMenuPane.SetItemDimmed( EFileManagerMoveToFolder, ETrue ); - } - } - } - else - { - aMenuPane.SetItemDimmed( EFileManagerMoveToFolder, ETrue ); - aMenuPane.SetItemDimmed( EFileManagerCopyToFolder, ETrue ); - } // Search view item dimming if( iEngine.State() == CFileManagerEngine::ESearch ) @@ -3507,13 +3513,7 @@ { // Write protected item dimming aMenuPane.SetItemDimmed( EFileManagerNewFolder, ETrue ); - } - - TInt index(iContainer->ListBoxCurrentItemIndex()); - TUint32 fileType(iEngine.FileTypeL(index)); - if (!(fileType & CFileManagerItemProperties::EFolder)) - { - aMenuPane.SetItemDimmed(EFileManagerMoveToFolder, ETrue); + } } @@ -4216,8 +4216,8 @@ iProgressInfo = iProgressDialog->GetProgressInfoL(); if ( iProgressInfo ) { - iProgressInfo->SetFinalValue( static_cast( aFinalValue/1024 ) ); - iProgressInfo->SetAndDraw( static_cast( aInitialValue/1024 ) ); + iProgressInfo->SetFinalValue( static_cast( aFinalValue / KMinificationFactor ) ); + iProgressInfo->SetAndDraw( static_cast( aInitialValue / KMinificationFactor ) ); } iProgressDialog->RunLD(); } @@ -4770,8 +4770,8 @@ if ( iProgressDialog && iProgressInfo ) { CEikProgressInfo::SInfo info( iProgressInfo->Info() ); - iProgressFinalValue = info.iFinalValue; - iProgressCurrentValue = iProgressInfo->CurrentValue(); + iProgressFinalValue = ( info.iFinalValue ) * KMinificationFactor; + iProgressCurrentValue = ( iProgressInfo->CurrentValue() ) * KMinificationFactor; if ( !iProgressCurrentValue && iTotalTransferredBytes <= iProgressFinalValue ) { iProgressCurrentValue = iTotalTransferredBytes;