application/src/PodcastQueueView.cpp
author Sebastian Brannstrom <sebastianb@symbian.org>
Thu, 21 Oct 2010 21:36:03 +0100
branch3rded
changeset 262 81bb9210fd4c
parent 186 32aedca70582
child 280 001f04bc4964
permissions -rw-r--r--
Bug 3836 - added Exit to all menus
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     1
/*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     2
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     3
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     4
* All rights reserved.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     5
* This component and the accompanying materials are made available
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     6
* under the terms of the License "Eclipse Public License v1.0"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     7
* which accompanies this distribution, and is available
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     8
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
     9
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    10
* Initial Contributors:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    11
* EmbedDev AB - initial contribution.
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    12
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    13
* Contributors:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    14
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    15
* Description:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    16
*
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    17
*/
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    18
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    19
#include "PodcastQueueView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    20
#include "PodcastAppUi.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    21
#include "ShowEngine.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    22
#include "SettingsEngine.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    23
#include "PodcastApp.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    24
#include "Constants.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    25
#include "imagehandler.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    26
#include "PodcastShowsView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    27
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    28
#include <podcast.rsg>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    29
#include <podcast.mbg>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    30
#include <gulicon.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    31
#include <barsread.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    32
#include <aknnotedialog.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    33
#include <aknmessagequerydialog.h>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    34
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    35
#define KMaxMessageLength 200
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    36
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    37
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    38
CPodcastQueueView* CPodcastQueueView::NewL(CPodcastModel& aPodcastModel)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    39
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    40
	CPodcastQueueView* self = CPodcastQueueView::NewLC(aPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    41
	CleanupStack::Pop(self);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    42
	return self;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    43
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    44
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    45
CPodcastQueueView* CPodcastQueueView::NewLC(CPodcastModel& aPodcastModel)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    46
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    47
	CPodcastQueueView* self = new ( ELeave ) CPodcastQueueView(aPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    48
	CleanupStack::PushL(self);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    49
	self->ConstructL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    50
	return self;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    51
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    52
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    53
CPodcastQueueView::CPodcastQueueView(CPodcastModel& aPodcastModel) :
60
4d230e702aa3 Moved development branch from MCL to FCL
teknolog
parents: 34
diff changeset
    54
	CPodcastShowsView(aPodcastModel)
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    55
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    56
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    57
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    58
void CPodcastQueueView::ConstructL()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    59
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    60
	BaseConstructL(R_PODCAST_QUEUEVIEW);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    61
	CPodcastListView::ConstructL();
60
4d230e702aa3 Moved development branch from MCL to FCL
teknolog
parents: 34
diff changeset
    62
4d230e702aa3 Moved development branch from MCL to FCL
teknolog
parents: 34
diff changeset
    63
	CreateIconsL();
4d230e702aa3 Moved development branch from MCL to FCL
teknolog
parents: 34
diff changeset
    64
		
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    65
	iListContainer->Listbox()->SetListBoxObserver(this);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    66
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    67
	iPodcastModel.FeedEngine().AddObserver(this);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    68
	iPodcastModel.ShowEngine().AddObserver(this);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    69
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    70
	SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    71
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    72
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    73
TKeyResponse CPodcastQueueView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    74
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    75
	if (aType == EEventKey)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    76
		{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    77
		CShowInfo *activeShow = NULL;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    78
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    79
		TInt index = iListContainer->Listbox()->CurrentItemIndex();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    80
		if(index >= 0 && index < iPodcastModel.ActiveShowList().Count())
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    81
		{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    82
			activeShow = iPodcastModel.ActiveShowList()[index];
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    83
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    84
		
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    85
		if (activeShow != NULL) {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    86
			DP1("aKeyEvent.iCode=%d", aKeyEvent.iCode);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    87
			switch (aKeyEvent.iCode) {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    88
			case EKeyBackspace:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    89
			case EKeyDelete:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    90
				HandleCommandL(EPodcastRemoveDownload);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    91
				break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    92
			default:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    93
				break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    94
			}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    95
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    96
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    97
		return CPodcastListView::OfferKeyEventL(aKeyEvent, aType);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    98
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    99
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   100
CPodcastQueueView::~CPodcastQueueView()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   101
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   102
	iPodcastModel.ShowEngine().RemoveObserver(this);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   103
	iPodcastModel.FeedEngine().RemoveObserver(this);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   104
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   105
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   106
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   107
TUid CPodcastQueueView::Id() const
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   108
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   109
	return KUidPodcastQueueViewID;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   110
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   111
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   112
void CPodcastQueueView::DoActivateL(const TVwsViewId& aPrevViewId,
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   113
		TUid aCustomMessageId, const TDesC8& aCustomMessage)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   114
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   115
	DP("CPodcastQueueView::DoActivateL BEGIN");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   116
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   117
	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
45
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 36
diff changeset
   118
	iPreviousView = aPrevViewId;
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   119
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   120
	UpdateFeedUpdateStateL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   121
	DP("CPodcastQueueView::DoActivateL END");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   122
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   123
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   124
void CPodcastQueueView::DoDeactivate()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   125
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   126
	CPodcastListView::DoDeactivate();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   127
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   128
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   129
void CPodcastQueueView::HandleListBoxEventL(CEikListBox* /*aListBox*/,
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   130
		TListBoxEvent aEventType)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   131
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   132
	switch (aEventType)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   133
		{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   134
		case EEventEnterKeyPressed:		
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   135
		case EEventItemActioned:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   136
		case EEventItemDoubleClicked:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   137
			break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   138
		default:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   139
			break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   140
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   141
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   142
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   143
void CPodcastQueueView::UpdateListboxItemsL()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   144
	{
186
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   145
	if (iListContainer->IsVisible() && !iDontUpdateList)
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   146
		{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   147
		TListItemProperties itemProps;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   148
		TInt len = 0;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   149
8
aab3aa4acdd6 Checked all TRAP_IGNORE
teknolog
parents: 4
diff changeset
   150
		iPodcastModel.GetShowsDownloadingL();
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   151
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   152
		RShowInfoArray &fItems = iPodcastModel.ActiveShowList();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   153
		len = fItems.Count();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   154
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   155
		if (iListContainer->Listbox() != NULL)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   156
			{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   157
			TBool allUidsMatch = EFalse;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   158
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   159
			if (len == iListContainer->Listbox()->Model()->NumberOfItems())
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   160
				{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   161
				allUidsMatch = ETrue;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   162
				TUint itemId = 0;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   163
				for (TInt loop = 0; loop< len; loop++)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   164
					{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   165
					itemId = iItemIdArray[loop];
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   166
					if (fItems[loop]->Uid() != itemId)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   167
						{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   168
						allUidsMatch = EFalse;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   169
						break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   170
						}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   171
					}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   172
				}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   173
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   174
			if (allUidsMatch && len > 0)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   175
				{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   176
				for (TInt loop = 0; loop< len; loop++)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   177
					{					
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   178
					UpdateShowItemDataL(fItems[loop], loop);	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   179
					iListContainer->Listbox()->DrawItem(loop);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   180
					}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   181
				}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   182
			else
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   183
				{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   184
				iListContainer->Listbox()->ItemDrawer()->ClearAllPropertiesL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   185
				iListContainer->Listbox()->Reset();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   186
				iItemIdArray.Reset();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   187
				iItemArray->Reset();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   188
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   189
				if (len > 0)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   190
					{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   191
					for (TInt i=0; i<len; i++)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   192
						{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   193
						CShowInfo *si = fItems[i];
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   194
						FormatShowInfoListBoxItemL(*si);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   195
						iItemIdArray.Append(si->Uid());						
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   196
						iItemArray->AppendL(iListboxFormatbuffer);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   197
						}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   198
					}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   199
				else
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   200
					{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   201
					iItemArray->Reset();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   202
					iItemIdArray.Reset();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   203
					
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   204
					itemProps.SetDimmed(ETrue);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   205
					itemProps.SetHiddenSelection(ETrue);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   206
					}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   207
				iListContainer->Listbox()->HandleItemAdditionL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   208
				}				
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   209
			}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   210
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   211
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   212
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   213
/** 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   214
 * Command handling function intended for overriding by sub classes. 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   215
 * Default implementation is empty.  
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   216
 * @param aCommand ID of the command to respond to. 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   217
 */
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   218
void CPodcastQueueView::HandleCommandL(TInt aCommand)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   219
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   220
	switch (aCommand)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   221
		{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   222
		case EPodcastRemoveAllDownloads:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   223
			{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   224
			TBuf<KMaxMessageLength> msg;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   225
			iEikonEnv->ReadResourceL(msg, R_CLEAR_QUERY);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   226
												
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 23
diff changeset
   227
			if(ShowQueryMessageL(msg))
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   228
				{
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 23
diff changeset
   229
				iPodcastModel.ShowEngine().RemoveAllDownloadsL();
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   230
				UpdateListboxItemsL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   231
				}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   232
			}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   233
			break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   234
		case EPodcastRemoveDownload:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   235
			{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   236
			TInt index = iListContainer->Listbox()->CurrentItemIndex();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   237
			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   238
				{
186
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   239
				// this is an ugly hack to prevent UpdateListboxItemsL from being
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   240
				// triggered from the show engine, which causes focus to jump
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   241
				// around in an ugly fashion
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   242
				iDontUpdateList = ETrue;
60
4d230e702aa3 Moved development branch from MCL to FCL
teknolog
parents: 34
diff changeset
   243
				TRAP_IGNORE(iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid()));
186
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   244
				iDontUpdateList = EFalse;
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   245
				}
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   246
			UpdateListboxItemsL();
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   247
			if (index > 0)
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   248
				{
32aedca70582 Merged queue view fix from 5th; merged Spanish language support; Updated SIS 0.90(4).
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 177
diff changeset
   249
				iListContainer->Listbox()->SetCurrentItemIndex(index - 1);
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   250
				}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   251
			}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   252
			break;
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   253
		case EPodcastMoveDownloadUp:
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   254
			{
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   255
			TInt index = iListContainer->Listbox()->CurrentItemIndex();
149
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   256
			TBool resumeAfterMove = EFalse;
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   257
			if (index == 1 && !iPodcastModel.SettingsEngine().DownloadSuspended())
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   258
				{
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   259
				iPodcastModel.ShowEngine().SuspendDownloads();
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   260
				resumeAfterMove = ETrue;
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   261
				}
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   262
			
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   263
			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   264
				{
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   265
				TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadUpL(iPodcastModel.ActiveShowList()[index]->Uid()));
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   266
				}
149
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   267
			
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   268
			if(resumeAfterMove)
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   269
				{
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   270
				iPodcastModel.ShowEngine().ResumeDownloadsL();
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   271
				}
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   272
				
173
8466fe8528b6 Minor fix for highlight move in queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 169
diff changeset
   273
			UpdateListboxItemsL();
169
9c77455964f8 Improvement to queue shifting function - move the highlight too.
Brendan Donegan <brendand@symbian.org>
parents: 164
diff changeset
   274
			iListContainer->Listbox()->SetCurrentItemIndex(index - 1);
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   275
			}
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   276
			break;
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   277
		case EPodcastMoveDownloadDown:
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   278
			{
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   279
			TInt index = iListContainer->Listbox()->CurrentItemIndex();
149
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   280
			TBool resumeAfterMove = EFalse;
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   281
			if (index == 0 && !iPodcastModel.SettingsEngine().DownloadSuspended())
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   282
				{
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   283
				iPodcastModel.ShowEngine().SuspendDownloads();
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   284
				resumeAfterMove = ETrue;
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   285
				}
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   286
			
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   287
			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   288
				{
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   289
				TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadDownL(iPodcastModel.ActiveShowList()[index]->Uid()));
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   290
				}
149
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   291
			
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   292
			if(resumeAfterMove)
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   293
				{
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   294
				iPodcastModel.ShowEngine().ResumeDownloadsL();
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   295
				}
70b2f592a460 Enabled Brendan's download queue operations; Fixed minor bug in queue swapping method
teknolog
parents: 146
diff changeset
   296
			
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   297
			UpdateListboxItemsL();
173
8466fe8528b6 Minor fix for highlight move in queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 169
diff changeset
   298
			iListContainer->Listbox()->SetCurrentItemIndex(index + 1);
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   299
			}
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   300
			break;
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   301
		case EPodcastSuspendDownloads:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   302
			{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   303
			iPodcastModel.ShowEngine().SuspendDownloads();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   304
			UpdateListboxItemsL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   305
			}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   306
			break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   307
		case EPodcastResumeDownloads:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   308
			{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   309
			iPodcastModel.ShowEngine().ResumeDownloadsL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   310
			UpdateListboxItemsL();
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   311
			}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   312
			break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   313
		default:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   314
			CPodcastListView::HandleCommandL(aCommand);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   315
			break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   316
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   317
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   318
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   319
void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   320
	{
177
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   321
	if(aResourceId == R_QUEUE_SHOW_MENU)
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   322
		{
177
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   323
		TBool dimDown = (iListContainer->Listbox()->CurrentItemIndex() >= iPodcastModel.ActiveShowList().Count() - 1 ?
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   324
				ETrue : EFalse);
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   325
		TBool dimUp = (iListContainer->Listbox()->CurrentItemIndex() <= 0 ?
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   326
				ETrue : EFalse);
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   327
		
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   328
		aMenuPane->SetItemDimmed(EPodcastMoveDownloadDown, dimDown);
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   329
		aMenuPane->SetItemDimmed(EPodcastMoveDownloadUp, dimUp);
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   330
		}
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   331
	else if (aResourceId == R_PODCAST_QUEUEVIEW_MENU)
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   332
		{
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   333
		aMenuPane->SetItemDimmed(EPodcastQueueShowMenu, iPodcastModel.ActiveShowList().Count() == 0);
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   334
		aMenuPane->SetItemDimmed(EPodcastRemoveAllDownloads, iPodcastModel.ActiveShowList().Count() == 0);
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   335
		aMenuPane->SetItemDimmed(EPodcastSuspendDownloads, iPodcastModel.SettingsEngine().DownloadSuspended());
269e3f3e544a Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 175
diff changeset
   336
		aMenuPane->SetItemDimmed(EPodcastResumeDownloads, !iPodcastModel.SettingsEngine().DownloadSuspended());				
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   337
		}
145
cc0182a5da39 Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents: 70
diff changeset
   338
	}