iaupdate/IAD/ui/src/iaupdatemainview.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 13 Oct 2010 14:40:19 +0300
branchRCL_3
changeset 81 42552535c1ac
parent 66 8b7f4e561641
permissions -rw-r--r--
Revision: 201038 Kit: 201041
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
     2
* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    14
* Description:   This module contains the implementation of CIAUpdateMainView class 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    15
*                member functions.
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
*/
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    19
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    20
 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    21
#include <eikmenup.h>
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    22
#include <aknViewAppUi.h> 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    23
#include <akntitle.h> 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    24
#include <aknnavi.h> // CAknNavigationControlContainer
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    25
#include <aknnavide.h> // CAknNavigationDecorator
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    26
#include <AknUtils.h>
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    27
#include <aknmessagequerydialog.h>      // CAknMessageQueryDialog
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    28
#include <akntoolbar.h> 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    29
#include <StringLoader.h>
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    30
#include <featmgr.h>  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    31
#include <iaupdate.rsg>
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    33
#include "iaupdate.hrh"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    34
#include "iaupdatemainview.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    35
#include "iaupdatemaincontainer.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    36
#include "iaupdatenode.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    37
#include "iaupdatefwnode.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    38
#include "iaupdatebasenode.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    39
#include "iaupdatedialogutil.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    40
#include "iaupdatestatusdialog.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    41
#include "iaupdateappui.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    42
#include "iaupdateuicontroller.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    43
#include "iaupdatedeputils.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    44
#include "iaupdatedebug.h"
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    45
#include "iaupdatefwupdatehandler.h"
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    47
//CONSTANTS
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    48
const TInt KKiloByte = 1024;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    49
const TInt KMegaByte = 1024 * 1024;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    50
const TInt KMaxShownInKiloBytes = 10 * KMegaByte;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    51
const TInt KSelInfoArrayGranularity = 3;
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    52
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    53
//MACROS
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    54
_LIT( KSpace, " " );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    55
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    56
// ============================ MEMBER FUNCTIONS ===============================
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    60
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    61
// CIAUpdateMainView::NewL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    62
// Two-phased constructor.
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    63
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    64
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    65
CIAUpdateMainView* CIAUpdateMainView::NewL( const TRect& aRect )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    66
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    67
    CIAUpdateMainView* self = CIAUpdateMainView::NewLC( aRect );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    68
    CleanupStack::Pop(self);
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    69
    return self;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    70
    }
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    72
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    73
// CIAUpdateMainView::NewLC
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    74
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    75
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    76
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    77
CIAUpdateMainView* CIAUpdateMainView::NewLC( const TRect& aRect )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    78
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    79
    CIAUpdateMainView* self = new (ELeave) CIAUpdateMainView();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    80
    CleanupStack::PushL( self );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    81
    self->ConstructL( aRect );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    82
    return self;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    83
    }
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
// -----------------------------------------------------------------------------
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    86
// CIAUpdateMainView::CIAUpdateMainView
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    87
// C++ default constructor can NOT contain any code, that
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    88
// might leave.
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    89
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    90
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    91
CIAUpdateMainView::CIAUpdateMainView()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    92
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    93
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    94
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    95
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    96
// CIAUpdateMainView::~CIAUpdateMainView
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    97
// Destructor
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    98
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
    99
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   100
CIAUpdateMainView::~CIAUpdateMainView()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   101
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   102
    delete iDecorator;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   103
    iAllNodes.Close();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   104
    if ( iContainer )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   105
        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   106
    	AppUi()->RemoveFromStack( iContainer );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   107
    	delete iContainer;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   108
        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   109
    delete iFwUpdateHandler;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   110
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   111
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   112
// CIAUpdateMainView::ConstructL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   113
// Symbian 2nd phase constructor can leave.
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   114
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   115
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   116
void CIAUpdateMainView::ConstructL( const TRect& /*aRect*/ )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   117
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   118
    BaseConstructL( R_IAUPDATE_MAIN_VIEW );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   119
    Toolbar()->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   120
    Toolbar()->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, ETrue, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   121
    Toolbar()->SetItemDimmed( EIAUpdateCmdUpdateHistory, ETrue, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   122
    Toolbar()->SetToolbarObserver( this ); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   123
    iFwUpdateHandler = CIAUpdateFWUpdateHandler::NewL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   124
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   125
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   126
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   127
// CIAUpdateMainView::RefreshL
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   128
// Refreshes update list
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   129
// -----------------------------------------------------------------------------
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   130
//    
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   131
void CIAUpdateMainView::RefreshL( const RPointerArray<MIAUpdateNode>& aNodes,
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   132
                                  const RPointerArray<MIAUpdateFwNode>& aFwNodes,
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   133
                                  TInt aError  )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   134
    {   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   135
    IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL begin");
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   136
    iRefreshError = aError;    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   137
    iAllNodes.Reset();
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   138
        
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   139
    if ( aFwNodes.Count() > 0 )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   140
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   141
        IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL hard code importance");
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   142
        //hardcode the importance of firmware as Critical
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   143
        for ( TInt i = 0; i < aFwNodes.Count(); i++ )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   144
             {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   145
             aFwNodes[i]->Base().SetImportance( MIAUpdateBaseNode::ECritical );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   146
             }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   147
         
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   148
        //either NSU or FOTA available
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   149
        if ( aFwNodes.Count() == 1 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   150
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   151
            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL either NSU or FOTA available");
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   152
            MIAUpdateAnyNode* node = aFwNodes[0];
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   153
            User::LeaveIfError( iAllNodes.Append( node ) );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   154
            }
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   155
        
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   156
        //both NSU and FOTA available, show only FOTA node
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   157
        if ( aFwNodes.Count() == 2 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   158
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   159
            IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL both NSU and FOTA available");
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   160
            MIAUpdateAnyNode* node1 = aFwNodes[0];
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   161
            MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( node1 );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   162
            if ( fwnode->FwType() == MIAUpdateFwNode::EFotaDp2  )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   163
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   164
                User::LeaveIfError( iAllNodes.Append( node1 ) );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   165
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   166
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   167
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   168
                MIAUpdateAnyNode* node2 = aFwNodes[1];
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   169
                User::LeaveIfError( iAllNodes.Append( node2 ) );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   170
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   171
            }
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   172
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   173
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   174
   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   175
    for( TInt i = 0; i < aNodes.Count(); ++i ) 
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   176
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   177
        MIAUpdateAnyNode* node = aNodes[i];
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   178
        User::LeaveIfError( iAllNodes.Append( node ) );
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   179
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   180
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   181
    if( iContainer )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   182
        {        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   183
        iContainer->RefreshL( iAllNodes, iRefreshError );  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   184
        SetSelectedIndicesL();     
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   185
        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   186
        }    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   187
     Toolbar()->SetItemDimmed( EIAUpdateCmdUpdateHistory, EFalse, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   188
     }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   189
    
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   190
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   191
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   192
// CIAUpdateMainView::GetCurrentNode
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   193
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   194
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   195
//    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   196
MIAUpdateAnyNode* CIAUpdateMainView::GetCurrentNode()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   197
   {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   198
   if ( iContainer )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   199
      {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   200
   	  return iContainer->GetCurrentNode( iAllNodes ); 	 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   201
      }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   202
   return NULL;   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   203
   }
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   204
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   205
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   206
// CIAUpdateMainView::GetSelectedNode
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   207
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   208
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   209
//    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   210
MIAUpdateAnyNode* CIAUpdateMainView::GetSelectedNode()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   211
   {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   212
   MIAUpdateAnyNode* selectedNode = NULL;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   213
   for( TInt i = 0; i < iAllNodes.Count() && !selectedNode ; ++i )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   214
       {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   215
       if ( iAllNodes[i]->Base().IsSelected() )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   216
           {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   217
           selectedNode = iAllNodes[i];
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   218
           }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   219
       }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   220
    return selectedNode;   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   221
   }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   222
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   223
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   224
// CIAUpdateMainView::Id
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   225
// Get Uid of this view
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   226
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   227
//       
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   228
TUid CIAUpdateMainView::Id() const
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   229
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   230
    return TUid::Uid( EIAUpdateMainViewId );
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   231
    }
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   232
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   233
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   234
// CIAUpdateMainView::HandleCommandL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   235
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   236
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   237
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   238
void CIAUpdateMainView::HandleCommandL( TInt aCommand )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   239
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   240
    switch( aCommand ) 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   241
        {  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   242
        case EIAUpdateCmdStartUpdate:
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   243
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   244
            RPointerArray<MIAUpdateAnyNode> selectedNodes;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   245
            CleanupClosePushL( selectedNodes );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   246
            GetSelectedNodesL( selectedNodes ); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   247
            if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   248
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   249
                //the marking logic will make sure firmware won't be marked with normal sis updates
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   250
                //at the same time.
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   251
                iFwUpdateHandler->FirmWareUpdatewithFOTA();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   252
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   253
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   254
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   255
                AppUi()->HandleCommandL( aCommand );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   256
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   257
            CleanupStack::PopAndDestroy( &selectedNodes );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   258
            break;    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   259
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   260
        case EIAUpdateCmdUpdateWithPC:
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   261
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   262
            iFwUpdateHandler->FirmWareUpdatewithNSU();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   263
            break;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   264
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   265
        case EIAUpdateCmdSettings:
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   266
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   267
            Toolbar()->SetToolbarVisibility( EFalse );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   268
            AppUi()->HandleCommandL( aCommand );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   269
            Toolbar()->SetToolbarVisibility( ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   270
            break;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   271
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   272
        case EAknSoftkeyMark:
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   273
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   274
            iContainer->HandleMarkCommandL( EAknCmdMark );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   275
            break;	
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   276
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   277
        case EAknSoftkeyUnmark:
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   278
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   279
            iContainer->HandleMarkCommandL( EAknCmdUnmark );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   280
            break;	
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   281
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   282
        case EAknCmdMark:        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   283
        case EAknCmdUnmark:
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   284
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   285
            iContainer->HandleMarkCommandL( aCommand );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   286
            break;	
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   287
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   288
        default:
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   289
            { 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   290
            AppUi()->HandleCommandL( aCommand );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   291
            break;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   292
            }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   293
        }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   294
    }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   295
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   296
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   297
// CIAUpdateMainView::DynInitMenuPaneL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   298
// Dim options which are not availble in empty list.
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   299
// Set Mark/Unmark option
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   300
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   301
//    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   302
void CIAUpdateMainView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   303
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   304
    if( aResourceId == R_IAUPDATE_MAIN_MENU ) 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   305
        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   306
        if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   307
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   308
            aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   309
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   310
        RPointerArray<MIAUpdateAnyNode> selectedNodes;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   311
        CleanupClosePushL( selectedNodes );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   312
        GetSelectedNodesL( selectedNodes ); 
81
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   313
        
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   314
        
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   315
        MIAUpdateAnyNode* currentNode = iContainer->GetCurrentNode( iAllNodes ); 
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   316
        if( currentNode )
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   317
            {
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   318
            TBool selected = EFalse; 
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   319
            for( TInt i = 0; i < selectedNodes.Count() && !selected; ++i ) 
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   320
                {
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   321
                MIAUpdateAnyNode* node = selectedNodes[i];
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   322
                if( node == currentNode )
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   323
                    {
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   324
                    selected = ETrue;
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   325
                    }
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   326
                }  
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   327
            if ( selected )
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   328
                {
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   329
                aMenuPane->SetItemDimmed( EAknCmdMark, ETrue ); 
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   330
                }   
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   331
            else
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   332
                {
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   333
                aMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue );   
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   334
                } 
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   335
            }
