meetingrequest/mrgui/src/cesmrresponsedialog.cpp
branchRCL_3
changeset 12 4ce476e64c59
parent 0 8466d47a6819
child 16 b5fbb9b25d57
--- a/meetingrequest/mrgui/src/cesmrresponsedialog.cpp	Mon Mar 15 12:39:10 2010 +0200
+++ b/meetingrequest/mrgui/src/cesmrresponsedialog.cpp	Wed Mar 31 21:08:33 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -24,31 +24,23 @@
 #include "esmrinternaluid.h"
 
 #include <eikenv.h>
+#include <eikcolib.h>
 #include <eikappui.h>
 #include <avkon.hrh>
-#include <MAgnEntryUi.h>
+#include <magnentryui.h>
 #include <eikedwin.h>
 #include <esmrgui.rsg>
 #include <calentry.h>
 #include <hlplch.h>
 #include <akntoolbar.h>
-#include <aknappui.h>
-#include <aknViewAppUi.h>
-#include <aknview.h>
-#include <eikcolib.h>
-#include <akntoolbarobserver.h>
-#include <aknbutton.h>
-
-#include <featmgr.h>
-//</cmail>
 
 // <cmail> custom sw help files not avilable in Cmail
-//#include <fsmr.hlp.hrh>
+#include <csxhelp/cmail.hlp.hrh>
 // </cmail>
 
 // DEBUG
 #include "emailtrace.h"
-
+#include "FreestyleEmailUiConstants.h"
 
 // ---------------------------------------------------------------------------
 // CESMRResponseDialog::CESMRResponseDialog
@@ -67,7 +59,9 @@
 CESMRResponseDialog::~CESMRResponseDialog()
     {
     FUNC_LOG;
-    TRAP_IGNORE( RestoreMrGuiToolbarL() );
+    static_cast<CEikAppUiFactory*>( 
+    		iEikonEnv->AppUiFactory() )->CurrentFixedToolbar()->
+    		SetToolbarVisibility( iPreviousVisibility );
     // iView is deleted by framework because it uses the
     // custom control mechanism.
     }
@@ -95,13 +89,14 @@
     {
     FUNC_LOG;
     CAknDialog::ConstructL( R_RESPONSE_DIALOG_MENUBAR );
-    CEikonEnv* eikonEnv = CEikonEnv::Static();// codescanner::eikonenvstatic
-    TRect clientRect = eikonEnv->EikAppUi()->ClientRect();
+    iPreviousVisibility = static_cast<CEikAppUiFactory*>( 
+    		iEikonEnv->AppUiFactory() )->CurrentFixedToolbar()->IsShown();
+    static_cast<CEikAppUiFactory*>( 
+        	iEikonEnv->AppUiFactory() )->CurrentFixedToolbar()->SetToolbarVisibility( EFalse );
+    TRect clientRect = iEikonEnv->EikAppUi()->ClientRect();
     iView = CESMRResponseDialogView::NewL();
     iView->SetRect( clientRect );
     iView->SetSize(clientRect.Size());
-
-    MakeResponseToolbarL();
     }
 
 // ---------------------------------------------------------------------------
@@ -117,15 +112,10 @@
         {
         case EAknCmdHelp:
             {
-            // <cmail>
-            // TUid uid = { KUidCalendarApplication };
-            // </cmail>
-            CArrayFix<TCoeHelpContext>* cntx = 
+            CArrayFix<TCoeHelpContext>* cntx =
 				new (ELeave) CArrayFixFlat<TCoeHelpContext>(1);
             CleanupStack::PushL( cntx );
-            // <cmail>
-            //cntx->AppendL( TCoeHelpContext( uid, KFSCA_HLP_RESPONSE_EDITOR ) );
-            // /</cmail>
+            cntx->AppendL( TCoeHelpContext( KFSEmailUiUid, KFSCA_HLP_RESPONSE_EDITOR ) );
             CleanupStack::Pop( cntx );
             HlpLauncher::LaunchHelpApplicationL( iCoeEnv->WsSession(), cntx );
             break;
@@ -143,21 +133,7 @@
             }
         }
     }
