--- a/mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp Wed Sep 01 12:31:54 2010 +0100
+++ b/mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp Tue Sep 14 21:11:56 2010 +0300
@@ -271,8 +271,7 @@
iPopupChangedSmsBuffer(NULL),
iEditorFlags( EShowInfoPopups ),
iMskResId( R_UNIEDITOR_OPTIONS_CLOSE ),
- iOptimizedFlow(EFalse),
- iSingleJpegImageProcessing(EFalse)
+ iOptimizedFlow(EFalse)
{
}
@@ -479,22 +478,7 @@
{
iEditorFlags |= EEditorExiting;
- //sendui+jepg optimization changes
- if(iLaunchOperation)
- {
- // check Is iLaunchOperation still attached to
- // iSlideLoader / iHeader
- // Set the CUniEditorAppUi
- // instance to NULL, to avoid crash.
- if(iLaunchOperation->GetHeader())
- {
- iHeader = NULL;
- }
- if(iLaunchOperation->GetSlideLoader())
- {
- iSlideLoader = NULL;
- }
- }
+
if ( iView )
{
// To prevent focus changes caused by input blocker deletion & toolbar extension
@@ -699,31 +683,10 @@
//
void CUniEditorAppUi::FinalizeLaunchL()
{
- // In all normal cases other then Sendui+Jepeg
- // iOptimizedFlow will be false and flow should be
- // same as the normal launch
- if(iOptimizedFlow)
- {
- //if iOptimizedFlow is True, it means
- //sendui+Jepg and this is partial complete call
- iSingleJpegImageProcessing = ETrue;
- }
-
iFinalizeLaunchL = ETrue;
iSmilModel = &Document()->DataModel()->SmilModel();
-
- if(!iOptimizedFlow)
- {
- //detach the iHeader and iSlideLoader
- iHeader = iLaunchOperation->DetachHeader();
- iSlideLoader = iLaunchOperation->DetachSlideLoader();
- }
- else
- {
- // get reference to complete partial lauch operation
- iHeader = iLaunchOperation->GetHeader();
- iSlideLoader = iLaunchOperation->GetSlideLoader();
- }
+ iHeader = iLaunchOperation->DetachHeader();
+ iSlideLoader = iLaunchOperation->DetachSlideLoader();
SetMessageTypeLockingL();
@@ -821,41 +784,12 @@
MenuBar()->SetMenuType( CEikMenuBar::EMenuOptions );
UpdateToolbarL();
-
- // partial launch need to call execute to make
- //the editor visible
- if(iOptimizedFlow)
- {
- iView->ExecuteL( ClientRect(), focusedControlId );
- }
- else// not optmized Flow, common flow
- {
- // partial launch, dont set the flag
- iEditorFlags |= ELaunchSuccessful;
-
- // in case of sendui+jepg , again finalize launch will be called
- //after image processing, no need to call iView->ExecuteL
- // slide will be loaded already by slide loader.
- if(!iSingleJpegImageProcessing)
- {
- //normal flow
- iView->ExecuteL( ClientRect(), focusedControlId );
- }
-
- //after the lauch complete for sendui+jepg
- //rest it.
- iSingleJpegImageProcessing = EFalse;
- }
-
+
+ iEditorFlags |= ELaunchSuccessful;
+
+ iView->ExecuteL( ClientRect(), focusedControlId );
delete iScreenClearer;
iScreenClearer = NULL;
-
- // show note inserting
- if(iOptimizedFlow)
- {
- ShowWaitNoteL( R_QTN_UNI_WAIT_INSERTING );
- }
-
}
@@ -1469,6 +1403,39 @@
}
}
+// ---------------------------------------------------------
+// CUniEditorAppUi::ProcessCommandL
+// ---------------------------------------------------------
+//
+void CUniEditorAppUi::ProcessCommandL(TInt aCommand)
+ {
+ switch(aCommand)
+ {
+ case EAknCmdExit:
+ {
+ /*
+ Exit command is handle handled here since handling the same in HandleCommandL is too late for
+ themes effect to shown when application is exiting while progress note is shown.
+ BeginFullScreen is called after ProcessCommandL and before HandleCommandL, progress note is
+ shown in ProcessCommandL ie before BeginFullScreen is made.
+ */
+
+ //Only after processing the command, option menu is removed
+ //ProcessCommandL is called with some false command id which is unique and not used in any other place
+ const TInt KRandomCommand(8975462);
+ CAknAppUi::ProcessCommandL( KRandomCommand );
+ RemoveWaitNote();
+ ExitAndSaveL();
+ break;
+ }
+ default:
+ break;
+ }
+
+ CAknAppUi::ProcessCommandL( aCommand );
+
+ }
+
// ---------------------------------------------------------
// CUniEditorAppUi::HandleCommandL
@@ -1691,6 +1658,9 @@
}
case EEikCmdExit:
{
+ //Save message when unieditor is closed though FSW
+ //We won't get here when option->exit is selscted since while handling CAknCmdExit in overriden
+ //ProcessCommandL we call Exit()
RemoveWaitNote();
ExitAndSaveL();
break;
@@ -6512,9 +6482,8 @@
if ( iEditorFlags & EEditorExiting )
{
// Do not handle any event if we are exiting from editor.
- // rest values.
+ // rest values.
iOptimizedFlow = EFalse;
- iSingleJpegImageProcessing = EFalse;
return;
}
@@ -6528,14 +6497,18 @@
if(iLaunchOperation)
{
iOptimizedFlow = iLaunchOperation->IsOptimizedFlagSet();
- }
- }
- // sendui+jepg-> this required after image processing
- if(!iOptimizedFlow)
- {
- DeactivateInputBlocker();
- iEditorFlags &= ~EMsgEditInProgress;
- }
+ if(iOptimizedFlow )
+ {
+ TRAP_IGNORE(ShowWaitNoteL( R_QTN_UNI_WAIT_INSERTING ));
+ iOptimizedFlow = EFalse;
+ return;
+ }
+ }
+ }
+
+ DeactivateInputBlocker();
+ iEditorFlags &= ~EMsgEditInProgress;
+
if ( aEvent == EUniEditorOperationCancel &&
aOperation != EUniEditorOperationSend )
{
@@ -6554,15 +6527,6 @@
TRAPD( error, DoEditorOperationEventL( aOperation, aEvent ) );
if ( error != KErrNone )
{
- // error handling
- if(iOptimizedFlow)
- {
- DeactivateInputBlocker();
- iEditorFlags &= ~EMsgEditInProgress;
- }
- iOptimizedFlow = EFalse;
- iSingleJpegImageProcessing = EFalse;
-
// Handle operation handling error.
if ( error == KLeaveExit )
{
@@ -6579,10 +6543,6 @@
}
}
}
- //sendui+jepg-> after first call to finallizelauch,rest
- // it, so that next call will cover the code finallizelaunch
- //as happened for other launch cases.
- iOptimizedFlow = EFalse;
}
// ---------------------------------------------------------
@@ -6735,19 +6695,11 @@
//
void CUniEditorAppUi::DoLaunchCompleteL()
{
- //sendui+jepg -> this required after image processing
- if(!iOptimizedFlow)
- {
- // Does no harm to call this even if no wait note is set.
- RemoveWaitNote();
- }
-
+ // Does no harm to call this even if no wait note is set.
+ RemoveWaitNote();
+
TBool shutDown( EFalse );
- // sendui+jepg-> this required after image processing
- if(!iOptimizedFlow)
- {
- ShowLaunchNotesL( shutDown );
- }
+ ShowLaunchNotesL( shutDown );
if ( shutDown )
{