application/src/PodcastSearchView.cpp
changeset 35 66c5303f3610
parent 24 ca50ea154990
child 37 1644b7cd063e
child 50 e7b10d6d7ba3
equal deleted inserted replaced
30:7bca37ba5fa9 35:66c5303f3610
   237 				TBuf<KMaxMessageLength> templ;
   237 				TBuf<KMaxMessageLength> templ;
   238 				TBuf<KMaxMessageLength> message;
   238 				TBuf<KMaxMessageLength> message;
   239 								
   239 								
   240 				iEikonEnv->ReadResourceL(templ, R_ADD_FEED_QUERY);
   240 				iEikonEnv->ReadResourceL(templ, R_ADD_FEED_QUERY);
   241 				message.Format(templ, &newInfo->Title());
   241 				message.Format(templ, &newInfo->Title());
   242 				if(ShowQueryMessage(message)) {
   242 				if(ShowQueryMessageL(message)) {
   243 					TBool added = iPodcastModel.FeedEngine().AddFeedL(*newInfo);
   243 					TBool added = iPodcastModel.FeedEngine().AddFeedL(*newInfo);
   244 					
   244 					
   245 					if (added)
   245 					if (added)
   246 						{					
   246 						{					
   247 						// ask if user wants to update it now
   247 						// ask if user wants to update it now
   248 						TBuf<KMaxMessageLength> message;
   248 						TBuf<KMaxMessageLength> message;
   249 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_SUCCESS);
   249 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_SUCCESS);
   250 						if(ShowQueryMessage(message))
   250 						if(ShowQueryMessageL(message))
   251 							{
   251 							{
   252 							CFeedInfo *info = iPodcastModel.FeedEngine().GetFeedInfoByUid(newInfo->Uid());
   252 							CFeedInfo *info = iPodcastModel.FeedEngine().GetFeedInfoByUid(newInfo->Uid());
   253 							
   253 							
   254 							iPodcastModel.ActiveShowList().Reset();
   254 							iPodcastModel.ActiveShowList().Reset();
   255 							iPodcastModel.SetActiveFeedInfo(info);			
   255 							iPodcastModel.SetActiveFeedInfo(info);			
   259 						}
   259 						}
   260 					else
   260 					else
   261 						{
   261 						{
   262 						TBuf<KMaxMessageLength> message;
   262 						TBuf<KMaxMessageLength> message;
   263 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_EXISTS);
   263 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_EXISTS);
   264 						ShowErrorMessage(message);
   264 						ShowErrorMessageL(message);
   265 						}		
   265 						}		
   266 				}
   266 				}
   267 				}
   267 				}
   268 			}
   268 			}
   269 			break;
   269 			break;