application/src/PodcastAppui.cpp
branchSymbian3
changeset 51 3a22449b5c73
parent 37 1644b7cd063e
parent 50 e7b10d6d7ba3
child 65 bcd88ba95046
equal deleted inserted replaced
43:3c0683f9f72c 51:3a22449b5c73
   135 			task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
   135 			task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
   136 			task.SendToBackground(); 
   136 			task.SendToBackground(); 
   137 			break;
   137 			break;
   138         	}
   138         	}
   139 	case EPodcastHelp:
   139 	case EPodcastHelp:
   140         	{
   140         	{	
   141         	CArrayFix<TCoeHelpContext>* buf = CPodcastAppUi::AppHelpContextL();		
   141         	HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), HelpContextL());
   142         	HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf);
       
   143         	}
   142         	}
   144         	break;      	
   143         	break;      	
   145         default:
   144         default:
   146             break;      
   145             break;      
   147         }
   146         }
   150 CArrayFix<TCoeHelpContext>* CPodcastAppUi::HelpContextL() const
   149 CArrayFix<TCoeHelpContext>* CPodcastAppUi::HelpContextL() const
   151    { 
   150    { 
   152     CArrayFixFlat<TCoeHelpContext>* array = 
   151     CArrayFixFlat<TCoeHelpContext>* array = 
   153                 new(ELeave)CArrayFixFlat<TCoeHelpContext>(1);
   152                 new(ELeave)CArrayFixFlat<TCoeHelpContext>(1);
   154     CleanupStack::PushL(array);
   153     CleanupStack::PushL(array);
   155     // todo: view detection doesn't seem to work
   154     
   156     if (ViewShown(KUidPodcastSearchViewID)) {
   155     if (iFeedView->IsVisible()) {
       
   156 		array->AppendL(TCoeHelpContext(KUidPodcast,KContextFeedsView));
       
   157     } else if (iShowsView->IsVisible()) {
       
   158 		array->AppendL(TCoeHelpContext(KUidPodcast,KContextShowsView));
       
   159     } else if (iQueueView->IsVisible()) {
       
   160 		array->AppendL(TCoeHelpContext(KUidPodcast,KContextDownloadQueue));
       
   161     } else {
   157 		array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings));
   162 		array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings));
   158     } else {
       
   159 		array->AppendL(TCoeHelpContext(KUidPodcast,KContextApplication));
       
   160     }
   163     }
   161 	
   164 	
   162     CleanupStack::Pop(array);
   165     CleanupStack::Pop(array);
   163     return array;
   166     return array;
   164 	}
   167 	}
   215 	
   218 	
   216 	if (iNaviStyle == ENaviTabGroup)
   219 	if (iNaviStyle == ENaviTabGroup)
   217 		{
   220 		{
   218 		TUid newview = TUid::Uid(0);
   221 		TUid newview = TUid::Uid(0);
   219 		TUid messageUid = TUid::Uid(0);
   222 		TUid messageUid = TUid::Uid(0);
   220 		
   223 		if (aIndex == KTabIdFeeds) 
   221 		if (aIndex == KTabIdFeeds) {
   224 			{
   222 			newview = KUidPodcastFeedViewID;
   225 			if (iFeedView->ViewingShows())
   223 		} else if (aIndex == KTabIdQueue) {
   226 				{
       
   227 				newview = KUidPodcastShowsViewID;
       
   228 				}
       
   229 			else
       
   230 				{
       
   231 				newview = KUidPodcastFeedViewID;
       
   232 				}
       
   233 			} 
       
   234 		else if (aIndex == KTabIdQueue)
       
   235 			{
   224 			newview = KUidPodcastQueueViewID;
   236 			newview = KUidPodcastQueueViewID;
   225 		} else {
   237 			} 
       
   238 		else 
       
   239 			{
   226 			User::Leave(KErrTooBig);
   240 			User::Leave(KErrTooBig);
   227 		}
   241 			}
   228 		
   242 		
   229 		if(newview.iUid != 0)
   243 		if(newview.iUid != 0)
   230 			{			
   244 			{			
   231 			ActivateLocalViewL(newview,  messageUid, KNullDesC8());
   245 			ActivateLocalViewL(newview,  messageUid, KNullDesC8());
   232 			}
   246 			}