Example #1
0
/*
------------------------------------------------------------------------------
------------------------------------------------------------------------------
*/
void CMovingBallAppUi::HandleCommandL( TInt aCommand )
	{
	switch( aCommand )
		{
		case EResset:
			if(iAppView)
			{
				iAppView->Reset();
			}
			break;
		case EBGLOff:
			if(iAppView)
			{
				iAppView->SetLights(EFalse);
			}
			break;
		case EBGLOn:
			if(iAppView)
			{
				iAppView->SetLights(ETrue);
			}
			break;
		case EClose:
			// do nothing..
			break;
		case EEikCmdExit:
		case EAknSoftkeyExit:
			Exit();
			break;
	    case EVisitDrJukka:
	    	{
				OpenMobileWEBSiteL(this);
	    	}
	    	break;			
		case EAbout:
			{	
				HBufC* Abbout = KtxAbbout().AllocLC();
					
				CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog(); 
				dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
				dlg->QueryHeading()->SetTextL(_L("About"));
				dlg->SetMessageTextL(*Abbout);
				
				TCallBack callback1(OpenMobileWEBSiteL);
				dlg->SetLink(callback1);
				dlg->SetLinkTextL(KMobileJukkaLink);
				
				dlg->RunLD(); 
				
				CleanupStack::PopAndDestroy(); //Abbout
			}
			break;
		default:
			if(iAppView)
			{
				iAppView->HandleViewCommandL(aCommand);
			}
			break;
		}
	}
void CBuddycloudCommunitiesContainer::HandleItemSelectionL(TInt aIndex) {
	if(aIndex == ECommunityFacebook) {
		CAknMessageQueryDialog* aMessageDialog = new (ELeave) CAknMessageQueryDialog();
		aMessageDialog->PrepareLC(R_EXIT_DIALOG);
		
		HBufC* aFacebookText = iEikonEnv->AllocReadResourceLC(R_LOCALIZED_STRING_SETTINGS_FACEBOOK_TEXT);
		aMessageDialog->SetHeaderTextL(_L("Facebook"));
		aMessageDialog->SetMessageTextL(*aFacebookText);
		CleanupStack::PopAndDestroy(); // aFacebookText

		TCallBack aCallback(FacebookLaunchCallback);
		aMessageDialog->SetLink(aCallback);
		aMessageDialog->SetLinkTextL(_L("http://apps.facebook.com/buddycloud"));
		
		if(aMessageDialog->RunLD() != 0) {		
			aCallback.CallBack();
		}
	}
	else if(aIndex == ECommunityTwitter) {
		CAknMultiLineDataQueryDialog* aDialog = 
					CAknMultiLineDataQueryDialog::NewL(iBuddycloudLogic->GetDescSetting(ESettingItemTwitterUsername), 
					iBuddycloudLogic->GetDescSetting(ESettingItemTwitterPassword));

		if(aDialog->ExecuteLD(R_CREDENTIALS_DIALOG) != 0) {
			iBuddycloudLogic->SendCommunityCredentials(ECommunityTwitter);
		}
	}
}
Example #3
0
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMgAppUi::HandleCommandL(TInt aCommand)
    {
    switch (aCommand)
    {
    case EVisitDrJukka:
    	{
			OpenMobileWEBSiteL(this);
    	}
    	break;
    case EAbout:
		{
            HBufC* Abbout(NULL);
            
            if(KAppIsTrial)
                Abbout = KtxAboutText2().AllocLC();
            else
                Abbout = KtxAboutText1().AllocLC();
            
			TPtr Pointter(Abbout->Des());
		
		    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter); 
		    dlg->PrepareLC(R_AVKON_MESSAGE_QUERY_DIALOG);
		    dlg->QueryHeading()->SetTextL(KtxtApplicationName());
		    
		    TCallBack callback1(OpenMobileWEBSiteL);
		    dlg->SetLink(callback1);
		    dlg->SetLinkTextL(KMobileJukkaLink);

		    dlg->RunLD();
			
			CleanupStack::PopAndDestroy(Abbout);
		}
    	break;
    case EClose2:
    	if(iTimeOutTimer)
    	{
    		iTimeOutTimer->Cancel();
    		TimerExpired();
    	}
    	break;
    case EClose:
    case EAknSoftkeyExit:
    case EEikCmdExit:
    	if(iMainContainer)
		{
			TRAPD(Errr,iMainContainer->SaveValuesL());
		
			RemoveFromStack(iMainContainer);
			// will close the DB...	  
			delete iMainContainer;
			iMainContainer = NULL;
		}
		TRAPD(Errr,DoExitChecksNowL());
    	Exit();
        break;
    case EQuickExit:     
        Exit();
        break;        
    default:
    	if(iMainContainer)
    		iMainContainer->HandleViewCommandL(aCommand);
        break;
        }
    }