void CTTGPSLoggerPositionRequester::SetPositionModuleInfo() { TBuf<128> moduleName; TBuf<128> msg; if (iPositionModuleId == TUid::Null() && iPositionInfo->ModuleId() != TUid::Null()) { iPositionModuleId = iPositionInfo->ModuleId(); iPositionServer.GetModuleInfoById(iPositionModuleId, iPositionModuleInfo); iPositionModuleInfo.GetModuleName(moduleName); msg.Format(*iMsgPositioningMethod1, &moduleName); CAknInformationNote *note = new (ELeave) CAknInformationNote(EFalse); note->ExecuteLD(msg); } else if (iPositionModuleId != iPositionInfo->ModuleId() && iPositionInfo->ModuleId() != TUid::Null()) { iPositionModuleId = iPositionInfo->ModuleId(); iPositionServer.GetModuleInfoById(iPositionModuleId, iPositionModuleInfo); iPositionModuleInfo.GetModuleName(moduleName); msg.Format(*iMsgPositioningMethod2, &moduleName); CAknInformationNote *note = new (ELeave) CAknInformationNote(EFalse); note->ExecuteLD(msg); } else { return; } }
TBool CEmTubeVideoUploadDialog::OkToExitL(TInt aButtonId) { if (aButtonId == EAknSoftkeyDone) { SaveFormDataL(); if( iQueueEntry->Title().Length() == 0 ) { HBufC* message = StringLoader::LoadLC( R_DIALOG_TITLE_AND_DESCRIPTION_NEEDED_TXT ); CAknInformationNote* informationNote = new (ELeave) CAknInformationNote; informationNote->ExecuteLD( *message ); CleanupStack::PopAndDestroy( message ); return EFalse; } if( iQueueEntry->Description().Length() == 0 ) { HBufC* message = StringLoader::LoadLC( R_DIALOG_TITLE_AND_DESCRIPTION_NEEDED_TXT ); CAknInformationNote* informationNote = new (ELeave) CAknInformationNote; informationNote->ExecuteLD( *message ); CleanupStack::PopAndDestroy( message ); return EFalse; } TBool res = ETrue; if( iQueueEntry->Tags().Length() == 0 ) res = EFalse; TLex lex = TLex( iQueueEntry->Tags() ); TPtrC16 ptr( lex.NextToken() ); TInt tokenCount = 0; while( ptr.Length() && (tokenCount < 2) ) { tokenCount++; ptr.Set( lex.NextToken() ); } if( tokenCount < 2 ) res = EFalse; if( !res ) { HBufC* message = StringLoader::LoadLC( R_DIALOG_TWO_TAGS_NEEDED_TXT ); CAknInformationNote* informationNote = new (ELeave) CAknInformationNote; informationNote->ExecuteLD( *message ); CleanupStack::PopAndDestroy( message ); return EFalse; } return ETrue; } else { return CAknForm::OkToExitL(aButtonId); } }
void CATCmdPAMDebug::NoteL( TPtrC aNote ) { CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue ); (void) note->ExecuteLD( aNote ); return; }
// ---------------------------------------------------- // CFlashLite21LauncherAppUi::HandleCommandL(TInt aCommand) // takes care of command handling // ---------------------------------------------------- // void CFlashLite21LauncherAppUi::HandleCommandL(TInt aCommand) { switch ( aCommand ) { case EAknSoftkeyBack: case EEikCmdExit: { Exit(); break; } case EFlashLite21LauncherCmdAppTest: { // Info message shown only in the emulator iEikonEnv->InfoMsg(_L("test")); // Load localized message from the resource file HBufC* message = CEikonEnv::Static()->AllocReadResourceLC(R_MESSAGE_TEXT); // Show information note dialog CAknInformationNote* note = new (ELeave) CAknInformationNote; note->ExecuteLD(message->Des()); CleanupStack::PopAndDestroy(message); break; } // TODO: Add Your command handling code here default: break; } }
// ----------------------------------------------------------------------------- // Implements showing information note // ----------------------------------------------------------------------------- // void CAknsWallpaperPlugin::DisplayInfoNoteL(TInt aTextResourceId) { HBufC* text = StringLoader::LoadLC(aTextResourceId); CAknInformationNote* dlg = new (ELeave) CAknInformationNote(EFalse); dlg->ExecuteLD(*text); CleanupStack::PopAndDestroy(text); }
void ShowInfomationDlgL(const TInt& aTextResourceId) { HBufC* prompt = StringLoader::LoadLC( aTextResourceId ); CAknInformationNote* iInfoNote = new (ELeave) CAknInformationNote; iInfoNote->ExecuteLD(prompt->Des()); CleanupStack::PopAndDestroy(); }
// ----------------------------------------------------------------------------- // CTestSDKNotes::TestNINCAknInformationNoteParameterL // ----------------------------------------------------------------------------- TInt CTestSDKNotes::TestNINCAknInformationNoteParameterL( CStifItemParser& /*aItem*/ ) { CAknInformationNote* informationNote = new (ELeave) CAknInformationNote( ETrue ); CleanupStack::PushL( informationNote ); STIF_ASSERT_NOT_NULL( informationNote ); CleanupStack::Pop( informationNote ); informationNote->ExecuteLD(); informationNote = new (ELeave) CAknInformationNote( EFalse ); CleanupStack::PushL( informationNote ); STIF_ASSERT_NOT_NULL( informationNote ); CleanupStack::Pop( informationNote ); informationNote->ExecuteLD(); return KErrNone; }
void CTTGPSLoggerViewerContainer::CopyL() { iEdwin->SelectAllL(); iEdwin->ClipboardL(CEikEdwin::ECopy); iEdwin->ClearSelectionL(); CAknInformationNote *note = new (ELeave) CAknInformationNote(EFalse); note->ExecuteLD(*iMsgCopyClipboard); /* CClipboard* cb = CClipboard::NewForWritingLC(CCoeEnv::Static()->FsSession()); cb->StreamDictionary().At(KClipboardUidTypePlainText); CPlainText* pt = CPlainText::NewL(); CleanupStack::PushL(pt); pt->InsertL(0, iEdwinText); pt->CopyToStoreL(cb->Store(), cb->StreamDictionary(), 0, pt->DocumentLength()); CleanupStack::PopAndDestroy(); // pt cb->CommitL(); CleanupStack::PopAndDestroy(); // cb */ }
void ShowInfomationDlgL(const TDesC& aDes) { CAknInformationNote* iInfoNote = new (ELeave) CAknInformationNote; iInfoNote->ExecuteLD(aDes); }
void CAppDemoAppView::OnItemSelect(TInt aPosition) { TBuf8<10> subject; TBuf8<10> fee; switch (aPosition) { case 0: subject.Copy(_L8("苹果"));//苹果\x82f9\x679c fee.Copy(_L8("0.01")); break; case 1: subject.Copy(_L8("葡萄"));//\x8461\x8404 fee.Copy(_L8("50")); break; case 2: subject.Copy(_L8("香蕉"));//\x9999\x8549 fee.Copy(_L8("51")); break; case 3: subject.Copy(_L8("樱桃"));//\x6a31\x6843 fee.Copy(_L8("100")); break; case 4: subject.Copy(_L8("芒果"));//\x8292\x679c fee.Copy(_L8("101")); break; case 5: subject.Copy(_L8("西瓜"));//\x897f\x74dc fee.Copy(_L8("200")); break; case 6: subject.Copy(_L8("菠萝"));//\x83e0\x841d fee.Copy(_L8("201")); break; case 7: subject.Copy(_L8("番茄"));//\x756a\x8304 fee.Copy(_L8("500")); break; case 8: subject.Copy(_L8("黃桃"));//\x9ec4\x6843 fee.Copy(_L8("501")); break; case 9: subject.Copy(_L8("荔枝"));//\x8354\x679d fee.Copy(_L8("2000")); break; case 10: subject.Copy(_L8("枇杷"));//\x6787\x6777 fee.Copy(_L8("2001")); break; case 11: subject.Copy(_L8("甘蔗"));//\x7518\x8517 fee.Copy(_L8("5000")); break; case 12: subject.Copy(_L8("龙眼"));//\x9f99\x773c fee.Copy(_L8("5001")); break; default: return; } TBuf8<32> aPartnerID; TBuf8<32> aSellerID; aPartnerID.Copy(PartnerID); aSellerID.Copy(SellerID); if(aPartnerID.Length() == 0 || aSellerID.Length() == 0) { CAknInformationNote* informationNote; informationNote = new (ELeave) CAknInformationNote; // Show the information Note informationNote->ExecuteLD(_L("Parameter is null")); return; } OrderPay(subject, fee); }
void COokjorAppUi::HandleCommandL(TInt aCommand) { switch(aCommand) { case EAknSoftkeyExit: //flow through to next case case EEikCmdExit: { Exit(); return; } default: break; } if(CAknViewAppUi::iView == iAppView) { switch(aCommand) { case EOokjorSettingsCommand: { ActivateLocalViewL(TUid::Uid(ENavigationPaneSettingsViewId)); }; break; case EAknSoftkeyDone: { _LIT(msg,"Switching to Background"); CAknInformationNote* informationNote = new (ELeave) CAknInformationNote(ETrue); informationNote->SetTimeout(CAknNoteDialog::EShortTimeout); informationNote->ExecuteLD(msg); TApaTask task(iEikonEnv->WsSession( )); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.SendToBackground(); if(iAppView) ((COokjorAppView*)iAppView)->CleanupCamera(); //stream mobile screen instead of camera } break; case EOokjorHelpCommand: { ActivateLocalViewL(TUid::Uid(ENavigationPaneHelpViewId)); }; break; case EOokjorAboutCommand: { ActivateLocalViewL(TUid::Uid(ENavigationPaneAboutViewId)); }; break; default: break; } } else if( CAknViewAppUi::iView == iAboutAppView) { ActivateLocalViewL(TUid::Uid(ENavigationPaneStatusViewId)); } }
// ----------------------------------------------------------------------------- // CLocalizationAppUi::HandleCommandL() // Takes care of command handling. // ----------------------------------------------------------------------------- // void CLocalizationAppUi::HandleCommandL( TInt aCommand ) { switch( aCommand ) { case EEikCmdExit: case EAknSoftkeyExit: Exit(); break; // Number case ELocalizationCommandNumber: { // buffer for localized text TBuf<50> myBuf; // Amount to show TReal myAmount = 1234.567; // Real number formatter, initialized with system's current locale settings TRealFormat myFormat; // Format real with current locales decimal separator setting myBuf.AppendNum(myAmount, myFormat); // Show formatted text CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote; informationNote->ExecuteLD( myBuf ); } break; // Currency case ELocalizationCommandCurrency: { // locale is initialized with system's current locale settings TLocale myLocale; // buffer for localized text TBuf<50> myBuf; // amount is integer, but it is treated as last two digits // were decimal digits e.g. 1249 = 12.49, 2 = 0.02 ... TInt myAmount = 123456789; // Format currency according to current locale settings myLocale.FormatCurrency(myBuf, myAmount); // Show formatted text CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote; informationNote->ExecuteLD( myBuf ); } break; // Date case ELocalizationCommandDate: { // buffer for localized text TBuf<50> myBuf; // Object for datetime data TTime myDate; // Set current datetime to object myDate.HomeTime(); // Format date according to current locale settings // Format string is universal, so that whatever the locale is, // date is always formatted correctly myDate.FormatL(myBuf, _L("%/0%1%/1%2%/2%3%/3%X")); // Show formatted text CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote; informationNote->ExecuteLD( myBuf ); } break; // Time case ELocalizationCommandTime: { // buffer for localized text TBuf<50> myBuf; // Object for datetime data TTime myTime; // Set current datetime to object myTime.HomeTime(); // Format time to current locale // Format string is universal, so that whatever the locale is, // time is always formatted correctly myTime.FormatL(myBuf, _L("%-B%:0%J%:1%T%:2%S%:3%+B")); // Show formatted text CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote; informationNote->ExecuteLD( myBuf ); } break; // Text case ELocalizationCommandText: { // buffer for string parameters that may change order CDesCArrayFlat* strings = new CDesCArrayFlat( 2 ); CleanupStack::PushL( strings ); // Initialize parameter buffer // First parameter strings->AppendL( _L("Heidi") ); // Second parameter strings->AppendL( _L("2") ); // Load a string from the resource file, and append parameters into it HBufC* textResource = StringLoader::LoadL( R_LOC_COMMANDTEXT_TEXT, *strings ); CleanupStack::PushL( textResource ); // Show formatted text CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote; informationNote->ExecuteLD( *textResource ); // Cleanupstack CleanupStack::PopAndDestroy( textResource ); CleanupStack::PopAndDestroy( strings ); } break; // Image case ELocalizationCommandImage: { // find the drive where the app has been installed TParse parse; parse.Set(Application()->AppFullName(),0,0); // Load bitmap name from the resource file HBufC* bmpFile = StringLoader::LoadLC( R_LOC_COMMANDIMAGE_BMPFILE, parse.Drive()); // bitmap pointer CFbsBitmap* bitmap; // Create and Load the Bitmap bitmap = new( ELeave )CFbsBitmap; CleanupStack::PushL( bitmap ); // Load the first bitmap (index 0) from multi-bitmap file User::LeaveIfError(bitmap->Load( *bmpFile, 0 )); CleanupStack::Pop( bitmap ); // Draw bitmap to screen // ownership of bitmap is transferred to view iAppView->DrawImage( bitmap ); // Cleanupstack CleanupStack::PopAndDestroy( bmpFile ); } break; // Default case default: break; } }
// --------------------------------------------------------- // CFindBoxView::HandleCommandL(TInt aCommand) // ?implementation_description // --------------------------------------------------------- // void CFindBoxView::HandleCommandL(TInt aCommand) { switch ( aCommand ) { case EMail: { iContainer->OkPressKey(); break; } case EMobile: { iContainer->OkPressKey(); break; } //case EAknSoftkeyDone: case EFindOk: { if(iPhotosAppUi->iStoragePath == 1) { if(iContainer->GetSelectedCount() == 0) { CAknInformationNote* note = new(ELeave) CAknInformationNote; //TBuf<200> msg; //msg.Copy(*(iEikonEnv->AllocReadResourceL(R_SELECT_RECEPIENT))); note->ExecuteLD(*(iEikonEnv->AllocReadResourceL(R_SELECT_RECEPIENT))); return; } if(iContainer->GetSelectedCount() > 10) { CAknInformationNote* note = new(ELeave) CAknInformationNote; note->ExecuteLD(*(iEikonEnv->AllocReadResourceL(R_PHOTOS_RECEPIENT))); return; } iContainer->SaveContacts(); iPhotosAppUi->SaveSelectiveSmsMails(iPhotosAppUi->MailNames,iPhotosAppUi->MailId, iPhotosAppUi->iSharingCount); iPhotosAppUi->ActivateView(KViewIdSelectiveSms); break; } if(iContainer->GetSelectedCount()==0) { CAknInformationNote* note = new(ELeave) CAknInformationNote; //TBuf<200> msg; //msg.Copy(*(iEikonEnv->AllocReadResourceL(R_SELECT_RECEPIENT))); note->ExecuteLD(*(iEikonEnv->AllocReadResourceL(R_SELECT_RECEPIENT))); return; } if(iPhotosAppUi->iSharingCount > 10) { CAknInformationNote* note = new(ELeave) CAknInformationNote; note->ExecuteLD(*(iEikonEnv->AllocReadResourceL(R_PHOTOS_RECEPIENT))); return; } iContainer->SaveContacts(); DisplayFormL(); break; } case EFindCancel: { if(iPhotosAppUi->iStoragePath == 1) iPhotosAppUi->ActivateView(KViewIdSelectiveSms); else DisplayFormL(); break; } default: { AppUi()->HandleCommandL( aCommand ); break; } } }
void CUtils::MessageBoxL(const TDesC& aMessage) { CAknInformationNote* informationNote = new ( ELeave ) CAknInformationNote; informationNote->ExecuteLD( aMessage ); }
void CIncallertAppUi::HandleCommandL(TInt aCommand) { switch(aCommand) { case EAknSoftkeyExit: //flow through to next case case EEikCmdExit: { if(!iAutoStarted) Exit(); else { TTime now; now.HomeTime(); TTimeIntervalMicroSeconds diff = now.MicroSecondsFrom(iStartTime); if(diff<=TTimeIntervalMicroSeconds(5)) { //auto started apps must not exit sooner than 5 secs or phone might say our app has corrupted iEikonEnv->RootWin().SetOrdinalPosition(-1,ECoeWinPriorityNeverAtFront); if(!iExitTimer)//if not already started exit timer { iExitTimer = CPeriodic::NewL(0); iExitTimer->Start( 5000000, 5000000, TCallBack(ExitTimerCallBack,this)); } } else Exit(); //app was already started long enough } return; } default: break; } if(CAknViewAppUi::iView == iAppView) { switch(aCommand) { case EIncallertSettingsCommand: { this->iLineStatusHandler->PlaySoundTest(); iTabGroup->SetActiveTabById(ENavigationPaneSettingsViewId); ActivateLocalViewL(TUid::Uid(iTabGroup->ActiveTabId())); }; break; case EAknSoftkeyDone: { _LIT(msg,"Switching to Background"); CAknInformationNote* informationNote = new (ELeave) CAknInformationNote(ETrue); informationNote->SetTimeout(CAknNoteDialog::EShortTimeout); informationNote->ExecuteLD(msg); TApaTask task(iEikonEnv->WsSession( )); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.SendToBackground(); } break; case EIncallertHelpCommand: { iTabGroup->SetActiveTabById(ENavigationPaneHelpViewId); ActivateLocalViewL(TUid::Uid(iTabGroup->ActiveTabId())); }; break; case EIncallertAboutCommand: { iTabGroup->SetActiveTabById(ENavigationPaneAboutViewId); ActivateLocalViewL(TUid::Uid(iTabGroup->ActiveTabId())); }; break; default: break; } } else if(CAknViewAppUi::iView == iHelpAppView || CAknViewAppUi::iView == iAboutAppView) { iTabGroup->SetActiveTabById(ENavigationPaneStatusViewId); ActivateLocalViewL(TUid::Uid(iTabGroup->ActiveTabId())); } }
// -------------------------------------------------------------------------- // UPnPAppSettingPageHomeIAP::CreateAndExecuteSettingPageL () // -------------------------------------------------------------------------- // void UPnPAppSettingItemHomeIAP::CreateAndExecuteSettingPageL() { __LOG8_1( "%s begin.", __PRETTY_FUNCTION__ ); // if sharing is on, only information note is displayed UPnPAVControllerFactory::TAVControllerServerStatus status; UPnPAVControllerFactory::Status( status ); if ( iSharingState || status == UPnPAVControllerFactory::EStatusActive ) { CAknInformationNote* note = new (ELeave) CAknInformationNote; CleanupStack::PushL(note); HBufC* noteText = iCoeEnv->AllocReadResourceLC( R_QTN_IUPNP_IAP_TURN_SHARING_OFF); note->ExecuteLD(*noteText); CleanupStack::PopAndDestroy(noteText); CleanupStack::Pop(note); return; } // Resets the member array for iap ids. // Creates new array for iap names. iIAPIdArray.Reset(); CDesCArray* array = new (ELeave) CDesCArrayFlat(5); CleanupStack::PushL(array); // adds static setting page items from resource // and stores the number of static items. AddStaticItemsL(array); TInt staticItemCount = array->Count(); // adds wlan access points, array GETS the ownership CUPnPSettingsEngine::GetWLANAccessPointsL( array, iIAPIdArray ); MAknQueryValue* qValue = QueryValue(); User::LeaveIfNull(qValue); LoadL(); StoreL(); TInt idx = GetIAPIndex( staticItemCount ); if ( idx >= array->MdcaCount() ) { idx = array->MdcaCount() - 1; } // setting page is launched CAknSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage( SettingPageResourceId(), idx, array); if (dlg->ExecuteLD()) { switch (idx) { case EUPnPSettingsEngineIAPItemNone: { DisplayInfoL(R_IBU_GALLERY_UPDATE_NOTE_TITLE_TEXT, R_IBU_GALLERY_UPDATE_NOTAVAIL_NOTE_TEXT, R_HOMECONNECT_INFO_QUERY); qValue->SetCurrentValueIndex(EUPnPSettingsEngineIAPItemNone); iIAPId = EUPnPSettingsEngineIAPIdNone; iIAPSetting = EUPnPSettingsEngineIAPItemNone; break; } case EUPnPSettingsEngineIAPItemAlwaysAsk: { qValue->SetCurrentValueIndex(EUPnPSettingsEngineIAPItemAlwaysAsk); iIAPId = EUPnPSettingsEngineIAPIdAlwaysAsk; iIAPSetting = EUPnPSettingsEngineIAPItemAlwaysAsk; DisplayInfoL(R_IBU_GALLERY_UPDATE_NOTE_TITLE_TEXT, R_IBU_GALLERY_UPDATE_NOTE_TEXT, R_HOMECONNECT_INFO_QUERY); break; } case EUPnPSettingsEngineIAPItemUserDefined: // Create new { // new iap wlan iap creation is started here TInt old_iap = iIAPId; CUPnPSettingsEngine::CreateAccessPointL(); //We have to re-get all the wlan iaps again since //user may modify the iap list RArray<TInt64> newArray; CleanupClosePushL( newArray ); //We only are interested in the iap ids CUPnPSettingsEngine::GetWLANAccessPointsL( NULL, newArray ); if( newArray.Count() <= 0 ) //if no iap exisits { //if previous iap is not "None" or "Always ask" if( old_iap > EUPnPSettingsEngineIAPIdAlwaysAsk ) { DisplayInfoL( R_IBU_GALLERY_UPDATE_NOTE_TITLE_TEXT, R_IBU_GALLERY_UPDATE_NOTAVAIL_NOTE_TEXT, R_HOMECONNECT_INFO_QUERY); iIAPId = EUPnPSettingsEngineIAPIdNone; qValue->SetCurrentValueIndex( EUPnPSettingsEngineIAPItemNone ); iIAPSetting = EUPnPSettingsEngineIAPItemNone; } iIAPIdArray.Reset(); CleanupStack::PopAndDestroy( &newArray ); } else { TBool newiap = ETrue; TInt lastItemIndex = newArray.Count() - 1; //if the last item on the new iap list //is found in the old iap array //then we think no new iap is created for( TInt i = 0; i < iIAPIdArray.Count(); i++ ) { if( newArray[lastItemIndex] == iIAPIdArray[i] ) { newiap = EFalse; i = iIAPIdArray.Count(); } } //get the new iap list iIAPIdArray.Reset(); for( TInt i = 0; i < newArray.Count(); i++ ) { iIAPIdArray.AppendL( newArray[i] ); } CleanupStack::PopAndDestroy( &newArray ); if( newiap ) { iIAPId = iIAPIdArray[lastItemIndex];//get new iap iIAPSetting = EUPnPSettingsEngineIAPItemUserDefined; // show confirmation note if connection is // unsecured, the database store the value of // the securitymode,such as EOpen,EWep,E802_1x, // EWpa,if select other securitymode except // EOpen, the return value of the // CheckAPSecurityL fuction is not EWLanUnsecured if ( CheckAPSecurityL(iIAPId) == EWLanUnsecured ) { CAknQueryDialog* dlg = CAknQueryDialog::NewL(); if (!(dlg->ExecuteLD( R_UNSECURED_CONNECTIONS_CONFIRMATION_QUERY))) { //user cancels the dialog UsePreviousIapL( old_iap ); } } else { // show 'Sharing Changed' note ( None -> sharing) if(old_iap == EUPnPSettingsEngineIAPIdNone && iIAPId != old_iap ) { DisplayInfoL( R_IBU_GALLERY_UPDATE_NOTE_TITLE_TEXT, R_IBU_GALLERY_UPDATE_NOTE_TEXT, R_HOMECONNECT_INFO_QUERY); } } } else { UsePreviousIapL(old_iap); } //if( newiap ) } //if( newArray.Count() <= 0 ) break; } default: // Predefined iap is selected { TInt index; TInt old_iap = iIAPId; TBool iapchange = EFalse; // iap id is set if ( idx - staticItemCount >= 0 ) { index = idx - staticItemCount; if (CheckAPSecurityL(iIAPIdArray[index]) == EWLanUnsecured) { // show confirmation note if connection is unsecured CAknQueryDialog* dlg = CAknQueryDialog::NewL(); if (dlg->ExecuteLD( R_UNSECURED_CONNECTIONS_CONFIRMATION_QUERY)) { //if "Continue" iapchange = ETrue; } } else { iapchange = ETrue; } if( iapchange ) { iIAPSetting = EUPnPSettingsEngineIAPItemUserDefined; iIAPId = iIAPIdArray[index]; qValue->SetCurrentValueIndex( EUPnPSettingsEngineIAPItemUserDefined); // if previous iap was 'None' and current iap // is not 'None' if ( old_iap == EUPnPSettingsEngineIAPIdNone && iIAPId != old_iap ) { DisplayInfoL( R_IBU_GALLERY_UPDATE_NOTE_TITLE_TEXT, R_IBU_GALLERY_UPDATE_NOTE_TEXT, R_HOMECONNECT_INFO_QUERY); } } } break; } } } LoadL(); StoreL(); CleanupStack::PopAndDestroy(array); __LOG8_1( "%s end.", __PRETTY_FUNCTION__ ); }
// ----------------------------------------------------------------------------- // CHelloS60AppUi::HandleCommandL() // Takes care of command handling. // ----------------------------------------------------------------------------- // void CHelloS60AppUi::HandleCommandL(TInt aCommand) { switch (aCommand) { case EEikCmdExit: case EAknSoftkeyExit: Exit(); break; case ECommand1: { // Load a string from the resource file and display it HBufC* textResource = StringLoader::LoadLC(R_COMMAND1_TEXT); CAknInformationNote* informationNote; informationNote = new (ELeave) CAknInformationNote; // Show the information Note with // textResource loaded with StringLoader. informationNote->ExecuteLD(*textResource); // Pop HBuf from CleanUpStack and Destroy it. CleanupStack::PopAndDestroy(textResource); } break; case ECommand2: { RFile rFile; //Open file where the stream text is User::LeaveIfError(rFile.Open(CCoeEnv::Static()->FsSession(), KFileName, EFileStreamText));//EFileShareReadersOnly));// EFileStreamText)); CleanupClosePushL(rFile); // copy stream from file to RFileStream object RFileReadStream inputFileStream(rFile); CleanupClosePushL(inputFileStream); // HBufC descriptor is created from the RFileStream object. HBufC* fileData = HBufC::NewLC(inputFileStream, 32); CAknInformationNote* informationNote; informationNote = new (ELeave) CAknInformationNote; // Show the information Note informationNote->ExecuteLD(*fileData); // Pop loaded resources from the cleanup stack CleanupStack::PopAndDestroy(3); // filedata, inputFileStream, rFile } break; case EHelp: { CArrayFix<TCoeHelpContext>* buf = CCoeAppUi::AppHelpContextL(); HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf); } break; case EAbout: { CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog(); dlg->PrepareLC(R_ABOUT_QUERY_DIALOG); HBufC* title = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TITLE); dlg->QueryHeading()->SetTextL(*title); CleanupStack::PopAndDestroy(); //title HBufC* msg = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TEXT); dlg->SetMessageTextL(*msg); CleanupStack::PopAndDestroy(); //msg dlg->RunLD(); } break; default: Panic( EHelloS60Ui); break; } }