photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 13 Oct 2010 14:32:09 +0300
branchRCL_3
changeset 75 01504893d9cb
parent 60 5b3385a43d68
permissions -rw-r--r--
Revision: 201039 Kit: 201041
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:    Implementation of Grid view
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*/
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
// INCLUDE FILES
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include <aknbutton.h>
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
#include <StringLoader.h>
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include <AknsBasicBackgroundControlContext.h>
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
//Gallery Headers
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
#include <glxactivemedialistregistry.h>                 // For medialist registry
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
#include <glxcommandhandlers.hrh>                       // For EGlxCmdFullScreenBack                   
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
#include <glxgridviewdata.rsg>                          // Gridview resource
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
#include <mglxmedialist.h>                              // CGlxMedialist
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
#include <glxsetappstate.h>
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
#include <glxtracer.h>                                  // For Tracer
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
#include <glxlog.h>
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
// User Includes
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
#include "glxgridviewimp.h"                         
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
#include "glxgridviewmlobserver.h"                      // medialist observer for Hg Grid                
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
#include "glxgridviewcontainer.h"
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
// For transition effects
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
#include <akntranseffect.h>                             
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
#include <gfxtranseffect/gfxtranseffect.h>
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
#include "glxgfxtranseffect.h"  // For transition effects
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
const TInt KGlxToolbarButtonUnLatched = 0;              // Toolbar mark button's unlatched state defined in the rss file
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
// ======== MEMBER FUNCTIONS ========
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
// Two-phased constructor.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
CGlxGridViewImp* CGlxGridViewImp::NewL(
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
		MGlxMediaListFactory* aMediaListFactory,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
		const TGridViewResourceIds& aResourceIds,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
		TInt aViewUID,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
		const TDesC& aTitle)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
	TRACER("CGlxGridViewImp::NewL");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
	CGlxGridViewImp* self = CGlxGridViewImp::NewLC(aMediaListFactory, 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
			aResourceIds,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
			aViewUID,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
			aTitle);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
	CleanupStack::Pop(self);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
	return self;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