42552535c1ac Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 66
diff changeset
   336
        
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   337
        if ( selectedNodes.Count() )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   338
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   339
            if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   340
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   341
                //firmware is selected
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   342
                MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( selectedNodes[0] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   343
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   344
                if ( node->FwType() == MIAUpdateFwNode::EFotaDp2 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   345
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   346
                    aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   347
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   348
                    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   349
                if ( node->FwType() == MIAUpdateFwNode::EFotiNsu )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   350
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   351
                    aMenuPane->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   352
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   353
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   354
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   355
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   356
                //firmware is not selected, only sis
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   357
                aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   358
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   359
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   360
        else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   361
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   362
            aMenuPane->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   363
            aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   364
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   365
        CleanupStack::PopAndDestroy( &selectedNodes );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   366
        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   367
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   368
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   369
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   370
// CIAUpdateMainView::DoActivateL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   371
// Activate view
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   372
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   373
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   374
void  CIAUpdateMainView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   375
                                      TUid /*aCustomMessageId*/, 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   376
                                      const TDesC8& /*aCustomMessage*/ )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   377
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   378
    UpdateStatusPaneL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   379
    Toolbar()->SetToolbarVisibility( ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   380
    if( !iContainer )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   381
        {    
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   382
        iContainer = CIAUpdateMainContainer::NewL( ClientRect(), *this );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   383
   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   384
        if( iAllNodes.Count() > 0 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   385
            {            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   386
            iContainer->RefreshL( iAllNodes, iRefreshError );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   387
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   388
  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   389
        SetSelectedIndicesL();  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   390
        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   391
        AppUi()->AddToStackL( iContainer ); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   392
        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   393
    else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   394
        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   395
        UpdateSelectionInfoInNaviPaneL();	
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   396
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   397
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   398
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   399
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   400
// CIAUpdateMainView::DoDeactivate()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   401
// Container is deleted in deactivation
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   402
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   403
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   404
void CIAUpdateMainView::DoDeactivate()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   405
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   406
    RemoveSelectionInfoInNaviPane();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   407
    Toolbar()->SetToolbarVisibility( EFalse );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   408
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   409
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   410
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   411
// CIAUpdateMainView::DynInitToolbarL()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   412
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   413
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   414
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   415
void CIAUpdateMainView::DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   416
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   417
    if ( aResourceId == R_IAUPDATE_MAIN_TOOLBAR )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   418
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   419
        if ( iContainer )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   420
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   421
            if ( CountOfSelectedItems() > 0 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   422
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   423
                aToolbar->SetItemDimmed( EIAUpdateCmdStartUpdate, EFalse, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   424
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   425
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   426
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   427
                aToolbar->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   428
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   429
            if ( CountOfSelectedItems() == 1 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   430
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   431
                aToolbar->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, EFalse, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   432
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   433
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   434
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   435
                aToolbar->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, ETrue, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   436
                }
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   437
            }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   438
        }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   439
    }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   440
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   441
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   442
// CIAUpdateMainView::OfferToolbarEventL()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   443
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   444
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   445
//            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   446
void CIAUpdateMainView::OfferToolbarEventL( TInt aCommand )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   447
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   448
    if ( aCommand == EIAUpdateCmdStartUpdate )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   449
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   450
        RPointerArray<MIAUpdateAnyNode> selectedNodes;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   451
        CleanupClosePushL( selectedNodes );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   452
        GetSelectedNodesL( selectedNodes ); 
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   453
        
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   454
        if ( selectedNodes.Count() )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   455
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   456
            if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   457
                {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   458
                //firmware is selected
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   459
                MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( selectedNodes[0] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   460
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   461
                if ( node->FwType() == MIAUpdateFwNode::EFotaDp2 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   462
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   463
                    aCommand = EIAUpdateCmdStartUpdate;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   464
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   465
                    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   466
                if ( node->FwType() == MIAUpdateFwNode::EFotiNsu )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   467
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   468
                    aCommand = EIAUpdateCmdUpdateWithPC;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   469
                    }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   470
                }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   471
            else
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   472
                {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   473
                //firmware is not selected, only sis
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   474
                aCommand = EIAUpdateCmdStartUpdate;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   475
                }
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   476
            }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   477
        else
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   478
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   479
             MIAUpdateAnyNode* currentNode = GetCurrentNode(); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   480
             if ( currentNode->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   481
                 {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   482
                 MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( currentNode );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   483
                 if ( node->FwType() == MIAUpdateFwNode::EFotiNsu )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   484
                     {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   485
                     aCommand = EIAUpdateCmdUpdateWithPC;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   486
                     }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   487
                 } 
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   488
            }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   489
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   490
        CleanupStack::PopAndDestroy( &selectedNodes );   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   491
        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   492
    HandleCommandL( aCommand );
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   493
    }
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   494
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   495
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   496
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   497
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   498
// CIAUpdateMainView::MarkListItemL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   499
// Mark list item
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   500
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   501
//    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   502
TBool CIAUpdateMainView::MarkListItemL( TBool aMark, TInt aIndex )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   503
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   504
    if ( aMark )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   505
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   506
        //It's Mark Command
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   507
        RPointerArray<MIAUpdateAnyNode> selectedNodes;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   508
        CleanupClosePushL( selectedNodes );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   509
        GetSelectedNodesL( selectedNodes ); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   510
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   511
        //There are selected items already and type are different with the current one
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   512
        if ( selectedNodes.Count() > 0 && (iAllNodes[aIndex]->NodeType() != selectedNodes[0]->NodeType() ) )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   513
            {       
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   514
            /*HBufC* msgText = StringLoader::LoadLC(R_IAUPDATE_FIRMWARE_WITH_OTHERS);
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   515
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   516
            CAknQueryDialog* dlg = CAknQueryDialog::NewL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   517
       
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   518
            dlg->ExecuteLD( R_IAUPDATE_INFORMATION_QUERY, *msgText );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   519
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   520
            CleanupStack::PopAndDestroy( msgText );*/
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   521
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   522
            //clean all of the current selection(s)
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   523
            iContainer->CleanAllSelection();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   524
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   525
            // firmware item and normal sis items can't be selected at the same time
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   526
            // unmark the selected nodes.
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   527
            for ( TInt i = 0; i < selectedNodes.Count(); i++ )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   528
                {                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   529
                TInt index = iAllNodes.Find( selectedNodes[i]);
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   530
                iAllNodes[index]->Base().SetSelected( EFalse );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   531
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   532
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   533
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   534
        CleanupStack::PopAndDestroy( &selectedNodes );
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   535
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   536
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   537
    //there is no selected items or the type is the same with the current one
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   538
    
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   539
    if ( iAllNodes[aIndex]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   540
        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   541
        iAllNodes[aIndex]->Base().SetSelected( aMark );       
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   542
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   543
        if ( aMark )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   544
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   545
            SetMiddleSKTextL( ETrue, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   546
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   547
        else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   548
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   549
            SetMiddleSKTextL( ETrue, EFalse );  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   550
            }  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   551
        UpdateSelectionInfoInNaviPaneL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   552
        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   553
        return ETrue;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   554
        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   555
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   556
    if ( iAllNodes[aIndex]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   557
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   558
        TBool accepted = EFalse;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   559
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   560
        if( aIndex > -1 )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   561
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   562
            accepted = ETrue;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   563
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   564
            MIAUpdateNode* node = static_cast<MIAUpdateNode*>( iAllNodes[aIndex] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   565
            RPointerArray<MIAUpdateAnyNode> mands;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   566
            RPointerArray<MIAUpdateNode> deps;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   567
           
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   568
            if ( aMark )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   569
                {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   570
                CleanupClosePushL( mands );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   571
                CleanupClosePushL( deps );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   572
                IAUpdateDepUtils::GetDependenciesL( *node, iAllNodes, deps );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   573
                GetMandatoryNodesL( mands );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   574
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   575
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   576
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   577
                //mandatory item is not allowed to be unmarked
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   578
                if ( iAllNodes[aIndex]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   579
                    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   580
                    //show dialog  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   581
                    ShowUpdateCannotOmitDialogL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   582
                    return EFalse;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   583
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   584
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   585
                CleanupClosePushL( deps );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   586
                IAUpdateDepUtils::GetDependantsL( *node, iAllNodes, deps );  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   587
                // item is not allowed to be unmarked if its dependant is mandatory
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   588
                TBool mandatoryDependantFound = EFalse;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   589
                for( TInt i = 0; i < deps.Count() && !mandatoryDependantFound; i++ )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   590
                     {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   591
                     if ( deps[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   592
                         {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   593
                         mandatoryDependantFound = ETrue;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   594
                         }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   595
                     }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   596
                if ( mandatoryDependantFound )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   597
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   598
                    ShowUpdateCannotOmitDialogL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   599
                    CleanupStack::PopAndDestroy( &deps );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   600
                    return EFalse;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   601
                    }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   602
                }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   603
             
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   604
            TInt depCount = deps.Count();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   605
           
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   606
            if ( depCount > 0 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   607
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   608
                HBufC* text = NULL;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   609
                HBufC* names = NULL;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   610
                MIAUpdateNode* depNode = NULL;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   611
                HBufC* separator = NULL;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   612
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   613
                if ( depCount > 1 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   614
                    {                                 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   615
                    separator = StringLoader::LoadLC( R_IAUPDATE_SEPARATOR );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   616
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   617
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   618
                names = HBufC::NewLC( 0 );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   619
                       
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   620
                for( TInt i = 0; i < depCount; i++ )  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   621
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   622
                    depNode = deps[i];
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   623
                    HBufC* temp = NULL;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   624
                    if ( separator )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   625
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   626
                        temp = names->ReAllocL( names->Length() + 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   627
                                                depNode->Base().Name().Length() +
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   628
                                                separator->Length() +
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   629
                                                KSpace.iTypeLength );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   630
                        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   631
                    else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   632
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   633
                        temp = names->ReAllocL( names->Length() + 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   634
                                                depNode->Base().Name().Length() +
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   635
                                                KSpace.iTypeLength );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   636
                        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   637
                   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   638
                    CleanupStack::Pop( names );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   639
                    names = temp; 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   640
                    CleanupStack::PushL( names ); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   641
                    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   642
                    if (  i > 0 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   643
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   644
                        names->Des() += *separator;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   645
                        names->Des() += KSpace; 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   646
                        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   647
                    names->Des() += depNode->Base().Name();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   648
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   649
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   650
                TInt resourceId = 0;    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   651
                if ( aMark )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   652
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   653
                    if ( depCount > 1 ) 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   654
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   655
                        resourceId = R_IAUPDATE_DEPENDENCY_MARK_MANY;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   656
                        } 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   657
                    else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   658
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   659
                        resourceId = R_IAUPDATE_DEPENDENCY_MARK_ONE;    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   660
                        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   661
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   662
                else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   663
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   664
                    if ( depCount > 1 ) 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   665
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   666
                        resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_MANY;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   667
                        } 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   668
                    else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   669
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   670
                        resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_ONE;  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   671
                        }   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   672
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   673
                text = StringLoader::LoadLC( resourceId, *names );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   674
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   675
                if ( aMark && iAllNodes[aIndex]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   676
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   677
                    // depencencies of mandatory update are also selected without showing dialog
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   678
                    accepted = ETrue;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   679
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   680
                else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   681
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   682
                    accepted = ShowDependenciesFoundDialogL( *text );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   683
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   684
                CleanupStack::PopAndDestroy( text );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   685
                CleanupStack::PopAndDestroy( names );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   686
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   687
                if ( separator )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   688
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   689
                    CleanupStack::PopAndDestroy( separator );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   690
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   691
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   692
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   693
            if ( accepted )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   694
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   695
                for( TInt j = 0; j < depCount; j++ )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   696
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   697
                    TInt depNodeInd = iAllNodes.Find( deps[j] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   698
                    iAllNodes[depNodeInd]->Base().SetSelected( aMark );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   699
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   700
                CleanupStack::PopAndDestroy( &deps );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   701
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   702
                TInt nodeInd = iAllNodes.Find( node );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   703
                iAllNodes[nodeInd]->Base().SetSelected( aMark );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   704
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   705
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   706
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   707
                //user rejects the dependency dialog
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   708
                CleanupStack::PopAndDestroy( &deps );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   709
                if ( aMark )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   710
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   711
                    CleanupStack::PopAndDestroy( &mands );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   712
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   713
                return EFalse;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   714
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   715
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   716
            //mark all of the mandatory items
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   717
            TInt mandCount = mands.Count();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   718
            if ( mandCount > 0 && aMark )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   719
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   720
                for( TInt j = 0; j < mandCount; j++ )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   721
                    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   722
                    TInt mandNodeInd = iAllNodes.Find( mands[j] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   723
                    iAllNodes[mandNodeInd]->Base().SetSelected( aMark );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   724
                    if ( iAllNodes[mandNodeInd]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   725
                        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   726
                        // mark also all dependencies of a mandatory item
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   727
                        MIAUpdateNode* dependencyNode = static_cast<MIAUpdateNode*>( iAllNodes[mandNodeInd] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   728
                        RPointerArray<MIAUpdateNode> dependencies;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   729
                        CleanupClosePushL( dependencies );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   730
                        IAUpdateDepUtils::GetDependenciesL( *dependencyNode, iAllNodes, dependencies );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   731
                        for( TInt k = 0; k < dependencies.Count(); k++ )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   732
                            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   733
                            TInt depNodeInd = iAllNodes.Find( dependencies[k] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   734
                            iAllNodes[depNodeInd]->Base().SetSelected( ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   735
                            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   736
                        CleanupStack::PopAndDestroy( &dependencies );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   737
                        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   738
                    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   739
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   740
            if ( aMark )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   741
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   742
                CleanupStack::PopAndDestroy( &mands );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   743
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   744
            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   745
            if ( depCount > 0 || mandCount > 0 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   746
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   747
                SetSelectedIndicesL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   748
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   749
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   750
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   751
                UpdateSelectionInfoInNaviPaneL();   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   752
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   753
               
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   754
            if ( aMark )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   755
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   756
                SetMiddleSKTextL( ETrue, ETrue );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   757
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   758
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   759
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   760
                SetMiddleSKTextL( ETrue, EFalse );  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   761
                }        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   762
            }  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   763
        DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   764
        return ETrue;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   765
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   766
    return EFalse;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   767
    }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   768
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   769
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   770
   
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   771
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   772
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   773
// CIAUpdateMainView::SetMiddleSKTextL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   774
// Middle soft key label to be set 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   775
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   776
//    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   777
void CIAUpdateMainView::SetMiddleSKTextL( TBool aVisible, TBool aSelected )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   778
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   779
	CEikButtonGroupContainer* cbaGroup = Cba();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   780
	if ( cbaGroup )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   781
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   782
        cbaGroup->RemoveCommandFromStack( CEikButtonGroupContainer::EMiddleSoftkeyPosition, iLastCommandId );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   783
        if ( aVisible )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   784
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   785
        	HBufC* middleSKText = NULL;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   786
    	    if ( aSelected )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   787
        	    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   788
        	    middleSKText = StringLoader::LoadLC( R_IAUPDATE_MSK_UNMARK );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   789
                TPtr mskPtr = middleSKText->Des();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   790
    	        cbaGroup->AddCommandToStackL(  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   791
    	                    CEikButtonGroupContainer::EMiddleSoftkeyPosition, 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   792
    	                    EAknSoftkeyUnmark, 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   793
    	                    mskPtr );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   794
    	        iLastCommandId = EAknSoftkeyUnmark;            
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   795
                }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   796
            else
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   797
                {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   798
                middleSKText = StringLoader::LoadLC( R_IAUPDATE_MSK_MARK );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   799
        	    TPtr mskPtr = middleSKText->Des();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   800
    	        cbaGroup->AddCommandToStackL( 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   801
    	                  CEikButtonGroupContainer::EMiddleSoftkeyPosition, 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   802
    	                  EAknSoftkeyMark, 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   803
    	                  mskPtr );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   804
    	        iLastCommandId = EAknSoftkeyMark;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   805
        	    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   806
        	CleanupStack::PopAndDestroy( middleSKText );
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   807
            }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   808
        }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   809
    }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   810
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   811
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   812
// CIAUpdateMainView::GetSelectedNodesL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   813
// Get selected (marked) nodes
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   814
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   815
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   816
void CIAUpdateMainView::GetSelectedNodesL( RPointerArray<MIAUpdateAnyNode>& aSelectedNodes ) const
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   817
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   818
    for( TInt i = 0; i < iAllNodes.Count(); ++i )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   819
        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   820
        if ( iAllNodes[i]->Base().IsSelected() )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   821
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   822
        	User::LeaveIfError( aSelectedNodes.Append( iAllNodes[i] ) );
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   823
            }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   824
        }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   825
    }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   826
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   827
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   828
// CIAUpdateMainView::GetMandatoryItemsL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   829
// Get selected (marked) nodes
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   830
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   831
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   832
void CIAUpdateMainView::GetMandatoryNodesL( RPointerArray<MIAUpdateAnyNode>& aMandNodes ) const
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   833
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   834
    for( TInt i = 0; i < iAllNodes.Count(); ++i )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   835
        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   836
        if ( iAllNodes[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   837
            {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   838
            User::LeaveIfError( aMandNodes.Append( iAllNodes[i] ) );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   839
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   840
        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   841
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   842
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   843
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   844
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   845
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   846
// CIAUpdateMainView::SetSelectedIndicesL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   847
// Indices of selected items are passed to container 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   848
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   849
//  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   850
void CIAUpdateMainView::SetSelectedIndicesL()
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   851
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   852
    RArray<TInt> indices;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   853
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   854
    CleanupClosePushL( indices );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   855
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   856
    for( TInt i = 0; i < iAllNodes.Count(); ++i )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   857
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   858
    	if ( iAllNodes[i]->Base().IsSelected() )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   859
    	    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   860
    		User::LeaveIfError( indices.Append( i ) );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   861
    	    }
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   862
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   863
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   864
    iContainer->SetSelectedIndicesL( indices );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   865
    UpdateSelectionInfoInNaviPaneL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   866
 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   867
    CleanupStack::PopAndDestroy( &indices );
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   868
    }
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   869
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   870
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   871
// CIAUpdateMainView::NodeIndex
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   872
// Get index of node 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   873
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   874
//  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   875
TInt CIAUpdateMainView::NodeIndex( const MIAUpdateAnyNode& aNode ) const
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   876
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   877
    TInt result = -1;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   878
    
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   879
    for( TInt i = 0; i < iAllNodes.Count(); ++i )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   880
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   881
        if( &aNode == iAllNodes[i] )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   882
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   883
            result = i;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   884
            break;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   885
            }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   886
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   887
    return result;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   888
    }
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   889
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   890
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   891
// CIAUpdateMainView::UpdateStatusPaneL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   892
// Update title in status pane
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   893
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   894
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   895
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   896
void CIAUpdateMainView::UpdateStatusPaneL()
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   897
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   898
    CAknTitlePane* titlePane = 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   899
            static_cast< CAknTitlePane* >( StatusPane()->ControlL(
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   900
                                           TUid::Uid( EEikStatusPaneUidTitle ) ) );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   901
    HBufC* text = StringLoader::LoadLC( R_IAUPDATE_TEXT_TITLE_MAIN_VIEW );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   902
    titlePane->SetTextL( *text );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   903
    CleanupStack::PopAndDestroy( text );        
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   904
    }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   905
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   906
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   907
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   908
// CIAUpdateMainView::UpdateSelectionInfoInNaviPaneL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   909
// Update selection information in status pane
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   910
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   911
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   912
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   913
void CIAUpdateMainView::UpdateSelectionInfoInNaviPaneL()
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   914
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   915
    RemoveSelectionInfoInNaviPane();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   916
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   917
    if ( iAllNodes.Count() > 0 )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   918
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   919
        //show empty navi pane when firmware is selected but no size info or it is NSU
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   920
        if ( (iAllNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw) && iAllNodes[0]->Base().IsSelected() )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   921
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   922
            MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( iAllNodes[0] );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   923
            if ( (iAllNodes[0]->Base().ContentSizeL() == 0) || (fwnode->FwType() == MIAUpdateFwNode::EFotiNsu)  )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   924
                {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   925
                return;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   926
                }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   927
            }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   928
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   929
        if ( !iNaviPane )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   930
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   931
    	    iNaviPane = static_cast<CAknNavigationControlContainer*>
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   932
               ( StatusPane()->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) );
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   933
            }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   934
        TInt selectedSizeInBytes = 0;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   935
        for( TInt i = 0; i < iAllNodes.Count(); ++i )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   936
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   937
            if ( iAllNodes[i]->Base().IsSelected() )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   938
                {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   939
            	selectedSizeInBytes += iAllNodes[i]->Base().ContentSizeL();
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   940
                }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   941
            }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   942
                
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   943
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   944
        TInt resourceId = 0;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   945
        TInt selectedSize;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   946
        if ( selectedSizeInBytes >= KMaxShownInKiloBytes )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   947
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   948
    	    resourceId = R_IAUPDATE_NAVIPANE_MEGABYTE;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   949
    	    selectedSize = selectedSizeInBytes / KMegaByte;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   950
    	    if ( selectedSizeInBytes % KMegaByte != 0 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   951
    	        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   952
    	    	selectedSize++;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   953
    	        }
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   954
            }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   955
        else 
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   956
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   957
    	    resourceId = R_IAUPDATE_NAVIPANE_KILOBYTE;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   958
    	    selectedSize = selectedSizeInBytes / KKiloByte;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   959
    	    if ( selectedSizeInBytes % KKiloByte != 0 )
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   960
    	        {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   961
    	    	selectedSize++;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   962
    	        }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   963
            }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   964
     
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   965
        CArrayFix<TInt>* numberArray = 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   966
                 new ( ELeave ) CArrayFixFlat<TInt>( KSelInfoArrayGranularity );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   967
        CleanupStack::PushL( numberArray );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   968
        numberArray->AppendL( CountOfSelectedItems() ); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   969
        numberArray->AppendL( iAllNodes.Count() );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   970
        numberArray->AppendL( selectedSize );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   971
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   972
        HBufC* selectionInfo = StringLoader::LoadLC( resourceId, 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   973
                                                     *numberArray );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   974
        TPtr ptr = selectionInfo->Des();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   975
        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); 
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   976
            
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   977
        iDecorator = iNaviPane->CreateNavigationLabelL( *selectionInfo );
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   978
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   979
        iNaviPane->PushL( *iDecorator );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   980
        
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   981
        CleanupStack::PopAndDestroy( selectionInfo ); 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   982
        CleanupStack::PopAndDestroy( numberArray );	
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   983
        }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   984
    }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   985
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   986
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   987
// CIAUpdateMainView::RemoveSelectionInfoInNaviPane
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   988
// Remove existing selection info (created by main view) from navi pane
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   989
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   990
// 
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   991
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   992
void CIAUpdateMainView::RemoveSelectionInfoInNaviPane()
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   993
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   994
    if ( iNaviPane && iDecorator )
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   995
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   996
    	iNaviPane->Pop( iDecorator );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   997
    	delete iDecorator;
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
   998
    	iDecorator = NULL;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   999
        }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1000
    }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1001
 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1002
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1003
// CIAUpdateMainView::ShowDependenciesFoundDialogL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1004
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1005
// -----------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1006
//  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1007
TBool CIAUpdateMainView::ShowDependenciesFoundDialogL( TDesC& aText ) const
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1008
    {
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1009
	CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1010
    dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1011
    CAknPopupHeadingPane* headingPane = dlg->Heading();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1012
    HBufC* title = StringLoader::LoadLC( R_IAUPDATE_DEPENDENCY_TITLE );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1013
    headingPane->SetTextL( *title );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1014
    CleanupStack::PopAndDestroy( title );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1015
  
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1016
    dlg->ButtonGroupContainer().SetCommandSetL( 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1017
                                  R_IAUPDATE_SOFTKEYS_CONTINUE_CANCEL__CONTINUE );
65
7333d7932ef7 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
  1018
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1019
    return( dlg->RunLD() == EAknSoftkeyOk );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1020
    }
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1021
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1022
// ---------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1023
// CIAUpdateMainView::CountOfSelectedItems
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1024
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1025
// ---------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1026
//     
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1027
TInt CIAUpdateMainView::CountOfSelectedItems() const
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1028
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1029
    TInt countOfSelectedItems = 0; 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1030
    for( TInt i = 0; i < iAllNodes.Count(); ++i )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1031
        {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1032
        if ( iAllNodes[i]->Base().IsSelected() )
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1033
            {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1034
        	countOfSelectedItems++;
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1035
            }
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1036
        }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1037
    return countOfSelectedItems;   	
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1038
    }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1039
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1040
// ---------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1041
// CIAUpdateMainView::ShowUpdateCannotOmitDialogL
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1042
// 
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1043
// ---------------------------------------------------------------------------
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1044
//
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1045
void CIAUpdateMainView::ShowUpdateCannotOmitDialogL() const
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1046
    {
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1047
    HBufC* msgText = StringLoader::LoadLC( R_IAUPDATE_CANNOT_OMIT );
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1048
    CAknQueryDialog* dlg = CAknQueryDialog::NewL();
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1049
    dlg->ExecuteLD( R_IAUPDATE_INFORMATION_QUERY, *msgText  );         
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1050
    CleanupStack::PopAndDestroy( msgText );
0
ba25891c3a9e Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
  1051
    }
66
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1052
    
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1053
// End of File
8b7f4e561641 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 65
diff changeset
  1054