application/src/PodcastAppui.cpp
author Sebastian Brannstrom <sebastianb@symbian.org>
Sun, 14 Nov 2010 13:05:37 +0000
branchRCL_3
changeset 367 4b75876aa85a
parent 304 9d25c062a380
permissions -rw-r--r--
Added new shows list
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 "PodcastAppui.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    20
#include <Podcast.rsg>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    21
#include "Podcast.hrh"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    22
#include "PodcastFeedView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    23
#include "PodcastShowsView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    24
#include "PodcastQueueView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    25
#include "PodcastSettingsView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    26
#include "PodcastSearchView.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    27
#include "ShowEngine.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    28
#include "PodcastModel.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    29
#include "debug.h"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    30
#include "..\help\podcatcher.hlp.hrh"
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    31
#include "PodcastApp.h"
104
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
    32
#include <APGWGNAM.H>
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    33
#include <HLPLCH.H>
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    34
#include <avkon.hrh>
272
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
    35
#include "Podcast.mbg"
2
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
const TUint KDelayLaunch = 1000;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    38
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    39
CPodcastAppUi::CPodcastAppUi(CPodcastModel* aPodcastModel):iPodcastModel(aPodcastModel)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    40
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    41
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    42
	}
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
void CPodcastAppUi::ConstructL()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    45
    {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    46
    DP("CPodcastAppUi::ConstructL() BEGIN");
243
44d205147a83 Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 203
diff changeset
    47
    BaseConstructL(CAknAppUi::EAknEnableSkin | CAknAppUi::EAknEnableMSK | 
44d205147a83 Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 203
diff changeset
    48
    		CAknAppUi::EAknSingleClickCompatible | CAknAppUi::EAknTouchCompatible ); 
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    49
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
    50
    iPodcastModel->ConnectionEngine().AddObserver(this);
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
    51
    
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    52
    DP("Constructing FeedView");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    53
	iFeedView = CPodcastFeedView::NewL(*iPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    54
	this->AddViewL(iFeedView);
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
    DP("Constructing ShowsView");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    57
	iShowsView = CPodcastShowsView::NewL(*iPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    58
	this->AddViewL(iShowsView);
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
    DP("Constructing QueueView");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    61
    iQueueView = CPodcastQueueView::NewL(*iPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    62
	this->AddViewL(iQueueView);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    63
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    64
    DP("Constructing SearchView");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    65
	iSearchView = CPodcastSearchView::NewL(*iPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    66
	this->AddViewL(iSearchView);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    67
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    68
    DP("Constructing SettingsView");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    69
	iSettingsView = CPodcastSettingsView::NewL(*iPodcastModel);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    70
	this->AddViewL(iSettingsView);
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
	iNaviPane =( CAknNavigationControlContainer * ) StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    73
	NaviShowTabGroupL();
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
	// start a timer to let ConstructL finish before we display any dialogs or start downloading
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    76
	// this provides another entry point in HandleTimeout below
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    77
	iStartTimer = CTimeout::NewL(*this);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    78
	iStartTimer->After(KDelayLaunch);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    79
    DP("CPodcastAppUi::ConstructL() END");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    80
    }
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
CPodcastAppUi::~CPodcastAppUi()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    83
    {
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    84
    if (iNaviStyle != ENaviEmpty)
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    85
    	{
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    86
    	iNaviPane->Pop();
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    87
    	}
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    88
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    89
    if(iNaviTabGroup)
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    90
    	{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    91
    	delete iNaviTabGroup;
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    92
    	}
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    93
    
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    94
    if (iNaviText)
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    95
    	{
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    96
    	delete iNaviText;
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    97
    	}
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
    98
    
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
    99
	delete iStartTimer;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   100
    }
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
// -----------------------------------------------------------------------------
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   103
// CPodcastAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   104
//  This function is called by the EIKON framework just before it displays
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   105
//  a menu pane. Its default implementation is empty, and by overriding it,
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   106
//  the application can set the state of menu items dynamically according
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   107
//  to the state of application data.
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
//
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   110
void CPodcastAppUi::DynInitMenuPaneL(
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   111
    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   112
    {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   113
    // no implementation required 
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
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
// CPodcastAppUi::HandleCommandL(TInt aCommand)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   118
// takes care of command handling
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
//
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   121
void CPodcastAppUi::HandleCommandL( TInt aCommand )
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
    switch ( aCommand )
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   124
        {
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   125
        case EAknSoftkeyExit:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   126
            {
292
655dbce90b70 Added check and query when downloading is active while trying to exit
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 272
diff changeset
   127
            iFeedView->CheckConfirmExit();
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   128
            break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   129
            }
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   130
        case EEikCmdExit:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   131
        	{
104
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   132
        	// we want to prevent red button from closing podcatcher, and
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   133
        	// instead we send it to background
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   134
        	// however, we want to respect the task manager (fast swap) close
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   135
        	// command, so we check if task manager is the focussed window group
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   136
        	
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   137
        	RWsSession& ws = iEikonEnv->WsSession();
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   138
			TInt wgid = ws.GetFocusWindowGroup();
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   139
			CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid);
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   140
			TUid activeAppUid = gn->AppUid();
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   141
			CleanupStack::PopAndDestroy(gn);
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   142
        	
203
cc2d961dbe57 S^3 has a different UID for the new task switcher
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 155
diff changeset
   143
			const TUid KUidFastSwapS3 = { 0x20016BF0 };
cc2d961dbe57 S^3 has a different UID for the new task switcher
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 155
diff changeset
   144
			if (activeAppUid == KUidFastSwapS3)
104
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   145
				{
302
cf14797d0023 Fix for broken check for active downloads when exiting
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 292
diff changeset
   146
				DP("Exit called by task manager");
104
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   147
				// closed by task manager
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   148
				Exit();
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   149
				}
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   150
			else
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   151
        		{
302
cf14797d0023 Fix for broken check for active downloads when exiting
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 292
diff changeset
   152
				DP("Red button pressed, going into background");
104
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   153
        		// red button pressed
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   154
				TApaTask task(iEikonEnv->WsSession());
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   155
				task.SetWgId(iEikonEnv->RootWin().Identifier());
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   156
				task.SendToBackground(); 
4d1286f7f982 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents: 99
diff changeset
   157
        		}   		
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   158
			break;
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   159
        	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   160
	case EPodcastHelp:
48
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   161
        	{	
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   162
        	HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), HelpContextL());
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   163
        	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   164
        	break;      	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   165
        default:
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   166
            break;      
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
    }
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   169
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   170
CArrayFix<TCoeHelpContext>* CPodcastAppUi::HelpContextL() const
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
    CArrayFixFlat<TCoeHelpContext>* array = 
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   173
                new(ELeave)CArrayFixFlat<TCoeHelpContext>(1);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   174
    CleanupStack::PushL(array);
48
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   175
    
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   176
    if (iFeedView->IsVisible()) {
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   177
		array->AppendL(TCoeHelpContext(KUidPodcast,KContextFeedsView));
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   178
    } else if (iShowsView->IsVisible()) {
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   179
		array->AppendL(TCoeHelpContext(KUidPodcast,KContextShowsView));
140
68b48f53a8ec Updated help files merged from symbian1 branch
teknolog
parents: 137
diff changeset
   180
    } else if (iSearchView->IsVisible()) {
68b48f53a8ec Updated help files merged from symbian1 branch
teknolog
parents: 137
diff changeset
   181
		array->AppendL(TCoeHelpContext(KUidPodcast,KContextSearch));
48
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   182
    } else if (iQueueView->IsVisible()) {
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   183
		array->AppendL(TCoeHelpContext(KUidPodcast,KContextDownloadQueue));
f8fd68d71cfd Fixed context sensitive help. Ticket #2089
teknolog
parents: 24
diff changeset
   184
    } else {
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   185
		array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings));
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   186
    }
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   187
	
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   188
    CleanupStack::Pop(array);
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   189
    return array;
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
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   192
void CPodcastAppUi::NaviSetTextL(TInt aResourceId)
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   193
	{
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   194
	
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   195
	if (iNaviStyle != ENaviEmpty) {
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   196
		iNaviPane->Pop();
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   197
	}
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   198
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   199
	HBufC* naviText =  iEikonEnv->AllocReadResourceLC(aResourceId);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   200
	iNaviText  = iNaviPane->CreateNavigationLabelL(*naviText);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   201
	
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   202
	iNaviPane->PushL(*iNaviText);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   203
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   204
	CleanupStack::PopAndDestroy(naviText);	
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   205
	
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   206
	iNaviStyle = ENaviText;
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   207
	}
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   208
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   209
void CPodcastAppUi::NaviShowTabGroupL()
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   210
	{
272
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   211
	iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviPane->ResourceDecorator()->DecoratedControl());
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   212
	iTabGroup->SetObserver(this); 
367
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   213
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   214
	iNaviStyle = ENaviTabGroup;
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   215
	UpdateQueueTabL(iPodcastModel->ShowEngine().GetNumDownloadingShows());
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   216
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   217
367
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   218
void CPodcastAppUi::SetTabsDimmed(TBool aDimmed)
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   219
	{
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   220
	iTabGroup->SetDimmed(aDimmed);
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   221
	}
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   222
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   223
void CPodcastAppUi::TabChangedL (TInt aIndex)
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   224
	{
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   225
	DP("CPodcastListView::TabChangedL ");
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   226
	
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   227
	if (iNaviStyle == ENaviTabGroup)
11
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   228
		{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   229
		TUid newview = TUid::Uid(0);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   230
		TUid messageUid = TUid::Uid(0);
49
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   231
		if (aIndex == KTabIdFeeds) 
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   232
			{
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   233
			if (iFeedView->ViewingShows())
45
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 35
diff changeset
   234
				{
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 35
diff changeset
   235
				newview = KUidPodcastShowsViewID;
367
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   236
				messageUid = TUid::Uid(2);
45
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 35
diff changeset
   237
				}
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 35
diff changeset
   238
			else
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 35
diff changeset
   239
				{
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 35
diff changeset
   240
				newview = KUidPodcastFeedViewID;
56d4e0784e5d Nicer way to handle back from queue view to feed/show view
teknolog
parents: 35
diff changeset
   241
				}
49
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   242
			} 
367
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   243
		else if (aIndex == KTabIdNew)
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   244
			{
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   245
			newview = KUidPodcastShowsViewID;
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   246
			messageUid = KUidShowNewShows;
4b75876aa85a Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 304
diff changeset
   247
			}
49
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   248
		else if (aIndex == KTabIdQueue)
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   249
			{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   250
			newview = KUidPodcastQueueViewID;
49
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   251
			} 
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   252
		else 
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   253
			{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   254
			User::Leave(KErrTooBig);
49
43e204e6ae2e Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents: 48
diff changeset
   255
			}
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   256
		
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   257
		if(newview.iUid != 0)
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   258
			{			
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   259
			ActivateLocalViewL(newview,  messageUid, KNullDesC8());
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   260
			}
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   261
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   262
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   263
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   264
void CPodcastAppUi::SetActiveTab(TInt aIndex) {
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   265
	if (iNaviStyle == ENaviTabGroup)
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   266
		{
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   267
		iTabGroup->SetActiveTabByIndex(aIndex);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   268
		}
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   269
}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   270
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   271
void CPodcastAppUi::HandleTimeoutL(const CTimeout& /*aId*/, TInt /*aError*/)
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   272
	{
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   273
	iFeedView->CheckResumeDownloadL();
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   274
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   275
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   276
void CPodcastAppUi::UpdateQueueTabL(TInt aQueueLength)
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   277
	{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   278
	if (iNaviStyle == ENaviTabGroup)
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   279
		{
272
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   280
		CFbsBitmap* bitmap;
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   281
		CFbsBitmap* mask;
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   282
		if (aQueueLength == 0)
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   283
			{
272
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   284
			AknIconUtils::CreateIconL(bitmap,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   285
			                          mask,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   286
			                          iEikonEnv->EikAppUi()->Application()->BitmapStoreName(),
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   287
			                          EMbmPodcastTab_queue,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   288
			                          EMbmPodcastTab_queue_mask);
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   289
			}
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   290
		else if (aQueueLength == 1)
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   291
			{
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   292
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   293
			AknIconUtils::CreateIconL(bitmap,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   294
			                          mask,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   295
			                          iEikonEnv->EikAppUi()->Application()->BitmapStoreName(),
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   296
			                          EMbmPodcastTab_queue1,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   297
			                          EMbmPodcastTab_queue1_mask);
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   298
			}
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   299
		else if (aQueueLength == 2)
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   300
			{
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   301
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   302
			AknIconUtils::CreateIconL(bitmap,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   303
			                          mask,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   304
			                          iEikonEnv->EikAppUi()->Application()->BitmapStoreName(),
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   305
			                          EMbmPodcastTab_queue2,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   306
			                          EMbmPodcastTab_queue2_mask);
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   307
			}
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   308
		else
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   309
			{
272
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   310
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   311
			AknIconUtils::CreateIconL(bitmap,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   312
			                          mask,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   313
			                          iEikonEnv->EikAppUi()->Application()->BitmapStoreName(),
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   314
			                          EMbmPodcastTab_queue3,
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   315
			                          EMbmPodcastTab_queue3_mask);
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   316
			}
272
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   317
e6d095ba6756 Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 243
diff changeset
   318
			iTabGroup->ReplaceTabL(EPodcastTabQueue, bitmap, mask);
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   319
		}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   320
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   321
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   322
void CPodcastAppUi::TabLeftL()
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   323
	{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   324
	if (iNaviStyle == ENaviTabGroup) 
11
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   325
		{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   326
		TInt ati = iTabGroup->ActiveTabIndex();
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   327
		if(ati > 0)
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   328
			{
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   329
			SetActiveTab(ati-1);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   330
			TabChangedL(ati-1);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   331
			}
11
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   332
		}
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   333
	}
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   334
35
66c5303f3610 A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents: 24
diff changeset
   335
void CPodcastAppUi::TabRightL()
2
29cda98b007e Initial import of Podcatcher from the Bergamot project
skip
parents:
diff changeset
   336
	{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   337
	if (iNaviStyle == ENaviTabGroup) 
11
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   338
		{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   339
		TInt ati = iTabGroup->ActiveTabIndex();
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   340
		if(ati < iTabGroup->TabCount()-1)
11
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   341
			{
24
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   342
			SetActiveTab(ati+1);
ca50ea154990 Moved search result title to navipane. Fixed but 1832
teknolog
parents: 16
diff changeset
   343
			TabChangedL(ati+1);
11
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   344
			}
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   345
		}
f6c975c3b702 Work to handle tabs in search view
teknolog
parents: 2
diff changeset
   346
	}
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   347
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   348
void CPodcastAppUi::ConnectionSelectionStart()
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   349
	{
155
4ec84fbc7b27 Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents: 140
diff changeset
   350
	DP("CPodcastAppUi::ConnectionSelectionStart() BEGIN");
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   351
	iFeedView->UpdateToolbar(EFalse);
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   352
	iShowsView->UpdateToolbar(EFalse);
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   353
	iQueueView->UpdateToolbar(EFalse);
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   354
	iSearchView->UpdateToolbar(EFalse);
155
4ec84fbc7b27 Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents: 140
diff changeset
   355
	DP("CPodcastAppUi::ConnectionSelectionStart() END");
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   356
	}
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   357
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   358
void CPodcastAppUi::ConnectionSelectionEnd()
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   359
	{
155
4ec84fbc7b27 Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents: 140
diff changeset
   360
	DP("CPodcastAppUi::ConnectionSelectionEnd() BEGIN");
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   361
	iFeedView->UpdateToolbar(ETrue);
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   362
	iShowsView->UpdateToolbar(ETrue);
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   363
	iQueueView->UpdateToolbar(ETrue);
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   364
	iSearchView->UpdateToolbar(ETrue);
155
4ec84fbc7b27 Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents: 140
diff changeset
   365
	DP("CPodcastAppUi::ConnectionSelectionEnd() END");
13
f58e3c482bd9 Toolbars now hide when connection query appears
teknolog
parents: 11
diff changeset
   366
	}
115
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   367
117
3b59b88b089e Fixed Code Scanner L-issues; Further improvements to HTTP robustness
teknolog
parents: 115
diff changeset
   368
void CPodcastAppUi::GetErrorTextL(TDes &aErrorMessage, TInt aErrorCode)
115
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   369
	{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   370
	switch (aErrorCode)
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   371
		{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   372
		case KErrNotFound:
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   373
			{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   374
			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_INVALID_ADDRESS);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   375
			aErrorMessage.Copy(*error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   376
			CleanupStack::PopAndDestroy(error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   377
			}
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   378
			break;
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   379
		case KErrDiskFull:
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   380
			{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   381
			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_DISK_FULL);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   382
			aErrorMessage.Copy(*error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   383
			CleanupStack::PopAndDestroy(error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   384
			}
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   385
			break;
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   386
		case 404:
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   387
			{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   388
			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   389
			aErrorMessage.Copy(*error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   390
			CleanupStack::PopAndDestroy(error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   391
			}
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   392
			break;
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   393
		default:
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   394
			{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   395
			if (aErrorCode > 200)
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   396
				{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   397
				HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   398
				aErrorMessage.Format(*error, aErrorCode);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   399
				CleanupStack::PopAndDestroy(error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   400
				}
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   401
			else
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   402
				{
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   403
				HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   404
				aErrorMessage.Format(*error, aErrorCode);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   405
				CleanupStack::PopAndDestroy(error);
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   406
				}
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   407
			}
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   408
			break;
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   409
		}
d87e984bd8b8 Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents: 104
diff changeset
   410
	}