--- a/filemanager/App/data/FileManager.rss Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/data/FileManager.rss Tue Sep 14 20:57:31 2010 +0300
@@ -163,6 +163,10 @@
MENU_TITLE
{
menu_pane = r_filemanager_memory_store_view_menu;
+ },
+ MENU_TITLE
+ {
+ menu_pane = R_AVKON_MENUPANE_MARK_MULTIPLE;
}
};
}
@@ -295,12 +299,6 @@
},
MENU_ITEM
{
- command = EFileManagerMark;
- cascade = r_filemanager_mark_unmark_menu;
- txt = qtn_options_list;
- },
- MENU_ITEM
- {
command = EFileManagerRename;
txt = qtn_fldr_rename;
flags = EEikMenuItemSpecific;
@@ -644,12 +642,6 @@
},
MENU_ITEM
{
- command = EFileManagerMark;
- cascade = r_filemanager_context_sensitive_mark_unmark_menu;
- txt = qtn_options_list;
- },
- MENU_ITEM
- {
command = EFileManagerUnlockMemoryCard;
txt = qtn_memc_options_unlock;
},
@@ -775,61 +767,6 @@
#endif // RD_FILE_MANAGER_BACKUP
-RESOURCE MENU_PANE r_filemanager_mark_unmark_menu
- {
- items =
- {
- MENU_ITEM
- {
- command = EFileManagerMarkOne;
- txt = qtn_options_list_mark_one;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EFileManagerUnmarkOne;
- txt = qtn_options_list_unmark_one;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EFileManagerMarkAll;
- txt = qtn_options_list_mark_all;
- },
- MENU_ITEM
- {
- command = EFileManagerUnmarkAll;
- txt = qtn_options_list_unmark_all;
- }
- };
- }
-RESOURCE MENU_PANE r_filemanager_context_sensitive_mark_unmark_menu
- {
- items =
- {
- MENU_ITEM
- {
- command = EFileManagerMarkOne;
- txt = qtn_options_list_mark_one;
- },
- MENU_ITEM
- {
- command = EFileManagerUnmarkOne;
- txt = qtn_options_list_unmark_one;
- },
- MENU_ITEM
- {
- command = EFileManagerMarkAll;
- txt = qtn_options_list_mark_all;
- },
- MENU_ITEM
- {
- command = EFileManagerUnmarkAll;
- txt = qtn_options_list_unmark_all;
- }
- };
- }
-
RESOURCE MEMORYSELECTIONDIALOG r_filemanager_copy_memory_selectiondialog
{
softkey_1 = text_softkey_ok;
--- a/filemanager/App/inc/CFileManagerContainerBase.h Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/inc/CFileManagerContainerBase.h Tue Sep 14 20:57:31 2010 +0300
@@ -25,6 +25,7 @@
#include <badesca.h>
#include <eiklbo.h>
#include <eikcmobs.h>
+#include <aknmarkingmodeobserver.h>
// FORWARD DECLARATIONS
@@ -39,7 +40,9 @@
public MEikListBoxObserver,
public MCoeControlObserver,
public MEikCommandObserver,
- public MListBoxSelectionObserver
+ public MListBoxSelectionObserver,
+ public MAknMarkingModeObserver
+
{
public: // destructor
/**
@@ -90,6 +93,25 @@
*/
void ProcessCommandL( TInt aCommandId );
+ public: // From MAknMarkingModeObserver
+ /**
+ * This method is called when marking mode is activated or deactivated.
+ *
+ * @since 5.2
+ * @param aActivated ETrue if marking mode is activated, EFalse
+ * if marking mode is deactivated.
+ */
+ void MarkingModeStatusChanged( TBool aActivated );
+
+ /**
+ * This method is called just before marking mode is closed. Client can
+ * either accept or decline closing.
+ *
+ * @since 5.2
+ * @return ETrue if marking mode should be closed, otherwise EFalse.
+ */
+ TBool ExitMarkingMode() const;
+
public: // New functions
/**
* Sets list empty and removes empty text until refreshed.
@@ -132,6 +154,14 @@
TBool SelectionModeEnabled() const;
/**
+ * Gets marking mode status.
+ *
+ * @since 5.2
+ * @return ETrue if marking mode is activated, otherwise EFalse.
+ */
+ TBool IsMarkingModeActivated() const;
+
+ /**
* Updates cba
*/
virtual void UpdateCba();
@@ -233,6 +263,24 @@
* @return index in listbox
*/
virtual TInt SearchFieldToListBoxIndex( TInt aIndex );
+
+ /**
+ * Sets flag to indicate marking mode could exit or not
+ *
+ * @since 5.2
+ * @param aAllowExit ETrue if allow marking mode exit, EFalse if not
+ */
+ virtual void AllowMarkingModeExit( TBool aAllowExit );
+
+ /**
+ * Turns the marking mode on / off.
+ *
+ * @since 5.2
+ * @param aEnable ETrue to turn marking mode on,
+ * EFalse to turn marking mode off.
+ */
+ virtual void SetMarkingMode( TBool aEnable );
+
protected:
/**
* Standard C++ constructor.
@@ -267,6 +315,10 @@
MDesCArray* iArray;
// Own: Stores selection mode status
TBool iSelectionModeEnabled;
+ // Own: Indicates marking mode is activated or not
+ TBool iMarkingModeActivated;
+ // Own: Indicates marking mode is allowed to exit or not
+ TBool iAllowMarkingModeExit;
};
--- a/filemanager/App/inc/CFileManagerFileListContainer.h Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/inc/CFileManagerFileListContainer.h Tue Sep 14 20:57:31 2010 +0300
@@ -58,9 +58,6 @@
*/
~CFileManagerFileListContainer();
- private: // MCoeControlObserver
- void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
-
private: // From CCoeControl
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
--- a/filemanager/App/inc/CFileManagerSettingListContainer.h Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/inc/CFileManagerSettingListContainer.h Tue Sep 14 20:57:31 2010 +0300
@@ -58,9 +58,6 @@
TKeyResponse OfferKeyEventL(
const TKeyEvent& aKeyEvent, TEventCode aType );
- void HandleControlEventL(
- CCoeControl* aControl, TCoeEvent aEventType );
-
private:
/**
* C++ default constructor.
--- a/filemanager/App/inc/CFileManagerViewBase.h Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/inc/CFileManagerViewBase.h Tue Sep 14 20:57:31 2010 +0300
@@ -276,21 +276,6 @@
void CmdDeleteL();
/**
- * Marks all markable items in list.
- */
- void CmdMarkAllL();
-
- /**
- * Unmarks all marked items in list.
- */
- void CmdUnmarkAllL();
-
- /**
- * Changes mark status of currently focused item.
- */
- void CmdToggleMarkL();
-
- /**
* Creates new folder to currently active directory.
*/
void CmdNewFolderL();
--- a/filemanager/App/inc/FileManager.hrh Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/inc/FileManager.hrh Tue Sep 14 20:57:31 2010 +0300
@@ -24,85 +24,77 @@
*
*/
enum TFileManagerViewIds
- {
- EFileManagerMainViewId = 1,
- EFileManagerMemoryStoreViewId,
- EFileManagerFoldersViewId,
- EFileManagerSearchResultsViewId,
- EFileManagerBackupViewId,
- EFileManagerRestoreViewId
- };
+ {
+ EFileManagerMainViewId = 1,
+ EFileManagerMemoryStoreViewId,
+ EFileManagerFoldersViewId,
+ EFileManagerSearchResultsViewId,
+ EFileManagerBackupViewId,
+ EFileManagerRestoreViewId
+ };
/**
* Command IDs of FileManager
*/
enum TFileManagerCommands
- {
- EFileManagerOpen = 1,
- EFileManagerSend,
- EFileManagerDelete,
- EFileManagerMoveToFolder,
- EFileManagerCopyToFolder,
- EFileManagerNewFolder,
- EFileManagerMark,
- EFileManagerRename,
- EFileManagerFindFile,
- EFileManagerReceiveViaIR,
- EFileManagerViewInfo,
- EFileManagerMemoryState,
- EFileManagerFileDetails,
- EFileManagerFolderDetails,
- // Mark / Unmark subcommands
- EFileManagerMarkOne,
- EFileManagerUnmarkOne,
- EFileManagerToggleMark,
- EFileManagerMarkAll,
- EFileManagerUnmarkAll,
- EFileManagerCheckMark,
- // Selection key
- EFileManagerSelectionKey,
- EFileManagerMoreInfoOnline,
- EFileManagerBackup,
- EFileManagerRestore,
- EFileManagerEject,
- EFileManagerDetails,
- EFileManagerMemoryCardDetails,
- EFileManagerOrganise,
- EFileManagerConnectRemoveDrive,
- EFileManagerDisconnectRemoveDrive,
- EFileManagerRefreshRemoteDrive,
- EFileManagerRemoveDrives, // Remove drives subcommands
- EFileManagerRemoveDrivesSettings,
- EFileManagerRemoveDrivesMapDrive,
- EFileManagerRemoveDrivesDelete,
- EFileManagerMemoryCard, // Memory card subcommands
- EFileManagerMemoryCardName,
- EFileManagerMemoryCardRename,
- EFileManagerMemoryCardFormat,
- EFileManagerMemoryCardPassword, // Memory card password subcommands
- EFileManagerMemoryCardPasswordSet,
- EFileManagerMemoryCardPasswordChange,
- EFileManagerMemoryCardPasswordRemove,
- EFileManagerUnlockMemoryCard,
- EFileManagerFormatMassStorage,
- EFileManagerSort,
- EFileManagerSortByName,
- EFileManagerSortByType,
- EFileManagerSortMostRecentFirst,
- EFileManagerSortLargestFirst,
- EFileManagerSortByMatch,
- EFileManagerSearchSort,
- EFileManagerMemoryStorage, // Memory storage subcommands
- EFileManagerMemoryStorageDetails,
- EFileManagerMemoryStorageName,
- EFileManagerMemoryStorageRename,
- EFileManagerMemoryStorageSetPassword,
- EFileManagerMemoryStorageChangePassword,
- EFileManagerMemoryStorageRemovePassword,
- EFileManagerMemoryStorageFormat,
- EFileManagerMemoryStorageUnlock,
- EFileManagerDeleteBackup
- };
+ {
+ EFileManagerOpen = 1,
+ EFileManagerSend,
+ EFileManagerDelete,
+ EFileManagerMoveToFolder,
+ EFileManagerCopyToFolder,
+ EFileManagerNewFolder,
+ EFileManagerRename,
+ EFileManagerFindFile,
+ EFileManagerReceiveViaIR,
+ EFileManagerViewInfo,
+ EFileManagerMemoryState,
+ EFileManagerFileDetails,
+ EFileManagerFolderDetails,
+ // Selection key
+ EFileManagerSelectionKey,
+ EFileManagerMoreInfoOnline,
+ EFileManagerBackup,
+ EFileManagerRestore,
+ EFileManagerEject,
+ EFileManagerDetails,
+ EFileManagerMemoryCardDetails,
+ EFileManagerOrganise,
+ EFileManagerConnectRemoveDrive,
+ EFileManagerDisconnectRemoveDrive,
+ EFileManagerRefreshRemoteDrive,
+ EFileManagerRemoveDrives, // Remove drives subcommands
+ EFileManagerRemoveDrivesSettings,
+ EFileManagerRemoveDrivesMapDrive,
+ EFileManagerRemoveDrivesDelete,
+ EFileManagerMemoryCard, // Memory card subcommands
+ EFileManagerMemoryCardName,
+ EFileManagerMemoryCardRename,
+ EFileManagerMemoryCardFormat,
+ EFileManagerMemoryCardPassword, // Memory card password subcommands
+ EFileManagerMemoryCardPasswordSet,
+ EFileManagerMemoryCardPasswordChange,
+ EFileManagerMemoryCardPasswordRemove,
+ EFileManagerUnlockMemoryCard,
+ EFileManagerFormatMassStorage,
+ EFileManagerSort,
+ EFileManagerSortByName,
+ EFileManagerSortByType,
+ EFileManagerSortMostRecentFirst,
+ EFileManagerSortLargestFirst,
+ EFileManagerSortByMatch,
+ EFileManagerSearchSort,
+ EFileManagerMemoryStorage, // Memory storage subcommands
+ EFileManagerMemoryStorageDetails,
+ EFileManagerMemoryStorageName,
+ EFileManagerMemoryStorageRename,
+ EFileManagerMemoryStorageSetPassword,
+ EFileManagerMemoryStorageChangePassword,
+ EFileManagerMemoryStorageRemovePassword,
+ EFileManagerMemoryStorageFormat,
+ EFileManagerMemoryStorageUnlock,
+ EFileManagerDeleteBackup
+ };
#endif // FILEMANAGER_HRH
--- a/filemanager/App/src/CFileManagerContainerBase.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerContainerBase.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -59,6 +59,8 @@
CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
iListBox->SetObserver( this );
iListBox->SetListBoxObserver( this );
+ iListBox->SetMarkingModeObserver( this );
+
SetIndex( aFocusedIndex );
iListBox->SetFocus( ETrue );
iListBox->AddSelectionObserverL( this );
@@ -358,22 +360,29 @@
//
// -----------------------------------------------------------------------------
//
-void CFileManagerContainerBase::ProcessCommandL( TInt aCommandId )
+void CFileManagerContainerBase::ProcessCommandL( TInt /* aCommandId */ )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::MarkingModeStatusChanged()
+//
+// -----------------------------------------------------------------------------
+//
+void CFileManagerContainerBase::MarkingModeStatusChanged( TBool aActivated )
{
- switch ( aCommandId )
- {
- case EAknSoftkeyShiftMSK:
- {
- static_cast< CAknAppUi* >( ControlEnv()->AppUi() )->
- ProcessCommandL( EFileManagerToggleMark );
- break;
- }
-
- default:
- {
- break;
- }
- }
+ // Set flag to indicate marking model is activated or not
+ iMarkingModeActivated = aActivated;
+ }
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::ExitMarkingMode()
+//
+// -----------------------------------------------------------------------------
+//
+TBool CFileManagerContainerBase::ExitMarkingMode() const
+ {
+ return iAllowMarkingModeExit;
}
// -----------------------------------------------------------------------------
@@ -407,6 +416,15 @@
}
// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::IsMarkingModeActivated
+//
+// -----------------------------------------------------------------------------
+//
+TBool CFileManagerContainerBase::IsMarkingModeActivated() const
+ {
+ return iMarkingModeActivated;
+ }
+// -----------------------------------------------------------------------------
// CFileManagerContainerBase::UpdateCba
//
// -----------------------------------------------------------------------------
@@ -588,4 +606,25 @@
{
return 0;
}
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::AllowMarkingModeExit
+//
+// -----------------------------------------------------------------------------
+//
+void CFileManagerContainerBase::AllowMarkingModeExit( TBool aAllowExit )
+ {
+ iAllowMarkingModeExit = aAllowExit;
+ }
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::SetMarkingMode
+//
+// -----------------------------------------------------------------------------
+//
+void CFileManagerContainerBase::SetMarkingMode( TBool aEnable )
+ {
+ iListBox->SetMarkingMode( aEnable );
+ }
+
// End of File
--- a/filemanager/App/src/CFileManagerFileListContainer.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerFileListContainer.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -218,22 +218,46 @@
}
switch( aKeyEvent.iCode )
{
- case EKeyEnter: // FALLTHROUH
- case EKeyOK:
- {
- if ( ( menuBar != NULL ) && menuBar->ItemSpecificCommandsEnabled() )
- {
- iAppUi->ProcessCommandL( EFileManagerSelectionKey );
- response = EKeyWasConsumed;
- }
- break;
- }
case EKeyDelete: // FALLTHROUGH
case EKeyBackspace:
{
- if ( ( menuBar != NULL ) && menuBar->ItemSpecificCommandsEnabled() )
+ TBool allowDelete ( ETrue );
+
+ // If there are some items marked,
+ // delete will be executed on the marked items.
+ if ( ListBoxSelectionIndexesCount() <= 0 )
+ {
+ // If no item is marked,
+ // first check whether there is any highlighted item.
+ if ( menuBar && menuBar->ItemSpecificCommandsEnabled() )
+ {
+ TInt index = SearchFieldToListIndex( ListBoxCurrentItemIndex() );
+ // Do not allow deleting folder while marking mode is activated.
+ if ( IsMarkingModeActivated() &&
+ iDocument->Engine().IsFolder( index ) )
+ {
+ allowDelete = EFalse;
+ }
+ }
+ else
+ {
+ // Do not allow deleting any item without highlight if no item is marked
+ allowDelete = EFalse;
+ }
+ }
+
+ if ( allowDelete )
{
iAppUi->ProcessCommandL( EFileManagerDelete );
+ // Marking mode is exited automatically only when command has
+ // been selected from the options menu or stylus popup menu.
+ // Therefore, deactivate marking mode manually in case exiting marking
+ // mode is required after a key event is processed.
+
+ if ( IsMarkingModeActivated() && ExitMarkingMode() )
+ {
+ SetMarkingMode( EFalse );
+ }
response = EKeyWasConsumed;
}
break;
@@ -316,20 +340,6 @@
}
}
-// -----------------------------------------------------------------------------
-// CFileManagerFileListContainer::HandleControlEventL
-// From MCoeControlObserver, called by current listbox
-// -----------------------------------------------------------------------------
-//
-void CFileManagerFileListContainer::HandleControlEventL(
- CCoeControl* /* aControl*/, TCoeEvent aEventType )
- {
- if ( aEventType == EEventStateChanged )
- {
- iAppUi->ProcessCommandL( EFileManagerCheckMark ); // Inform change
- }
- }
-
//-----------------------------------------------------------------------------
// CFileManagerFileListContainer::CItemDrawer::CItemDrawer
//-----------------------------------------------------------------------------
@@ -808,9 +818,12 @@
}
// Open search field on alpha digit
TBool isVisible( iSearchField->IsVisible() );
+ // Do not allow activate find pane while marking model is already
+ // activated
if ( !isVisible &&
aType == EEventKeyDown &&
- aKeyEvent.iScanCode )
+ aKeyEvent.iScanCode != 0 &&
+ !IsMarkingModeActivated() )
{
TChar ch( aKeyEvent.iScanCode );
if ( ch.IsAlphaDigit() )
@@ -889,4 +902,5 @@
}
return SearchFieldToListIndex( aIndex );
}
-// End of File
+
+// End of File
--- a/filemanager/App/src/CFileManagerFoldersView.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerFoldersView.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -260,7 +260,13 @@
TFileManagerDriveInfo& drvInfo( DriveInfo() );
if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) )
{
- User::Leave(KErrPathNotFound);
+ // Manually deactivate marking mode if folder path
+ // does not exist.
+ if ( iContainer->IsMarkingModeActivated() )
+ {
+ iContainer->SetMarkingMode( EFalse );
+ }
+ User::Leave( KErrPathNotFound );
}
else
{
--- a/filemanager/App/src/CFileManagerMemoryStoreView.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerMemoryStoreView.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -146,6 +146,12 @@
else
{
iIndex = 0;
+ // Manually deactivate marking mode if current drive
+ // is not available.
+ if ( iContainer->IsMarkingModeActivated() )
+ {
+ iContainer->SetMarkingMode( EFalse );
+ }
}
RefreshTitleL();
}
--- a/filemanager/App/src/CFileManagerRestoreView.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerRestoreView.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -170,7 +170,6 @@
case EAknSoftkeyMark: // FALLTHROUGH
case EAknSoftkeyUnmark: // FALLTHROUGH
case EFileManagerSelectionKey: // FALLTHROUGH
- case EFileManagerToggleMark: // FALLTHROUGH
case EFileManagerOpen:
{
CmdSelectL();
@@ -187,11 +186,6 @@
CmdCancelL();
break;
}
- case EFileManagerCheckMark:
- {
- CmdCheckMarkL();
- break;
- }
default:
{
break;
@@ -431,5 +425,5 @@
cba->MakeCommandVisible( EAknSoftkeyOk, hasSelecttionItem );
cba->DrawDeferred();
}
-
+
// End of File
--- a/filemanager/App/src/CFileManagerSettingListContainer.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerSettingListContainer.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -265,23 +265,4 @@
return response;
}
-// -----------------------------------------------------------------------------
-// CFileManagerSettingListContainer::HandleControlEventL
-//
-// -----------------------------------------------------------------------------
-//
-void CFileManagerSettingListContainer::HandleControlEventL(
- CCoeControl* aControl, TCoeEvent aEventType )
- {
- if ( iType == EListRestore &&
- aEventType == EEventStateChanged )
- {
- static_cast< CAknAppUi* >( ControlEnv()->AppUi() )->
- ProcessCommandL( EFileManagerCheckMark );
- }
-
- CFileManagerContainerBase::HandleControlEventL(
- aControl, aEventType );
- }
-
// End of File
--- a/filemanager/App/src/CFileManagerViewBase.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerViewBase.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -353,6 +353,9 @@
{
if ( !iContainer ) return;
+ // Initialization, do not allow marking mode exit as default.
+ iContainer->AllowMarkingModeExit( EFalse );
+
TBool updateCba( !iContainer->SelectionModeEnabled() );
switch( aCommand )
@@ -382,23 +385,6 @@
CmdNewFolderL();
break;
}
- case EFileManagerMarkOne: // FALLTHROUGH
- case EFileManagerUnmarkOne: // FALLTHROUGH
- case EFileManagerToggleMark:
- {
- CmdToggleMarkL();
- break;
- }
- case EFileManagerMarkAll:
- {
- CmdMarkAllL();
- break;
- }
- case EFileManagerUnmarkAll:
- {
- CmdUnmarkAllL();
- break;
- }
case EFileManagerRename:
{
CmdRenameL();
@@ -426,10 +412,6 @@
CmdReceiveViaIRL();
break;
}
- case EFileManagerCheckMark: // Suppress
- {
- break;
- }
case EAknSoftkeyContextOptions: // FALLTHROUGH
case EFileManagerSelectionKey:
{
@@ -539,8 +521,10 @@
//
void CFileManagerViewBase::SendUiQueryL()
{
- //iSendUiPopupOpened = ETrue;
-
+ // Do not allow marking mode exit during send.
+ // No need to call iContainer->AllowMarkingModeExit( EFalse ).
+ // Already done in CFileManagerViewBase::HandleCommandL().
+
CSendUi& sendUi( static_cast< CFileManagerAppUi* >( AppUi() )->SendUiL() );
CMessageData* msgData = CMessageData::NewL();
CleanupStack::PushL( msgData );
@@ -593,26 +577,10 @@
//
void CFileManagerViewBase::MarkMenuFilteringL( CEikMenuPane& aMenuPane )
{
- TInt index( iContainer->ListBoxCurrentItemIndex() );
-
- if ( iEngine.IsFolder( index ) )
- {
- aMenuPane.SetItemDimmed( EFileManagerMarkOne, ETrue );
- aMenuPane.SetItemDimmed( EFileManagerUnmarkOne, ETrue );
- }
- else
- {
- if ( iContainer->ListBoxIsItemSelected( index ) )
- {
- aMenuPane.SetItemDimmed( EFileManagerMarkOne, ETrue );
- }
- else
- {
- aMenuPane.SetItemDimmed( EFileManagerUnmarkOne, ETrue );
- }
- }
TInt files( 0 );
- if( iContainer->IsSearchFieldVisible() )
+ // Get file count in current view, first check whether there is a
+ // filter rule working.
+ if ( iContainer->IsSearchFieldVisible() )
{
files = FilesCountInSearchField();
}
@@ -621,14 +589,22 @@
files = iEngine.FilesInFolderL();
}
TInt count( iContainer->ListBoxSelectionIndexesCount() );
+ // if all the files are marked or no file eixists,
+ // dim MarkAll.
if ( count == files )
{
- aMenuPane.SetItemDimmed( EFileManagerMarkAll, ETrue );
- }
-
- if ( !count )
- {
- aMenuPane.SetItemDimmed( EFileManagerUnmarkAll, ETrue );
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeMarkAll, ETrue );
+ }
+ // if no file marked, dim UnmarkAll.
+ if ( count == 0 )
+ {
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeUnmarkAll, ETrue );
+ }
+ // Dim MarkAll and UnMarkAll if the list is empty.
+ if ( iContainer->ListBoxNumberOfItems() == 0 )
+ {
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeMarkAll, ETrue );
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeUnmarkAll, ETrue );
}
}
@@ -725,6 +701,12 @@
TRAPD( err, ret = FileManagerDlgUtils::ShowConfirmQueryWithYesNoL( *prompt ) );
DenyDirectoryRefresh( EFalse );
User::LeaveIfError( err );
+
+ // Set flag to indicate marking mode could exit or not.
+ // Do not allow Marking mode exit when leave occurs.
+ iContainer->AllowMarkingModeExit( ret );
+
+
if ( ret )
{
if( IsDriveAvailable( DriveInfo().iDrive ) )
@@ -784,6 +766,9 @@
DenyDirectoryRefresh( EFalse );
CleanupStack::PopAndDestroy( filter );
+ // Set flag to indicate marking mode could exit or not
+ iContainer->AllowMarkingModeExit( ret );
+
if ( ret && ptrFileName.Length() )
{
if ( !DriveReadOnlyMmcL( ptrFileName ) )
@@ -832,6 +817,9 @@
DenyDirectoryRefresh( EFalse );
CleanupStack::PopAndDestroy( filter );
+ // Set flag to indicate marking mode could exit or not
+ iContainer->AllowMarkingModeExit( ret );
+
if ( ret && ptrFileName.Length() )
{
if ( !DriveReadOnlyMmcL( ptrFileName ) )
@@ -901,44 +889,6 @@
}
// -----------------------------------------------------------------------------
-// CFileManagerViewBase::CmdToggleMarkL
-//
-// -----------------------------------------------------------------------------
-//
-void CFileManagerViewBase::CmdToggleMarkL()
- {
- const TInt index( iContainer->ListBoxCurrentItemIndex() );
- if ( iEngine.IsFolder( index ) )
- {
- iContainer->ListBoxDeselectItem( index );
- }
- else
- {
- iContainer->ListBoxToggleItemL( index );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CFileManagerViewBase::CmdMarkAllL
-//
-// -----------------------------------------------------------------------------
-//
-void CFileManagerViewBase::CmdMarkAllL()
- {
- iContainer->ListBoxSelectAllL();
- }
-
-// -----------------------------------------------------------------------------
-// CFileManagerViewBase::CmdUnmarkAllL
-//
-// -----------------------------------------------------------------------------
-//
-void CFileManagerViewBase::CmdUnmarkAllL()
- {
- iContainer->ListBoxClearSelection();
- }
-
-// -----------------------------------------------------------------------------
// CFileManagerViewBase::CmdRenameL
//
// -----------------------------------------------------------------------------
@@ -1184,8 +1134,8 @@
MemoryStoreMenuFilteringL( *aMenuPane );
break;
}
- case R_FILEMANAGER_MARK_UNMARK_MENU:
- case R_FILEMANAGER_CONTEXT_SENSITIVE_MARK_UNMARK_MENU:
+ // Marking mode menu
+ case R_AVKON_MENUPANE_MARK_MULTIPLE:
{
MarkMenuFilteringL( *aMenuPane );
break;
@@ -1458,7 +1408,14 @@
if ( iPeriodic && iProgressInfo && iTotalTransferredBytes )
{
- iProgressInfo->SetAndDraw( iTotalTransferredBytes );
+ if ( iActiveProcess == ECopyProcess || iActiveProcess == EMoveProcess )
+ {
+ iProgressInfo->SetAndDraw( iTotalTransferredBytes / KMinificationFactor );
+ }
+ else
+ {
+ iProgressInfo->SetAndDraw( iTotalTransferredBytes );
+ }
}
if ( IsSystemProcess( iActiveProcess ) )
{
@@ -3215,10 +3172,18 @@
// Common remote drive filtering
RemoteDriveCommonFilteringL( aMenuPane );
- if( iContainer->IsSearchFieldVisible() &&
- !FilesCountInSearchField() )
- {
- aMenuPane.SetItemDimmed( EFileManagerMark, ETrue );
+
+ // Used while checking EAknCmdMarkingModeEnter's existance
+ TInt pos ( 0 );
+ // No file exists after find pane filtering,
+ // disable enter marking mode
+ if ( iContainer->IsSearchFieldVisible() &&
+ FilesCountInSearchField() == 0 )
+ {
+ if ( aMenuPane.MenuItemExists( EAknCmdMarkingModeEnter, pos ) )
+ {
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+ }
}
if ( iContainer->ListBoxNumberOfItems() )
{
@@ -3239,7 +3204,11 @@
}
TInt index(iContainer->ListBoxCurrentItemIndex());
TUint32 fileType(iEngine.FileTypeL(index));
- if (!(fileType & CFileManagerItemProperties::EFolder))
+ // Do not dim move to folder command in option menu and stylus popup
+ // menu while marking mode is activated.
+ // At least one item is marked.
+ if ( !(fileType & CFileManagerItemProperties::EFolder )
+ && iContainer->ListBoxSelectionIndexesCount() == 0 )
{
aMenuPane.SetItemDimmed(EFileManagerMoveToFolder, ETrue);
}
@@ -3278,9 +3247,6 @@
aMenuPane.SetItemDimmed( EFileManagerRename, ETrue );
aMenuPane.SetItemDimmed( EFileManagerReceiveViaIR, ETrue );
aMenuPane.SetItemDimmed( EFileManagerOrganise, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCard, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
- //aMenuPane.SetItemDimmed( EFileManagerUnlockMemoryCard, ETrue );
aMenuPane.SetItemDimmed( EFileManagerRefreshRemoteDrive, ETrue );
#ifdef RD_MULTIPLE_DRIVE
aMenuPane.SetItemDimmed( EFileManagerFormatMassStorage, ETrue );
@@ -3299,8 +3265,6 @@
aMenuPane.SetItemDimmed( EFileManagerRename, ETrue );
aMenuPane.SetItemDimmed( EFileManagerDelete, ETrue );
aMenuPane.SetItemDimmed( EFileManagerReceiveViaIR, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCard, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
#ifdef RD_MULTIPLE_DRIVE
aMenuPane.SetItemDimmed( EFileManagerFormatMassStorage, ETrue );
#endif // RD_MULTIPLE_DRIVE
@@ -3310,8 +3274,6 @@
if ( drvInfo.iState & TFileManagerDriveInfo::EDriveMassStorage )
{
// Mass storage item dimming
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCard, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
aMenuPane.SetItemDimmed( EFileManagerUnlockMemoryCard, ETrue );
if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) )
@@ -3328,7 +3290,6 @@
( drvInfo.iState & ( TFileManagerDriveInfo::EDriveCorrupted |
TFileManagerDriveInfo::EDriveLocked ) ) )
{
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
aMenuPane.SetItemDimmed( EFileManagerDetails, ETrue );
}
if ( ( drvInfo.iState & TFileManagerDriveInfo::EDriveCorrupted ) ||
@@ -3336,13 +3297,8 @@
{
aMenuPane.SetItemDimmed( EFileManagerUnlockMemoryCard, ETrue );
}
-// if ( !( drvInfo.iState & TFileManagerDriveInfo::EDriveLockable ) )
-// {
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
-// }
if ( !featureManager.IsMmcPassWdSupported() )
{
- //aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
aMenuPane.SetItemDimmed( EFileManagerUnlockMemoryCard, ETrue );
}
#ifdef RD_MULTIPLE_DRIVE
@@ -3352,15 +3308,12 @@
else
{
// No mass storage or memory card item dimming
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCard, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
aMenuPane.SetItemDimmed( EFileManagerUnlockMemoryCard, ETrue );
#ifdef RD_MULTIPLE_DRIVE
aMenuPane.SetItemDimmed( EFileManagerFormatMassStorage, ETrue );
#endif // RD_MULTIPLE_DRIVE
}
-
-// CEikListBox& listBox = iContainer->ListBox();
+
TBool dimSend( EFalse );
if ( iContainer->ListBoxSelectionIndexesCount() )
@@ -3386,24 +3339,32 @@
}
if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) ||
- ( ( drvInfo.iState & TFileManagerDriveInfo::EDriveRemote ) &&
+ ( drvInfo.iState & TFileManagerDriveInfo::EDriveInUse ) ||
+ ( ( drvInfo.iState & TFileManagerDriveInfo::EDriveRemote ) &&
!( drvInfo.iState & TFileManagerDriveInfo::EDriveConnected ) ) )
{
- // Handle unavailable drive OR disconnected remote drive
+ // Handle unavailable drive or disconnected remote drive
dimSend = ETrue;
aMenuPane.SetItemDimmed( EFileManagerSort, ETrue );
aMenuPane.SetItemDimmed( EFileManagerOrganise, ETrue );
- aMenuPane.SetItemDimmed( EFileManagerMark, ETrue );
+ aMenuPane.SetItemDimmed( EFileManagerDelete, ETrue );
+ if ( aMenuPane.MenuItemExists( EAknCmdMarkingModeEnter, pos ) )
+ {
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+ }
}
}
else if ( iContainer->ListBoxNumberOfItems() )
{
- // Check if there is files on the list
+ // Check whether there is file on the list
TInt files( iEngine.FilesInFolderL() );
- if ( !files )
+ if ( files == 0 )
{
dimSend = ETrue;
- aMenuPane.SetItemDimmed( EFileManagerMark, ETrue );
+ if ( aMenuPane.MenuItemExists( EAknCmdMarkingModeEnter, pos ) )
+ {
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+ }
}
// There is items in list, check selection type
@@ -3443,7 +3404,10 @@
// List is empty
aMenuPane.SetItemDimmed( EFileManagerOpen, ETrue );
aMenuPane.SetItemDimmed( EFileManagerDelete, ETrue );
- aMenuPane.SetItemDimmed( EFileManagerMark, ETrue );
+ if ( aMenuPane.MenuItemExists( EAknCmdMarkingModeEnter, pos ) )
+ {
+ aMenuPane.SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+ }
aMenuPane.SetItemDimmed( EFileManagerRename, ETrue );
aMenuPane.SetItemDimmed( EFileManagerSort, ETrue );
aMenuPane.SetItemDimmed( EFileManagerSearchSort, ETrue );
@@ -3467,7 +3431,6 @@
// Handle disconnected remote drive
aMenuPane.SetItemDimmed( EFileManagerReceiveViaIR, ETrue );
aMenuPane.SetItemDimmed( EFileManagerOrganise, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerDetails, ETrue );
}
else if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) ||
( drvInfo.iState & (
@@ -3475,10 +3438,8 @@
TFileManagerDriveInfo::EDriveLocked ) ) )
{
// Handle unavailable drive
-// aMenuPane.SetItemDimmed( EFileManagerDetails, ETrue );
aMenuPane.SetItemDimmed( EFileManagerReceiveViaIR, ETrue );
aMenuPane.SetItemDimmed( EFileManagerOrganise, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
if ( drvInfo.iState & TFileManagerDriveInfo::EDriveRemovable &&
!( drvInfo.iState & TFileManagerDriveInfo::EDriveLocked ) )
@@ -3495,10 +3456,7 @@
{
aMenuPane.SetItemDimmed( EFileManagerReceiveViaIR, ETrue );
aMenuPane.SetItemDimmed( EFileManagerOrganise, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCardPassword, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerMemoryCard, ETrue );
aMenuPane.SetItemDimmed( EFileManagerUnlockMemoryCard, ETrue );
-// aMenuPane.SetItemDimmed( EFileManagerDetails, ETrue );
}
else
{
--- a/filemanager/App/src/Cfilemanagersearchresultsview.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/Cfilemanagersearchresultsview.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -90,17 +90,34 @@
// -----------------------------------------------------------------------------
//
void CFileManagerSearchResultsView::DirectoryChangedL()
- {
+ {
FUNC_LOG
RefreshTitleL();
- if ( iContainer )
+ if ( !iContainer )
{
- iContainer->RefreshListL( iIndex );
- UpdateCbaL();
+ return;
}
+ // Get current drive's drive info cache.
+ TFileManagerDriveInfo& drvInfo( DriveInfo() );
+ // Ensure drive info is updated.
+ iEngine.GetDriveInfoL( drvInfo.iDrive, drvInfo );
+ // Manually deactivate marking mode if current drive
+ // is not available.
+ if ( drvInfo.iState & TFileManagerDriveInfo::EDriveInUse ||
+ !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) )
+ {
+ if (iContainer->IsMarkingModeActivated() )
+ {
+ iContainer->SetMarkingMode( EFalse );
+ }
+ }
+
+ iContainer->RefreshListL( iIndex );
+ UpdateCbaL();
}
+
// -----------------------------------------------------------------------------
// CFileManagerSearchResultsView::Id
//
--- a/filemanager/Engine/src/CFileManagerUtils.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/Engine/src/CFileManagerUtils.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -885,58 +885,62 @@
const TInt aDrive,
const TInt aTextIdForDefaultName,
const TInt aTextIdForName ) const
- {
+ {
+ // get drive letter and drive name
TUint driveStatus( 0 );
- HBufC* ret = NULL;
CDesCArray* array = GetDriveNameArrayLC( aDrive, driveStatus );
+
+ // get the format string for drive name
+ HBufC* ret = NULL;
if ( aTextIdForName && array->MdcaCount() > 1 )
{
- ret = StringLoader::LoadL(
- aTextIdForName,
- *array );
+ // named resource is available
+ // resource needs two paraments
+ ret = StringLoader::LoadL( aTextIdForName,*array );
}
+ // default resource is available
else if ( aTextIdForDefaultName )
{
- if( driveStatus & DriveInfo::EDriveUsbMemory )
- {
- CDesCArray* usbLetterName = new ( ELeave ) CDesCArrayFlat( KDriveNameArrayLen );
- CleanupStack::PushL( usbLetterName );
-
- TPtrC16 driveletter=array->MdcaPoint( KDriveLetterIndex );
- usbLetterName->AppendL( driveletter );
- HBufC* usbDriveDefaultName = NULL;
- if(array->MdcaCount() > 1 )
- {
- TPtrC16 drivename=array->MdcaPoint( KDriveNameIndex );
- usbLetterName->AppendL( drivename );
- }
- else
- {
- usbDriveDefaultName = StringLoader::LoadLC( R_QTN_FMGR_USB_MEMORY_DEFAULT_NAME );
- TPtrC16 drivename = usbDriveDefaultName->Des();
- usbLetterName->AppendL( drivename );
- }
-
-
- ret = StringLoader::LoadL(
- aTextIdForDefaultName,*usbLetterName );
-
- CleanupStack::PopAndDestroy( usbLetterName );
- if ( usbDriveDefaultName )
- {
- CleanupStack::PopAndDestroy( usbDriveDefaultName );
- }
- }
- else
- {
- ret = StringLoader::LoadL(aTextIdForDefaultName, array->MdcaPoint(
- KDriveLetterIndex));
- }
+ // USB memory
+ if ( driveStatus & DriveInfo::EDriveUsbMemory )
+ {
+ // alloc array for usb letter name and drive name
+ CDesCArray* usbLetterAndName = new ( ELeave ) CDesCArrayFlat( KDriveNameArrayLen );
+ CleanupStack::PushL( usbLetterAndName );
+
+ // append driver letter
+ TPtrC16 driveLetter = array->MdcaPoint( KDriveLetterIndex );
+ usbLetterAndName->AppendL( driveLetter );
+
+ // USB is already named, just append it
+ if ( array->MdcaCount() > 1 )
+ {
+ TPtrC16 drivename=array->MdcaPoint( KDriveNameIndex );
+ usbLetterAndName->AppendL( drivename );
+ }
+ // USB is still not named,append default name
+ else
+ {
+ HBufC* usbDefaultName = StringLoader::LoadLC( R_QTN_FMGR_USB_MEMORY_DEFAULT_NAME );
+ usbLetterAndName->AppendL( *usbDefaultName );
+ CleanupStack::PopAndDestroy( usbDefaultName );
+ }
+ ret = StringLoader::LoadL( aTextIdForDefaultName,*usbLetterAndName );
+ // pop and destory the array for usb letter name and drive name
+ CleanupStack::PopAndDestroy( usbLetterAndName );
+ }
+ // other drives
+ else
+ {
+ ret = StringLoader::LoadL( aTextIdForDefaultName, array->MdcaPoint( KDriveLetterIndex ) );
+ }
}
+ // drive name is available
else if ( array->MdcaCount() > 1 )
{
ret = array->MdcaPoint( KDriveNameIndex ).AllocL();
}
+ // others
else
{
User::Leave( KErrNotFound );
Binary file filemanager/help/data/xhtml.zip has changed
--- a/filesystemuis/memstatepopup/src/cmemstatepopupimpl.cpp Wed Sep 01 12:31:07 2010 +0100
+++ b/filesystemuis/memstatepopup/src/cmemstatepopupimpl.cpp Tue Sep 14 20:57:31 2010 +0300
@@ -249,6 +249,7 @@
iListBox->Model( )->SetItemTextArray( iListModel );
iListBox->Model( )->SetOwnershipType( ELbmDoesNotOwnItemArray );
iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+ iListBox->ItemDrawer()->ClearFlags( CListItemDrawer::ESingleClickDisabledHighlight );
}
// ---------------------------------------------------------------------------