diff -r 000000000000 -r dd21522fd290 browserutilities/feedsengine/FeedsUI/Common/src/StatusPane.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browserutilities/feedsengine/FeedsUI/Common/src/StatusPane.cpp Mon Mar 30 12:54:55 2009 +0300 @@ -0,0 +1,74 @@ +/* +* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "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: Status-pane related methods +* +*/ + + + +#include +#include +#include +#include +#include + +#include "StatusPane.h" + + +// ----------------------------------------------------------------------------- +// StatusPane::SetTitleL +// +// Sets the title. +// ----------------------------------------------------------------------------- +// +void StatusPane::SetTitleL(TInt aStringId) + { + HBufC* label = NULL; + + // Load the label's resource. + label = StringLoader::LoadLC(aStringId); + + SetTitleL(*label); + CleanupStack::PopAndDestroy(label); + } + + +// ----------------------------------------------------------------------------- +// StatusPane::SetTitleL +// +// Sets the title. +// ----------------------------------------------------------------------------- +// +void StatusPane::SetTitleL(const TDesC& aString) + { + CAknViewAppUi* appUi; + + // Get the title sub-pane. + appUi = static_cast(CCoeEnv::Static()->AppUi()); + + CEikStatusPaneBase::TPaneCapabilities subPane = appUi->StatusPane()-> + PaneCapabilities(TUid::Uid(EEikStatusPaneUidTitle)); + + // Set the title if the pane belongs to the app. + if (subPane.IsPresent() && subPane.IsAppOwned()) + { + CAknTitlePane* titlePane; + TUid uid; + + uid.iUid = EEikStatusPaneUidTitle; + + titlePane = (CAknTitlePane*) appUi->StatusPane()->ControlL(uid); + titlePane->SetTextL(aString); + } + }