24 #include "PodcastApp.h" |
24 #include "PodcastApp.h" |
25 #include "PodcastUtils.h" |
25 #include "PodcastUtils.h" |
26 #include <caknfileselectiondialog.h> |
26 #include <caknfileselectiondialog.h> |
27 #include <podcast.rsg> |
27 #include <podcast.rsg> |
28 #include <podcast.mbg> |
28 #include <podcast.mbg> |
|
29 #include <akntitle.h> |
29 #include <gulicon.h> |
30 #include <gulicon.h> |
30 #include <eikenv.h> |
31 #include <eikenv.h> |
31 #include <e32const.h> |
32 #include <e32const.h> |
32 #include <eikdialg.h> |
33 #include <eikdialg.h> |
33 #include <aknquerydialog.h> |
34 #include <aknquerydialog.h> |
91 SetEmptyTextL(R_PODCAST_EMPTY_SEARCH); |
92 SetEmptyTextL(R_PODCAST_EMPTY_SEARCH); |
92 } |
93 } |
93 |
94 |
94 CPodcastSearchView::~CPodcastSearchView() |
95 CPodcastSearchView::~CPodcastSearchView() |
95 { |
96 { |
|
97 DP("CPodcastSearchView::~CPodcastSearchView BEGIN"); |
96 iPodcastModel.FeedEngine().RemoveObserver(this); |
98 iPodcastModel.FeedEngine().RemoveObserver(this); |
97 |
99 DP("CPodcastSearchView::~CPodcastSearchView END"); |
98 } |
100 } |
99 |
101 |
100 TUid CPodcastSearchView::Id() const |
102 TUid CPodcastSearchView::Id() const |
101 { |
103 { |
102 return KUidPodcastSearchViewID; |
104 return KUidPodcastSearchViewID; |
106 TUid aCustomMessageId, |
108 TUid aCustomMessageId, |
107 const TDesC8& aCustomMessage) |
109 const TDesC8& aCustomMessage) |
108 { |
110 { |
109 CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage); |
111 CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage); |
110 iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID); |
112 iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID); |
111 |
113 |
112 ((CPodcastAppUi*)AppUi())->NaviSetTextL(R_SEARCH_RESULTS); |
114 HBufC* text = iEikonEnv->AllocReadResourceLC(R_SEARCH_RESULTS); |
113 |
115 |
|
116 CAknTitlePane* titlePane = static_cast<CAknTitlePane*> |
|
117 ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
|
118 |
|
119 titlePane->SetTextL(*text , ETrue ); |
|
120 CleanupStack::PopAndDestroy(text); |
114 UpdateListboxItemsL(); |
121 UpdateListboxItemsL(); |
115 } |
122 } |
116 |
123 |
117 void CPodcastSearchView::DoDeactivate() |
124 void CPodcastSearchView::DoDeactivate() |
118 { |
125 { |
119 CPodcastListView::DoDeactivate(); |
126 CPodcastListView::DoDeactivate(); |
120 TRAP_IGNORE(((CPodcastAppUi*)AppUi())->NaviShowTabGroupL()); |
127 |
|
128 CAknTitlePane* titlePane = static_cast<CAknTitlePane*> |
|
129 ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
|
130 |
|
131 titlePane->SetTextToDefaultL(); |
121 } |
132 } |
122 |
133 |
123 |
134 |
124 void CPodcastSearchView::HandleListBoxEventL(CEikListBox* /* aListBox */, TListBoxEvent aEventType) |
135 void CPodcastSearchView::HandleListBoxEventL(CEikListBox* /* aListBox */, TListBoxEvent aEventType) |
125 { |
136 { |
220 // ask if user wants to update it now |
231 // ask if user wants to update it now |
221 TBuf<KMaxMessageLength> message; |
232 TBuf<KMaxMessageLength> message; |
222 iEikonEnv->ReadResourceL(message, R_ADD_FEED_SUCCESS); |
233 iEikonEnv->ReadResourceL(message, R_ADD_FEED_SUCCESS); |
223 if(ShowQueryMessageL(message)) |
234 if(ShowQueryMessageL(message)) |
224 { |
235 { |
225 CFeedInfo *info = iPodcastModel.FeedEngine().GetFeedInfoByUid(newInfo->Uid()); |
236 iPodcastModel.FeedEngine().UpdateFeedL(newInfo->Uid()); |
226 |
|
227 iPodcastModel.SetActiveFeedInfo(info); |
|
228 AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID, TUid::Uid(0), KNullDesC8()); |
|
229 iPodcastModel.FeedEngine().UpdateFeedL(info->Uid()); |
|
230 } |
237 } |
231 } |
238 } |
232 else |
239 else |
233 { |
240 { |
234 TBuf<KMaxMessageLength> message; |
241 TBuf<KMaxMessageLength> message; |