diff -r a3a1ae9acec6 -r da5135c61bad meetingrequest/mrgui/src/tnavipaneclearer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/meetingrequest/mrgui/src/tnavipaneclearer.cpp Wed Mar 31 21:08:33 2010 +0300 @@ -0,0 +1,61 @@ +/* +* 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" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ESMR UI Container class +* +*/ +#include "tnavipaneclearer.h" + +#include // CEikonEnv +#include // CAknNavigationControlContainer +#include // EEikStatusPaneUidNavi +#include // CEikStatusPane + +// --------------------------------------------------------------------------- +// TNavipaneClearer::TNavipaneClearer() +// --------------------------------------------------------------------------- +// +TNavipaneClearer::TNavipaneClearer() +: iNaviContainer( NULL ), iFullyInitialized( EFalse ) + { + CEikStatusPane* sp = + CEikonEnv::Static()->AppUiFactory()->StatusPane();// codescanner::eikonenvstatic + // If this leaves we have to stick with the navi we have. + TRAP_IGNORE( + { + // Put default, empty Status Pane. + // Otherwise view's status pane with dates would be shown. + iNaviContainer = static_cast + ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); + iNaviContainer->PushDefaultL(); + // If PushDefaultL leaves we know that then we can Pop the container + iFullyInitialized = ETrue; + } ); + } + +// --------------------------------------------------------------------------- +// TNavipaneClearer::~TNavipaneClearer() +// --------------------------------------------------------------------------- +// +TNavipaneClearer::~TNavipaneClearer() + { + // Remove default status pane + if ( iNaviContainer && iFullyInitialized ) + { + iNaviContainer->Pop(); + } + iNaviContainer = NULL; // not owned + } + +// End of file +