-// ---------------------------------------------------------------------------
-// CESMRResponseDialog::DynInitMenuPaneL()
-// ---------------------------------------------------------------------------
-//
-void CESMRResponseDialog::DynInitMenuPaneL(
-        /*TInt aResourceId,*/
-        CEikMenuPane* aMenuPane )
-    {
-    FUNC_LOG;
-	if ( FeatureManager::FeatureSupported( KFeatureIdFfCmailIntegration ) )
-		{
-		// remove help support in pf5250
-		aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue);      
-		}
-    }
+
 // ---------------------------------------------------------------------------
 // CESMRResponseDialog::OfferKeyEventL
 // ---------------------------------------------------------------------------
@@ -236,53 +212,4 @@
     return ExecuteLD( R_RESPONSE_DIALOG );
     }
 
-// ---------------------------------------------------------------------------
-// CESMRViewerDialog::OfferToolbarEventL
-// ---------------------------------------------------------------------------
-//
-void CESMRResponseDialog::OfferToolbarEventL( TInt aCommand ) 
-    {
-    TryExitL( aCommand );
-    }
-
-// ---------------------------------------------------------------------------
-// CESMRViewerDialog::MakeResponseToolbarL
-// ---------------------------------------------------------------------------
-//
-void CESMRResponseDialog::MakeResponseToolbarL()
-    {
-    CAknToolbar* currentToolbar = static_cast<CEikAppUiFactory*>( iEikonEnv->AppUiFactory() )->CurrentFixedToolbar();
-    iOldObserver = currentToolbar->ToolbarObserver();
-    currentToolbar->SetToolbarObserver( this );
-
-    CAknButton* buttonSend = CAknButton::NewL();
-    buttonSend->ConstructFromResourceL( R_SEND_BUTTON );
-    CAknButton* buttonEmpty1 = CAknButton::NewL();
-    CAknButton* buttonEmpty2 = CAknButton::NewL();
-    
-    currentToolbar->AddItemL( buttonSend, EAknCtButton, EESMRCmdSendMR, 0, 0 );
-    currentToolbar->AddItemL( buttonEmpty1, EAknCtButton, EESMRCmdUndefined, 0, 1 );
-    currentToolbar->AddItemL( buttonEmpty2, EAknCtButton, EESMRCmdUndefined, 0, 2 );
-    }
-
-// ---------------------------------------------------------------------------
-// CESMRViewerDialog::RestoreMrGuiToolbarL
-// ---------------------------------------------------------------------------
-//
-void CESMRResponseDialog::RestoreMrGuiToolbarL()
-    {
-    CAknToolbar* currentToolbar = static_cast<CEikAppUiFactory*>( iEikonEnv->AppUiFactory() )->CurrentFixedToolbar();
-
-    currentToolbar->SetToolbarObserver( iOldObserver );
-
-    CAknButton* buttonAccept    = CAknButton::NewL();
-    CAknButton* buttonTentative = CAknButton::NewL();
-    CAknButton* buttonDecline   = CAknButton::NewL();
-    buttonAccept->ConstructFromResourceL( R_ACCEPT_BUTTON );
-    buttonTentative->ConstructFromResourceL( R_TENTATIVE_BUTTON );
-    buttonDecline->ConstructFromResourceL( R_DECLINE_BUTTON );
-    currentToolbar->AddItemL( buttonAccept, EAknCtButton, EESMRCmdAcceptMR, 0, 0 );
-    currentToolbar->AddItemL( buttonTentative, EAknCtButton, EESMRCmdTentativeMR, 0, 1 );
-    currentToolbar->AddItemL( buttonDecline, EAknCtButton, EESMRCmdDeclineMR, 0, 2 );
-    }
 // EOF