--- a/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp Tue Aug 31 15:28:30 2010 +0300
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp Wed Sep 01 12:16:19 2010 +0100
@@ -24,6 +24,8 @@
#include "CAknFileSelectionModel.h"
#include "MAknFileSelectionObserver.h"
+#include "CAknCommonDialogsPopupList.h"
+#include "CAknCFDFileSystemEvent.h"
#include "AknCFDUtility.h"
@@ -93,6 +95,12 @@
// Destructor
CAknFileSelectionEventHandler::~CAknFileSelectionEventHandler()
{
+ if(iFSObserver)
+ {
+ iFSObserver->Cancel();
+ delete iFSObserver;
+ iFSObserver = NULL;
+ }
}
@@ -290,7 +298,7 @@
{
if( iModel->DirectoryLevel() > 0 ) // We are not in the root folder
{
- while( ETrue ) // Find until existing contents
+ while( iModel->DirectoryLevel() > 0 ) // Find until existing contents
{
entries = iModel->GotoParentFolderL();
PopIndices( aTopItemIndex, aFocusedItemIndex );
@@ -308,6 +316,10 @@
UpdateSoftkeysL( aFocusedItemIndex, aContainer );
returnType = EItemsUpdated;
}
+ else
+ {
+ returnType = ETryingToExit;
+ }
}
else // We are in the root folder
{
@@ -384,4 +396,22 @@
return returnType;
}
+void CAknFileSelectionEventHandler::StartFileSystemNotifierL(CAknCommonDialogsPopupList* aPopupList)
+ {
+ iPopupList = aPopupList;
+ TPath path;
+ iModel->GetCurrentPath(path);
+ iFSObserver = CAknCFDFileSystemEvent::NewL(iCoeEnv->FsSession(),*this,
+ ENotifyEntry,path);
+ }
+void CAknFileSelectionEventHandler::StopFileSystemNotifier()
+ {
+ iFSObserver->Cancel();
+ }
+void CAknFileSelectionEventHandler::NotifyFileSystemChangedL()
+ {
+ iModel->UpdateItemListL();
+ iPopupList->HandleFileSystemChangedL(iModel);
+ iFSObserver->Setup();
+ }
// End of File