browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp
changeset 26 cb62a4f66ebe
parent 25 0ed94ceaa377
child 35 1f3c3f2f5b0a
equal deleted inserted replaced
25:0ed94ceaa377 26:cb62a4f66ebe
    17 
    17 
    18 
    18 
    19 // INCLUDE Files
    19 // INCLUDE Files
    20 
    20 
    21 // User includes
    21 // User includes
    22 #include "browserdialogsprovider.h"	// Class header
    22 #include <browserdialogsprovider.h>	// Class header
    23 #include "BrowserDialogsProvider.hrh"
    23 #include "BrowserDialogsProvider.hrh"
    24 #include "BrowserAuthenticationDialog.h"
    24 #include "BrowserAuthenticationDialog.h"
    25 #include "BrowserDialogsProviderConstants.h"
    25 #include "BrowserDialogsProviderConstants.h"
    26 #include "browserdialogsproviderobserver.h" //obs
    26 #include <browserdialogsproviderobserver.h> //obs
    27 
    27 
    28 // Browser as a Plugin - own classes
    28 // Browser as a Plugin - own classes
    29 #include "BrowserViewImagesPopup.h"		// For DialogDisplayPageImagesL
    29 #include "BrowserViewImagesPopup.h"		// For DialogDisplayPageImagesL
    30 #include "BrowserScriptPromptDialog.h"	// For DialogPromptLC
    30 #include "BrowserScriptPromptDialog.h"	// For DialogPromptLC
    31 #include "BrowserSelectElementDlg.h"	// For DialogFileSelectLC
    31 #include "BrowserSelectElementDlg.h"	// For DialogFileSelectLC
   436 EXPORT_C TBool CBrowserDialogsProvider::DialogSelectOptionL(
   436 EXPORT_C TBool CBrowserDialogsProvider::DialogSelectOptionL(
   437 								const TDesC& aTitle, 
   437 								const TDesC& aTitle, 
   438 								TBrCtlSelectOptionType aBrCtlSelectOptionType,
   438 								TBrCtlSelectOptionType aBrCtlSelectOptionType,
   439 								CArrayFix<TBrCtlSelectOptionData>& aOptions )
   439 								CArrayFix<TBrCtlSelectOptionData>& aOptions )
   440 	{
   440 	{
   441     CBrowserSelectElementDlg* dlg = CBrowserSelectElementDlg::NewL(	aTitle, 
   441      iSelectDlg = CBrowserSelectElementDlg::NewL(	aTitle, 
   442 												aBrCtlSelectOptionType, 
   442 												aBrCtlSelectOptionType, 
   443 												aOptions );
   443 												aOptions );
   444 
   444 
   445 	
   445 
   446     iDialogs.Append( dlg );     // Store a pointer to the dialog for CancelAll()
   446 
   447 
   447 	TInt result = iSelectDlg->ExecuteLD();
   448 	TInt result = dlg->ExecuteLD();
   448 
   449 
   449 
   450     RemoveDialogFromArray();
   450     iSelectDlg = 0;
   451     
       
   452     if ( iObserver )
   451     if ( iObserver )
   453         {
   452         {
   454         iObserver->ReportDialogEventL( 
   453         iObserver->ReportDialogEventL( 
   455     	                        MBrowserDialogsProviderObserver::ESelectOption,
   454     	                        MBrowserDialogsProviderObserver::ESelectOption,
   456     	                        ( TInt ) result );    
   455     	                        ( TInt ) result );    
   979 //  CBrowserDialogsProvider::CancelAll()
   978 //  CBrowserDialogsProvider::CancelAll()
   980 //
   979 //
   981 //-----------------------------------------------------------------------------
   980 //-----------------------------------------------------------------------------
   982 //
   981 //
   983 EXPORT_C void CBrowserDialogsProvider::CancelAll()
   982 EXPORT_C void CBrowserDialogsProvider::CancelAll()
   984 	{
   983     {
       
   984 	 if(iSelectDlg  )
       
   985         iSelectDlg->CancelPopup();
       
   986 		
       
   987     iDialogs.Close();
   985     // Empty the array
   988     // Empty the array
   986     iDialogs.ResetAndDestroy();
   989     iDialogs.ResetAndDestroy();
   987 	}
   990 	}
   988 
   991 
   989 //-----------------------------------------------------------------------------
   992 //-----------------------------------------------------------------------------