application/src/PodcastQueueView.cpp
branchRCL_3
changeset 367 4b75876aa85a
parent 320 e3ec8e436951
child 368 b131f7696342
equal deleted inserted replaced
342:9441fb8fd60d 367:4b75876aa85a
    29 #include <podcast.mbg>
    29 #include <podcast.mbg>
    30 #include <gulicon.h>
    30 #include <gulicon.h>
    31 #include <barsread.h>
    31 #include <barsread.h>
    32 #include <aknnotedialog.h>
    32 #include <aknnotedialog.h>
    33 #include <aknmessagequerydialog.h>
    33 #include <aknmessagequerydialog.h>
       
    34 #include <akntitle.h>
    34 
    35 
    35 #define KMaxMessageLength 200
    36 #define KMaxMessageLength 200
    36 
    37 
    37 
    38 
    38 CPodcastQueueView* CPodcastQueueView::NewL(CPodcastModel& aPodcastModel)
    39 CPodcastQueueView* CPodcastQueueView::NewL(CPodcastModel& aPodcastModel)
   113 	{
   114 	{
   114 	DP("CPodcastQueueView::DoActivateL BEGIN");
   115 	DP("CPodcastQueueView::DoActivateL BEGIN");
   115 	
   116 	
   116 	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
   117 	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
   117 	iPreviousView = aPrevViewId;
   118 	iPreviousView = aPrevViewId;
   118 	
   119 	UpdateViewTitleL();
   119 	UpdateFeedUpdateStateL();
   120 	UpdateFeedUpdateStateL();
   120 	UpdateToolbar();
   121 	UpdateToolbar();
   121 	DP("CPodcastQueueView::DoActivateL END");
   122 	DP("CPodcastQueueView::DoActivateL END");
   122 	}
   123 	}
   123 
   124 
   142 		UpdateToolbar();
   143 		UpdateToolbar();
   143 	}
   144 	}
   144 
   145 
   145 void CPodcastQueueView::UpdateListboxItemsL()
   146 void CPodcastQueueView::UpdateListboxItemsL()
   146 	{
   147 	{
       
   148 	DP("CPodcastQueueView::UpdateListboxItemsL BEGIN");
   147 	if (iListContainer->IsVisible() && !iDontUpdateList)
   149 	if (iListContainer->IsVisible() && !iDontUpdateList)
   148 		{
   150 		{
   149 		TListItemProperties itemProps;
   151 		TListItemProperties itemProps;
   150 		TInt len = 0;
   152 		TInt len = 0;
   151 
   153 
   211 					}
   213 					}
   212 				iListContainer->Listbox()->HandleItemAdditionL();
   214 				iListContainer->Listbox()->HandleItemAdditionL();
   213 				}				
   215 				}				
   214 			}
   216 			}
   215 		}
   217 		}
       
   218 	DP("CPodcastQueueView::UpdateListboxItemsL END");
   216 	}
   219 	}
   217 
   220 
   218 /** 
   221 /** 
   219  * Command handling function intended for overriding by sub classes. 
   222  * Command handling function intended for overriding by sub classes. 
   220  * Default implementation is empty.  
   223  * Default implementation is empty.  
   368 		toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue);
   371 		toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue);
   369 		toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue);	
   372 		toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue);	
   370 		toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue);		
   373 		toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue);		
   371 		}
   374 		}
   372 	}
   375 	}
       
   376 
       
   377 void CPodcastQueueView::UpdateViewTitleL()
       
   378 	{
       
   379 	 CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
       
   380 		      ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
       
   381 		 
       
   382 	HBufC *title = iEikonEnv->AllocReadResourceLC(R_DOWNLOAD_QUEUE);
       
   383 	titlePane->SetTextL(*title);
       
   384 	CleanupStack::PopAndDestroy(title);
       
   385 	}