author | Sebastian Brannstrom <sebastianb@symbian.org> |
Fri, 12 Nov 2010 20:48:14 +0000 | |
branch | symbian1 |
changeset 336 | 3d6c1417e8bd |
parent 160 | 6477d22a5dca |
child 347 | b8d687bb7ca1 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB |
|
3 |
* |
|
4 |
* All rights reserved. |
|
5 |
* This component and the accompanying materials are made available |
|
6 |
* under the terms of the License "Eclipse Public License v1.0" |
|
7 |
* which accompanies this distribution, and is available |
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 |
* |
|
10 |
* Initial Contributors: |
|
11 |
* EmbedDev AB - initial contribution. |
|
12 |
* |
|
13 |
* Contributors: |
|
14 |
* |
|
15 |
* Description: |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#include "PodcastListView.h" |
|
20 |
#include "Podcast.hrh" |
|
21 |
#include "PodcastAppUi.h" |
|
22 |
#include "constants.h" |
|
23 |
#include <podcast.rsg> |
|
24 |
#include <aknlists.h> |
|
25 |
#include <aknviewappui.h> |
|
26 |
#include <aknnotedialog.h> |
|
27 |
#include <aknsbasicbackgroundcontrolcontext.h> |
|
28 |
#include <akntabgrp.h> |
|
29 |
#include <akntoolbarextension.h> |
|
30 |
#include <aknquerydialog.h> |
|
31 |
#include <barsread.h> |
|
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
32 |
#include <akntitle.h> |
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
33 |
#include <akniconarray.h> |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
34 |
#include <EIKCLBD.H> |
2 | 35 |
|
86 | 36 |
#include "buildno.h" |
37 |
||
2 | 38 |
const TInt KDefaultGran = 5; |
39 |
||
40 |
CPodcastListContainer::CPodcastListContainer() |
|
41 |
{ |
|
42 |
} |
|
43 |
||
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
44 |
void CPodcastListContainer::SetContainerListener(MContainerListener *aContainerListener) |
2 | 45 |
{ |
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
46 |
iContainerListener = aContainerListener; |
2 | 47 |
} |
48 |
||
49 |
TKeyResponse CPodcastListContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) |
|
50 |
{ |
|
51 |
TKeyResponse response = iListbox->OfferKeyEventL(aKeyEvent, aType); |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
52 |
if (iContainerListener) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
53 |
iContainerListener->OfferKeyEventL(aKeyEvent, aType); |
2 | 54 |
|
55 |
return response; |
|
56 |
} |
|
57 |
||
58 |
void CPodcastListContainer::ConstructL( const TRect& aRect, TInt aListboxFlags ) |
|
59 |
{ |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
60 |
DP("CPodcastListContainer::ConstructL BEGIN"); |
2 | 61 |
CreateWindowL(); |
62 |
||
63 |
iBgContext = |
|
64 |
CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, |
|
65 |
aRect, |
|
66 |
ETrue ); |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
67 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
68 |
iListboxLandscape = new (ELeave) CAknSingleLargeStyleListBox; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
69 |
iListboxLandscape->ConstructL(this, aListboxFlags); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
70 |
iListboxLandscape->SetMopParent( this ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
71 |
iListboxLandscape->SetContainerWindowL(*this); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
72 |
iListboxLandscape->CreateScrollBarFrameL(ETrue); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
73 |
iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
74 |
iListboxLandscape->SetSize(aRect.Size()); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
75 |
iListboxLandscape->MakeVisible(EFalse); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
76 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
77 |
iListboxPortrait = new (ELeave) CAknDoubleLargeStyleListBox; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
78 |
iListboxPortrait->ConstructL(this, aListboxFlags); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
79 |
iListboxPortrait->SetMopParent( this ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
80 |
iListboxPortrait->SetContainerWindowL(*this); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
81 |
iListboxPortrait->CreateScrollBarFrameL(ETrue); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
82 |
iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
83 |
iListboxPortrait->SetSize(aRect.Size()); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
84 |
iListboxPortrait->MakeVisible(EFalse); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
85 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
86 |
if (aRect.Width() > aRect.Height()) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
87 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
88 |
iLandscape = ETrue; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
89 |
iListbox = iListboxLandscape; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
90 |
iListboxLandscape->MakeVisible(ETrue); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
91 |
} |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
92 |
else |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
93 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
94 |
iLandscape = EFalse; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
95 |
iListboxPortrait->MakeVisible(ETrue); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
96 |
iListbox = (CEikColumnListBox*) iListboxPortrait; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
97 |
} |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
98 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
99 |
MakeVisible(EFalse); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
100 |
|
2 | 101 |
// Set the windows size |
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
102 |
SetRect( aRect ); |
2 | 103 |
|
104 |
// Activate the window, which makes it ready to be drawn |
|
105 |
ActivateL(); |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
106 |
DP("CPodcastListContainer::ConstructL END"); |
2 | 107 |
} |
108 |
||
109 |
TInt CPodcastListContainer::CountComponentControls() const |
|
110 |
{ |
|
111 |
return 1; // return number of controls inside this container |
|
112 |
} |
|
113 |
||
114 |
CCoeControl* CPodcastListContainer::ComponentControl(TInt aIndex) const |
|
115 |
{ |
|
116 |
switch ( aIndex ) |
|
117 |
{ |
|
118 |
case 0: |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
119 |
if (iLandscape) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
120 |
return iListboxLandscape; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
121 |
else |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
122 |
return iListboxPortrait; |
2 | 123 |
default: |
124 |
return NULL; |
|
125 |
} |
|
126 |
} |
|
127 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
27
diff
changeset
|
128 |
void CPodcastListContainer::SetLongTapDetectedL(TBool aLongTapDetected) |
26 | 129 |
{ |
160 | 130 |
DP("CPodcastListContainer::SetLongTapDetectedL BEGIN"); |
26 | 131 |
iLongTapDetected = aLongTapDetected; |
27 | 132 |
|
133 |
if (aLongTapDetected == EFalse) |
|
134 |
{ |
|
135 |
TPointerEvent event; |
|
136 |
event.iType = TPointerEvent::EButton1Up; |
|
160 | 137 |
//CCoeControl::HandlePointerEventL(event); |
27 | 138 |
} |
160 | 139 |
DP("CPodcastListContainer::SetLongTapDetectedL END"); |
26 | 140 |
} |
141 |
||
2 | 142 |
void CPodcastListContainer::HandleResourceChange(TInt aType) |
143 |
{ |
|
144 |
switch( aType ) |
|
145 |
{ |
|
146 |
case KEikDynamicLayoutVariantSwitch: |
|
147 |
SetRect(iEikonEnv->EikAppUi()->ClientRect()); |
|
148 |
break; |
|
149 |
} |
|
150 |
} |
|
151 |
||
152 |
void CPodcastListContainer::ScrollToVisible() { |
|
153 |
if (iListbox != NULL) { |
|
154 |
iListbox->ScrollToMakeItemVisible(iListbox->CurrentItemIndex()); |
|
155 |
} |
|
156 |
} |
|
157 |
void CPodcastListContainer::SizeChanged() |
|
158 |
{ |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
159 |
DP2("CPodcastListContainer::SizeChanged() BEGIN, width=%d, height=%d",Size().iWidth, Size().iHeight); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
160 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
161 |
iLandscape = Size().iWidth > Size().iHeight; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
162 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
163 |
if (iContainerListener) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
164 |
iContainerListener->SizeChanged(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
165 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
166 |
if (iLandscape) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
167 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
168 |
iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
169 |
iListboxPortrait->UpdateScrollBarsL(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
170 |
iListboxPortrait->MakeVisible(EFalse); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
171 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
172 |
iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
173 |
iListboxLandscape->MakeVisible(ETrue); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
174 |
iListboxLandscape->SetFocus(ETrue, EDrawNow); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
175 |
iListbox = iListboxLandscape; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
176 |
} |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
177 |
else |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
178 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
179 |
iListboxLandscape->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
180 |
iListboxLandscape->UpdateScrollBarsL(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
181 |
iListboxLandscape->MakeVisible(EFalse); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
182 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
183 |
iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto ); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
184 |
iListboxPortrait->MakeVisible(ETrue); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
185 |
iListboxPortrait->SetFocus(ETrue, EDrawNow); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
186 |
iListbox = (CEikColumnListBox*) iListboxPortrait; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
187 |
} |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
188 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
189 |
iListbox->SetSize(Size()); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
190 |
ActivateL(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
191 |
DrawNow(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
192 |
DP("CPodcastListContainer::SizeChanged END"); |
2 | 193 |
} |
194 |
||
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
195 |
CEikColumnListBox* CPodcastListContainer::Listbox() |
2 | 196 |
{ |
197 |
return iListbox; |
|
198 |
} |
|
199 |
||
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
200 |
void CPodcastListContainer::SetListboxObserver(MEikListBoxObserver *aObserver) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
201 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
202 |
iListboxLandscape->SetListBoxObserver(aObserver); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
203 |
iListboxPortrait->SetListBoxObserver(aObserver); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
204 |
} |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
205 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
206 |
void CPodcastListContainer::SetListboxIcons(CArrayPtr< CGulIcon >* aIcons) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
207 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
208 |
iListboxLandscape->ItemDrawer()->ColumnData()->SetIconArray(aIcons); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
209 |
iListboxPortrait->ItemDrawer()->FormattedCellData()->SetIconArrayL(aIcons); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
210 |
} |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
211 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
212 |
CArrayPtr<CGulIcon>* CPodcastListContainer::ListboxIcons() |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
213 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
214 |
if (iListboxLandscape == iListbox) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
215 |
return iListboxLandscape->ItemDrawer()->ColumnData()->IconArray(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
216 |
else |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
217 |
return iListboxPortrait->ItemDrawer()->FormattedCellData()->IconArray(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
218 |
} |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
219 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
220 |
void CPodcastListContainer::SetListboxTextArrays(CDesCArray* aPortraitArray, CDesCArray* aLandscapeArray) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
221 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
222 |
iListboxLandscape->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
223 |
iListboxLandscape->Model()->SetItemTextArray(aLandscapeArray); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
224 |
iListboxPortrait->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
225 |
iListboxPortrait->Model()->SetItemTextArray(aPortraitArray); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
226 |
} |
2 | 227 |
|
228 |
CPodcastListContainer::~CPodcastListContainer() |
|
229 |
{ |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
230 |
iListboxLandscape->ItemDrawer()->ColumnData()->SetIconArray(NULL); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
231 |
delete iListboxPortrait; |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
232 |
delete iListboxLandscape; |
2 | 233 |
delete iBgContext; |
234 |
} |
|
235 |
||
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
236 |
void CPodcastListContainer::SetEmptyText(const TDesC &aText) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
237 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
238 |
iListboxPortrait->View()->SetListEmptyTextL(aText); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
239 |
iListboxLandscape->View()->SetListEmptyTextL(aText); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
240 |
} |
2 | 241 |
|
242 |
void CPodcastListContainer::Draw(const TRect& aRect) const |
|
243 |
{ |
|
244 |
CWindowGc& gc = SystemGc(); |
|
245 |
gc.SetBrushStyle(CGraphicsContext::ESolidBrush); |
|
246 |
MAknsControlContext* cc = AknsDrawUtils::ControlContext(this); |
|
247 |
MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
248 |
AknsDrawUtils::Background(skin, cc, (CCoeControl*) this, gc, aRect); |
|
249 |
} |
|
250 |
||
251 |
||
252 |
TTypeUid::Ptr CPodcastListContainer::MopSupplyObject( TTypeUid aId ) |
|
253 |
{ |
|
254 |
if (iBgContext ) |
|
255 |
{ |
|
256 |
return MAknsControlContext::SupplyMopObject( aId, iBgContext ); |
|
257 |
} |
|
258 |
return CCoeControl::MopSupplyObject(aId); |
|
259 |
} |
|
260 |
||
261 |
void CPodcastListContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
|
262 |
{ |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
263 |
if (iContainerListener) |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
264 |
iContainerListener->PointerEventL(aPointerEvent); |
2 | 265 |
|
26 | 266 |
// Call base class HandlePointerEventL() if not a long tap |
267 |
if (!iLongTapDetected) |
|
268 |
{ |
|
269 |
CCoeControl::HandlePointerEventL(aPointerEvent); |
|
270 |
} |
|
2 | 271 |
} |
272 |
||
273 |
CPodcastListView::CPodcastListView() |
|
274 |
{ |
|
275 |
} |
|
276 |
||
277 |
void CPodcastListView::ConstructL() |
|
278 |
{ |
|
279 |
DP("CPodcastListView::ConstructL BEGIN"); |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
280 |
|
2 | 281 |
iListContainer = new (ELeave) CPodcastListContainer; |
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
282 |
TRect rect = ClientRect(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
283 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
284 |
iListContainer->ConstructL(rect, iListboxFlags); |
2 | 285 |
iListContainer->SetMopParent(this); |
286 |
iListContainer->ActivateL(); |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
287 |
|
2 | 288 |
iItemArray = new (ELeave)CDesCArrayFlat(KDefaultGran); |
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
289 |
iItemArrayShort = new (ELeave)CDesCArrayFlat(KDefaultGran); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
290 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
291 |
iListContainer->SetListboxTextArrays(iItemArray, iItemArrayShort); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
292 |
iListContainer->SetContainerListener(this); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
293 |
iListContainer->SetListboxObserver(this); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
294 |
|
2 | 295 |
if (Toolbar()) { |
296 |
iToolbar = Toolbar(); |
|
297 |
iToolbar->SetToolbarObserver(this); |
|
298 |
} |
|
299 |
||
300 |
iLongTapDetector = CAknLongTapDetector::NewL(this); |
|
23
cf4b850bbffb
Added macro SYMBIAN1_UI that toggles between single and double tap UI
teknolog
parents:
13
diff
changeset
|
301 |
|
2 | 302 |
DP("CPodcastListView::ConstructL END"); |
303 |
} |
|
304 |
||
305 |
void CPodcastListView::HandleViewRectChange() |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
306 |
{ |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
307 |
TBool wasVisible = iListContainer->IsVisible(); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
308 |
|
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
309 |
if ( iListContainer ) |
2 | 310 |
{ |
311 |
iListContainer->SetRect( ClientRect() ); |
|
312 |
} |
|
313 |
} |
|
314 |
||
315 |
void CPodcastListView::HandleStatusPaneSizeChange() |
|
316 |
{ |
|
317 |
DP2("CPodcastListView::HandleStatusPaneSizeChange(), width=%d, height=%d", ClientRect().Width(), ClientRect().Height()); |
|
318 |
||
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
319 |
HandleViewRectChange(); |
2 | 320 |
} |
321 |
||
322 |
||
323 |
CPodcastListView::~CPodcastListView() |
|
324 |
{ |
|
325 |
if(iListContainer) |
|
326 |
{ |
|
327 |
AppUi()->RemoveFromStack(iListContainer); |
|
328 |
delete iListContainer; |
|
329 |
} |
|
330 |
||
331 |
delete iItemArray; |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
332 |
delete iItemArrayShort; |
2 | 333 |
delete iLongTapDetector; |
334 |
iItemIdArray.Close(); |
|
335 |
} |
|
336 |
||
337 |
||
338 |
void CPodcastListView::DoActivateL(const TVwsViewId& /*aPrevViewId */, |
|
339 |
TUid /*aCustomMessageId */, |
|
340 |
const TDesC8& /* aCustomMessage */) |
|
341 |
{ |
|
342 |
DP("CPodcastListView::DoActivateL() BEGIN"); |
|
343 |
||
344 |
if(iListContainer) |
|
345 |
{ |
|
346 |
iListContainer->SetSize(ClientRect().Size()); |
|
347 |
iListContainer->SetMopParent(this); |
|
348 |
||
349 |
AppUi()->AddToStackL(*this, iListContainer); |
|
350 |
iListContainer->MakeVisible(ETrue); |
|
351 |
} |
|
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
352 |
|
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
353 |
CAknTitlePane* titlePane = static_cast<CAknTitlePane*> |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
354 |
( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
355 |
titlePane->SetTextToDefaultL(); |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
356 |
|
2 | 357 |
DP("CPodcastListView::DoActivateL() END"); |
358 |
||
359 |
} |
|
360 |
||
361 |
void CPodcastListView::DoDeactivate() |
|
362 |
{ |
|
363 |
DP("CPodcastListView::DoDeactivate() BEGIN"); |
|
364 |
if ( iListContainer ) |
|
365 |
{ |
|
366 |
AppUi()->RemoveFromViewStack( *this, iListContainer); |
|
367 |
iListContainer->MakeVisible(EFalse); |
|
368 |
} |
|
369 |
DP("CPodcastListView::DoDeactivate() END"); |
|
370 |
} |
|
371 |
||
372 |
/** |
|
373 |
* Command handling function intended for overriding by sub classes. |
|
374 |
* Default implementation is empty. |
|
375 |
* @param aCommand ID of the command to respond to. |
|
376 |
*/ |
|
377 |
void CPodcastListView::HandleCommandL(TInt aCommand) |
|
378 |
{ |
|
379 |
DP1("CPodcastListView::HandleCommandL=%d", aCommand); |
|
380 |
switch(aCommand) |
|
381 |
{ |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
382 |
case EPodcastHide: |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
383 |
AppUi()->HandleCommandL(EEikCmdExit); |
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
384 |
break; |
2 | 385 |
case EAknSoftkeyBack: |
386 |
{ |
|
387 |
AppUi()->ActivateViewL(iPreviousView); |
|
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
388 |
((CPodcastAppUi*)AppUi())->SetActiveTab(KTabIdFeeds); |
2 | 389 |
} |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
390 |
break; |
2 | 391 |
case EPodcastSettings: |
392 |
AppUi()->ActivateLocalViewL(KUidPodcastSettingsViewID); |
|
393 |
break; |
|
394 |
case EPodcastAbout: |
|
395 |
RunAboutDialogL(); |
|
396 |
break; |
|
397 |
default: |
|
398 |
AppUi()->HandleCommandL(aCommand); |
|
399 |
} |
|
400 |
} |
|
401 |
||
48 | 402 |
TBool CPodcastListView::IsVisible() |
403 |
{ |
|
404 |
return iListContainer->IsVisible(); |
|
405 |
} |
|
2 | 406 |
|
407 |
void CPodcastListView::RunAboutDialogL() |
|
408 |
{ |
|
409 |
CAknNoteDialog* dlg = new(ELeave) CAknNoteDialog(); |
|
86 | 410 |
HBufC *aboutTextTemplate = iEikonEnv->AllocReadResourceLC(R_ABOUT_TEXT); |
411 |
TBuf<255> aboutText; |
|
412 |
aboutText.Format(*aboutTextTemplate, BUILD_NO); |
|
413 |
dlg->SetTextL(aboutText); |
|
414 |
CleanupStack::PopAndDestroy(aboutTextTemplate); |
|
2 | 415 |
dlg->ExecuteLD(R_DLG_ABOUT); |
416 |
} |
|
417 |
||
418 |
void CPodcastListView::SetEmptyTextL(TInt aResourceId) |
|
419 |
{ |
|
420 |
HBufC* emptyText = iEikonEnv->AllocReadResourceLC(aResourceId); |
|
336
3d6c1417e8bd
Merged all the later Symbian3 updates into Symbian1 branch; new SIS v. 1.00.32
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
160
diff
changeset
|
421 |
iListContainer->SetEmptyText(*emptyText); |
2 | 422 |
CleanupStack::PopAndDestroy(emptyText); |
423 |
} |
|
424 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
27
diff
changeset
|
425 |
void CPodcastListView::ShowOkMessageL(TDesC &aText) |
2 | 426 |
{ |
427 |
CAknNoteDialog* dlg= new(ELeave) CAknNoteDialog(); |
|
428 |
CleanupStack::PushL(dlg); |
|
429 |
dlg->SetTextL(aText); |
|
430 |
CleanupStack::Pop(dlg); |
|
431 |
dlg->ExecuteLD(R_MESSAGEDLG_OK); |
|
432 |
} |
|
433 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
27
diff
changeset
|
434 |
void CPodcastListView::ShowErrorMessageL(TDesC &aText) |
2 | 435 |
{ |
436 |
CAknNoteDialog* dlg= new(ELeave) CAknNoteDialog(); |
|
437 |
CleanupStack::PushL(dlg); |
|
438 |
dlg->SetTextL(aText); |
|
439 |
CleanupStack::Pop(dlg); |
|
440 |
dlg->ExecuteLD(R_ERRORDLG_OK); |
|
441 |
} |
|
442 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
27
diff
changeset
|
443 |
TInt CPodcastListView::ShowQueryMessageL(TDesC &aText) |
2 | 444 |
{ |
445 |
CAknQueryDialog* dlg= new(ELeave) CAknQueryDialog(); |
|
446 |
||
447 |
CleanupStack::PushL(dlg); |
|
448 |
dlg->SetPromptL(aText); |
|
449 |
CleanupStack::Pop(dlg); |
|
450 |
return dlg->ExecuteLD(R_QUERYDLG); |
|
451 |
} |
|
452 |
||
453 |
void CPodcastListView::CloseToolbarExtension() |
|
454 |
{ |
|
455 |
CAknToolbar* toolbar = Toolbar(); |
|
456 |
if (toolbar) { |
|
457 |
CAknToolbarExtension* toolbarExtension = toolbar->ToolbarExtension(); |
|
458 |
if (toolbarExtension) { |
|
459 |
toolbarExtension->SetShown( EFalse ); |
|
460 |
} |
|
461 |
} |
|
462 |
} |
|
463 |
||
464 |
void CPodcastListView::PointerEventL(const TPointerEvent& aPointerEvent) |
|
465 |
{ |
|
466 |
//DP1("CPodcastListView::PointerEventL, iType=%d", aPointerEvent.iType); |
|
467 |
// Pass the pointer event to Long tap detector component |
|
468 |
iLongTapDetector->PointerEventL(aPointerEvent); |
|
469 |
} |
|
470 |
||
471 |
||
472 |
void CPodcastListView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */) |
|
473 |
{ |
|
474 |
DP("CPodcastListView::HandleLongTapEventL BEGIN"); |
|
145
cc0182a5da39
Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents:
86
diff
changeset
|
475 |
iListContainer->SetLongTapDetectedL(ETrue); |
cc0182a5da39
Fix for Bug 2604 and bulk of the work towards implementing Bug 2737
Brendan Donegan <brendand@symbian.org>
parents:
86
diff
changeset
|
476 |
|
4
be243543a361
Added primitive detection if long tap is on a listbox item or not. Could use a better version of this going forward.
teknolog
parents:
2
diff
changeset
|
477 |
const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1 |
be243543a361
Added primitive detection if long tap is on a listbox item or not. Could use a better version of this going forward.
teknolog
parents:
2
diff
changeset
|
478 |
TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems( |
be243543a361
Added primitive detection if long tap is on a listbox item or not. Could use a better version of this going forward.
teknolog
parents:
2
diff
changeset
|
479 |
iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight; |
be243543a361
Added primitive detection if long tap is on a listbox item or not. Could use a better version of this going forward.
teknolog
parents:
2
diff
changeset
|
480 |
|
be243543a361
Added primitive detection if long tap is on a listbox item or not. Could use a better version of this going forward.
teknolog
parents:
2
diff
changeset
|
481 |
if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight) |
2 | 482 |
{ |
483 |
iStylusPopupMenu->ShowMenu(); |
|
484 |
iStylusPopupMenu->SetPosition(aPenEventLocation); |
|
485 |
} |
|
57
31e34b8e2878
Fix for regression in popup menu fix for queue view
teknolog
parents:
50
diff
changeset
|
486 |
|
2 | 487 |
DP("CPodcastListView::HandleLongTapEventL END"); |
488 |
} |
|
489 |
||
490 |
||
491 |
void CPodcastListView::DynInitToolbarL (TInt /*aResourceId*/, CAknToolbar * /*aToolbar*/) |
|
492 |
{ |
|
493 |
} |
|
494 |
||
495 |
||
496 |
void CPodcastListView::OfferToolbarEventL(TInt aCommand) |
|
497 |
{ |
|
498 |
HandleCommandL(aCommand); |
|
499 |
} |
|
500 |
||
501 |
void CPodcastListView::ShowWaitDialogL(TDesC &aWaitText) |
|
502 |
{ |
|
503 |
DP("CPodcastListView::ShowWaitDialogL BEGIN"); |
|
504 |
||
505 |
if (iWaitDialog) { |
|
506 |
User::Leave(KErrInUse); |
|
507 |
} |
|
508 |
||
509 |
iWaitDialog=new(ELeave) CAknWaitDialog(reinterpret_cast<CEikDialog**>(&iWaitDialog), EFalse); |
|
510 |
iWaitDialog->SetCallback(this); |
|
511 |
iWaitDialog->ExecuteLD(R_WAITDLG); |
|
512 |
iWaitDialog->SetTextL(aWaitText); |
|
513 |
DP("CPodcastListView::ShowWaitDialogL END"); |
|
514 |
} |
|
515 |
||
516 |
TKeyResponse CPodcastListView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) |
|
517 |
{ |
|
518 |
if (aType==EEventKey) |
|
519 |
{ |
|
520 |
switch (aKeyEvent.iCode) |
|
521 |
{ |
|
522 |
case EKeyRightArrow: |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
27
diff
changeset
|
523 |
((CPodcastAppUi*)AppUi())->TabRightL(); |
2 | 524 |
return EKeyWasConsumed; |
525 |
case EKeyLeftArrow: |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
27
diff
changeset
|
526 |
((CPodcastAppUi*)AppUi())->TabLeftL(); |
2 | 527 |
return EKeyWasConsumed; |
528 |
} |
|
529 |
} |
|
530 |
return EKeyWasNotConsumed; |
|
531 |
} |
|
532 |