// ---------------------------------------------------------
// CSecModUIViewBase::DoAddNaviPaneL()
// Creates navi pane text
// ---------------------------------------------------------
//
void CSecModUIViewBase::DoAddNaviPaneL(TInt aResource)
    {
    TUid naviPaneUid;
    naviPaneUid.iUid = EEikStatusPaneUidNavi;
    CEikStatusPane* statusPane = StatusPane();
    CAknNavigationControlContainer* naviPane =
        (CAknNavigationControlContainer*) statusPane->ControlL(naviPaneUid);
    if(!iNaviDecorator)
        {
        // Let's try to create navipane
        CEikStatusPaneBase::TPaneCapabilities subPane =
        statusPane->PaneCapabilities(naviPaneUid);
    
        if (subPane.IsPresent() && subPane.IsAppOwned())
            {
            if (0 != aResource)
                {
                TResourceReader reader;
                iCoeEnv->CreateResourceReaderLC(reader, aResource);

                 // set the navigation pane label
                iNaviDecorator = naviPane->CreateNavigationLabelL(reader);
                CleanupStack::PopAndDestroy();
                }
             else
                {
                iNaviDecorator = naviPane->CreateNavigationLabelL();
                }
            }
        }
    if (iNaviDecorator)
        {
        naviPane->PushL(*iNaviDecorator);
        }
    }
示例#2
0
void CFileSelectDialog::SetTitle()
	{
	
		TUid titlePaneUid;
		titlePaneUid.iUid = EEikStatusPaneUidTitle;
		TVwsViewId ViewID;CEikonEnv::Static()->AppUi()->GetActiveViewId(ViewID);
		CEikStatusPane* statusPane =((CAknAppUi*)CEikonEnv::Static()->AppUi())->StatusPane();		CEikStatusPaneBase::TPaneCapabilities subPane = statusPane->PaneCapabilities(titlePaneUid);
		if ( subPane.IsPresent() && subPane.IsAppOwned() )
			{
			CAknTitlePane* titlePane =(CAknTitlePane*) statusPane->ControlL(titlePaneUid);
			iOldTitle = *titlePane->Text();
			titlePane->SetTextL(iTitle);
			}
		
	}
void CNPRStoryListBoxView::SetupStatusPaneL()
	{
	// reset the context pane
	TUid contextPaneUid = TUid::Uid( EEikStatusPaneUidContext );
	CEikStatusPaneBase::TPaneCapabilities subPaneContext = 
		StatusPane()->PaneCapabilities( contextPaneUid );
	if ( subPaneContext.IsPresent() && subPaneContext.IsAppOwned() )
		{
		CAknContextPane* context = static_cast< CAknContextPane* > ( 
			StatusPane()->ControlL( contextPaneUid ) );
		context->SetPictureToDefaultL();
		}
	
	// setup the title pane
	TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle );
	CEikStatusPaneBase::TPaneCapabilities subPaneTitle = 
		StatusPane()->PaneCapabilities( titlePaneUid );
	if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() )
		{
		CAknTitlePane* title = static_cast< CAknTitlePane* >( 
			StatusPane()->ControlL( titlePaneUid ) );
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_NPRSTORY_LIST_BOX_TITLE_RESOURCE );
		title->SetFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}			
	}
// --------------------------------------------------------------------------
// CUPnPVideoPlayerDlg::PreLayoutDynInitL();
// called by framework before dialog is shown
// --------------------------------------------------------------------------
//
void CUPnPVideoPlayerDlg::PreLayoutDynInitL()
{
    __LOG( "CUPnPVideoPlayerDlg::PreLayoutDynInitL" );


    // Browse dialog title text
    TUid titlePaneUid;
    titlePaneUid.iUid = EEikStatusPaneUidTitle;
    CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
    CEikStatusPaneBase::TPaneCapabilities titlesubPane =
        statusPane->PaneCapabilities( titlePaneUid );


    if( titlesubPane.IsPresent() &&
            titlesubPane.IsAppOwned() )
    {
        CAknTitlePane* titlePane =
            (CAknTitlePane*) statusPane->ControlL( titlePaneUid );
        // Take backup of title text
        iOriginalTitleText->Des().Copy( *titlePane->Text() );

        HBufC *tmpbuf = UpnpString::ToUnicodeL( iItem->Title() );
        CleanupStack::PushL( tmpbuf );
        titlePane->SetTextL( *tmpbuf );
        CleanupStack::PopAndDestroy();
    }


    // Start to observe the rendering session
    iRendSession.RemoveObserver();
    iRendSession.SetObserver( *this );

    PreparePlayBackL();

    StartWaitNoteL();

    /*
    // Temporally commented out. Will be uncommented when UpnpAvController
    // provides cancel functionaly fot SetUri action (Upnp Fw 2.5)
        if( iExitCode == EEikBidCancel )
            {
            // Cancel the SetUri
            //iRendSession.Cancel();
            // Send Stop
            TRAP_IGNORE( iRendSession.StopL() );
            ClearTitleL();
            iExitCode = KErrCancel;
            }
    */
    User::LeaveIfError( iExitCode );

    if ( !Layout_Meta_Data::IsLandscapeOrientation() )
    {
        iEikonEnv->AppUiFactory()->StatusPane()->SwitchLayoutL(
            R_AVKON_STATUS_PANE_LAYOUT_USUAL );
    }
    // Volume level to 0
    iCurrentVolume = KMiniumVolume;

    // try to get volume level from renderer
    TRAPD( err, iRendSession.GetVolumeL() );
    if( !err )
    {
        iAdjustingVolume = ETrue;
    }

    __LOG( "CUPnPVideoPlayerDlg::PreLayoutDynInitL End" );
}