// Two-phased constructor.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
CGlxGridViewImp* CGlxGridViewImp::NewLC(
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
		MGlxMediaListFactory* aMediaListFactory,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
		const TGridViewResourceIds& aResourceIds,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
		TInt aViewUID,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
		const TDesC& aTitle)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
	TRACER("CGlxGridViewImp::NewLC()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
	CGlxGridViewImp* self = 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
	new (ELeave) CGlxGridViewImp(aResourceIds, aViewUID);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
	CleanupStack::PushL(self);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
	self->ConstructL(aMediaListFactory, aTitle);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
	return self;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
// C++ default constructor can NOT contain any code, that
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
// might leave.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
CGlxGridViewImp::CGlxGridViewImp(const TGridViewResourceIds& aResourceIds,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
		TInt aViewUID) :
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
		iResourceIds(aResourceIds),
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
		iViewUID(aViewUID),
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
		iPreviousFocusChangeType(NGlxListDefs::EUnknown)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
    	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
    	TRACER("CGlxGridViewImp::CGlxGridViewImp()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
    	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
// Symbian 2nd phase constructor can leave.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
//  
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
void CGlxGridViewImp::ConstructL(MGlxMediaListFactory* aMediaListFactory,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
		const TDesC& aTitle)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
	TRACER("CGlxGridViewImp::ConstructL()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
	BaseConstructL(iResourceIds.iViewId);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
	ViewBaseConstructL();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
	MLViewBaseConstructL(aMediaListFactory, aTitle);   
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
	// Get object that stores the active media list registry
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
	iActiveMediaListRegistry = CGlxActiveMediaListRegistry::InstanceL();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
// From CAknView
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
// Handles a view activation.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
void CGlxGridViewImp::DoMLViewActivateL(
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
		const TVwsViewId& /*aPrevViewId*/, 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
		TUid /* aCustomMessageId */,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
		const TDesC8& aCustomMessage)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
	TRACER("CGlxGridViewImp::DoMLViewActivateL()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
75
01504893d9cb Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 60
diff changeset
   130
    TUint transitionID = (iUiUtility->ViewNavigationDirection()==
01504893d9cb Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 60
diff changeset
   131
          EGlxNavigationForwards)?KActivateTransitionId:KFSDeActivateTransitionId; 
01504893d9cb Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 60
diff changeset
   132
    
60
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
    HBufC8* activationParam = HBufC8::NewLC(KMaxUidName);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
    activationParam->Des().AppendNum(KGlxActivationCmdShowAll);    
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
    if (aCustomMessage.Compare(activationParam->Des()) == 0) 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
    	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
		// Launched from Camera App, Check if there is any existing filter
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
    	// and clear the 'MaxCount' filter, if supported to show all images.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
		GLX_DEBUG1("CGlxGridViewImp::DoMLViewActivateL() - "
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
				"Launched From Camera");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
		CMPXFilter* filter = iMediaList->Filter();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   143
		if (filter && filter->IsSupported(KGlxFilterGeneralMaxCount))
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   144
			{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
			GLX_DEBUG1( "CGlxGridViewImp::DoMLViewActivateL()- "
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
					"Clear MaxCount filter");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
			filter->SetTObjectValueL<TInt> (KGlxFilterGeneralMaxCount, 0);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
			iMediaList->SetFilterL(filter);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
			}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
    	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
    
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
	
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
	if(StatusPane())
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
		{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
		StatusPane()->MakeVisible(ETrue);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
		CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
		CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL(
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
				TUid::Uid( EEikStatusPaneUidTitle ));     
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
		const TDesC* titleText = titlePane->Text();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
		HBufC* tempTitle = titleText->AllocLC();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
		TPtr titleptr = tempTitle->Des();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
		titleptr.Trim();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
		if(!tempTitle->Length())
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
			{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
			if( iTitletext )
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
				{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
				// Set the required Title
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
				titlePane->SetTextL( *iTitletext );
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
				}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
			}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
		CleanupStack::PopAndDestroy(tempTitle);        
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
		}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
	GlxSetAppState::SetState(EGlxInCarouselView);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
	// Setting the Context sensitive menu id
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
	MenuBar()->SetContextMenuTitleResourceId( iResourceIds.iOkOptionsMenuId );
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
	iActiveMediaListRegistry->RegisterActiveMediaList(iMediaList);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
	if(!iToolbar)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
        {
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
        iToolbar = CAknToolbar::NewL(R_GLX_GRID_VIEW_TOOLBAR);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
        SetGridToolBar(iToolbar);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
        SetToolbarObserver(this);
75
01504893d9cb Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 60
diff changeset
   183
        //Make the toolbar visible only when the medialist is populated
01504893d9cb Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 60
diff changeset
   184
        iToolbar->SetToolbarVisibility(iMediaList->IsPopulated());
60
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
        }
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
	//Create gridview container
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
	iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
            iUiUtility, *this, iToolbar);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
	iEikonEnv->AppUi()->AddToStackL(*this,iGlxGridViewContainer);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
	iUiUtility->DestroyScreenClearer();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
	
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
    // Start Animating the view when launched from other views 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
    // except if launched from Camera App.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
    if (aCustomMessage.Compare(activationParam->Des()) != 0) 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
        {
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
        GfxTransEffect::BeginFullScreen( transitionID, TRect(),
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
                                    AknTransEffect::EParameterType, 
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
                                    AknTransEffect::GfxTransParam( KPhotosUid,
75
01504893d9cb Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 60
diff changeset
   199
                                    AknTransEffect::TParameter::EEnableEffects) );	
01504893d9cb Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 60
diff changeset
   200
        GfxTransEffect::EndFullScreen();
60
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
        }	
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
	CleanupStack::PopAndDestroy(activationParam);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   204
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   205
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   206
// From CAknView
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   207
// View deactivation function.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   208
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   209
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   210
void CGlxGridViewImp::DoMLViewDeactivate()
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   211
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   212
	TRACER("CGlxGridViewImp::DoMLViewDeactivate");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   213
	if(StatusPane())
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   214
		{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   215
		if(iTitletext)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   216
			{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   217
			delete iTitletext;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   218
			iTitletext = NULL;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   219
			}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   220
		CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   221
		TRAP_IGNORE(CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL(
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   222
				TUid::Uid( EEikStatusPaneUidTitle ));        
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   223
		iTitletext = titlePane->Text()->AllocL());
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   224
		}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   225
	// Deregister active media list pointer
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   226
	iActiveMediaListRegistry->DeregisterActiveMediaList(iMediaList);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   227
	if(iToolbar)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   228
        {
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   229
         delete iToolbar;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   230
         iToolbar = NULL;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   231
		 //set the gridtoolbar to NULL in viewbase.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   232
         SetGridToolBar(iToolbar);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   233
        }
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   234
	// Destroy Grid widget before going to next view
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   235
	DestroyGridWidget();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   236
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   237
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   238
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   239
// DestroyGridWidget
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   240
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   241
//  
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   242
void CGlxGridViewImp::DestroyGridWidget()
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   243
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   244
	TRACER("CGlxGridViewImp::DestroyGridWidget()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   245
	//while view deactivating need to remove from the control stack.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   246
	iEikonEnv->AppUi()->RemoveFromViewStack(*this,iGlxGridViewContainer);        
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   247
	delete iGlxGridViewContainer;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   248
    iGlxGridViewContainer = NULL;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   249
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   250
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   251
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   252
// Destructor
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   253
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   254
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   255
CGlxGridViewImp::~CGlxGridViewImp()
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   256
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   257
	TRACER("CGlxGridViewImp::~CGlxGridViewImp");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   258
	delete iTitletext;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   259
	if(iToolbar)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   260
	    {
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   261
        delete iToolbar;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   262
        iToolbar = NULL;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   263
	    }
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   264
	if (iActiveMediaListRegistry)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   265
		{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   266
		iActiveMediaListRegistry->Close();
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   267
		}    
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   268
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   269
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   270
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   271
// From CAknView
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   272
// Returns views id.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   273
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   274
TUid CGlxGridViewImp::Id() const
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   275
{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   276
TRACER("CGlxGridViewImp::Id()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   277
return TUid::Uid(iViewUID);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   278
}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   279
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   280
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   281
// From CAknView
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   282
// Command handling function.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   283
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   284
TBool CGlxGridViewImp::HandleViewCommandL(TInt aCommand)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   285
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   286
	TRACER("CGlxGridViewImp::HandleViewCommandL()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   287
    GLX_LOG_INFO1( "CGlxGridViewImp::HandleViewCommandL(%x) entering", aCommand );
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   288
    return iGlxGridViewContainer->HandleViewCommandL(aCommand);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   289
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   290
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   291
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   292
// From CAknView
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   293
// HandleForegroundEventL
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   294
// Foreground event handling function.
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   295
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   296
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   297
void CGlxGridViewImp::HandleForegroundEventL(TBool aForeground)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   298
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   299
    TRACER("CGlxGridViewImp::HandleForegroundEventL()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   300
	if(iMMCState)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   301
	    {
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   302
        iMMCState = EFalse;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   303
        ProcessCommandL(EAknSoftkeyClose);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   304
	    }
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   305
	CAknView::HandleForegroundEventL(aForeground);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   306
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   307
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   308
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   309
// From MGlxHandleGridEvents
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   310
// HandleGridEventsL()
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   311
// handles processcommandL related commands
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   312
// -----------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   313
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   314
void CGlxGridViewImp::HandleGridEventsL(TInt aCmd)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   315
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   316
	TRACER("CGlxGridViewImp::HandleGridEventsL()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   317
	//do processcmd related event handling
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   318
	if(EAknSoftkeyClose == aCmd)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   319
	    {
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   320
        iMMCState = ETrue;
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   321
	    }
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   322
	ProcessCommandL(aCmd);
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   323
	}
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   324
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   325
// ---------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   326
// From MGlxHandleButtonMark
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   327
// HandleLatchToolbar()
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   328
// sets toolbar mark unmark status
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   329
// -----------------------------------------------------------------------------
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   330
//
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   331
void CGlxGridViewImp::HandleLatchToolbar()
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   332
	{
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   333
    TRACER("CGlxGridViewImp::HandleLatchToolbarL()");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   334
    CAknButton* markButton =
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   335
            static_cast<CAknButton*> (iToolbar->ControlOrNull(
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   336
                    EGlxCmdStartMultipleMarking));
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   337
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   338
	if(markButton)
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   339
        {
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   340
        GLX_DEBUG1("CGlxGridViewImp::HandleLatchToolbar() - UnLatch");
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   341
		markButton->SetCurrentState( KGlxToolbarButtonUnLatched, ETrue );
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   342
        }
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   343
    }
5b3385a43d68 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   344
//  End of File