16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include <../bidi.h> |
20 #include <../bidi.h> |
|
21 #include <brctldialogsprovider.h> |
|
22 |
21 #include "HistoryController.h" |
23 #include "HistoryController.h" |
22 #include "BrCtlDefs.h" |
24 #include <brctldefs.h> |
23 #include "HistoryView.h" |
25 #include "HistoryView.h" |
24 #include "HistoryEntry.h" |
26 #include "HistoryEntry.h" |
25 #include "BrCtlDialogsProvider.h" |
|
26 |
27 |
27 // EXTERNAL DATA STRUCTURES |
28 // EXTERNAL DATA STRUCTURES |
28 |
29 |
29 // EXTERNAL FUNCTION PROTOTYPES |
30 // EXTERNAL FUNCTION PROTOTYPES |
30 |
31 |
166 break; |
170 break; |
167 } |
171 } |
168 case TBrCtlDefs::ECommandBack: |
172 case TBrCtlDefs::ECommandBack: |
169 { |
173 { |
170 if (m_historyViewEnabled && m_backListAllowed) { |
174 if (m_historyViewEnabled && m_backListAllowed) { |
171 showHistoryViewL(true); |
175 showHistoryViewL(false); |
172 } |
176 } |
173 else { |
177 else { |
174 loadHistoryUrl( EHistoryStackDirectionPrevious, TBrCtlDefs::ECacheModeHistory, -1); |
178 loadHistoryUrl( EHistoryStackDirectionPrevious, TBrCtlDefs::ECacheModeHistory, -1); |
175 } |
179 } |
176 break; |
180 break; |
252 { |
256 { |
253 if(m_historyViewEnabled) { |
257 if(m_historyViewEnabled) { |
254 HistoryEntry* entry = entryByIndex(m_currentIndex); |
258 HistoryEntry* entry = entryByIndex(m_currentIndex); |
255 if (entry) { |
259 if (entry) { |
256 TSize bmsize = bitmap->SizeInPixels(); |
260 TSize bmsize = bitmap->SizeInPixels(); |
|
261 #ifdef BRDO_MULTITOUCH_ENABLED_FF |
|
262 entry->storeThumbnail(bitmap, TRect(0,0,bmsize.iWidth, bmsize.iHeight)); |
|
263 #else |
257 TRect parentControlRect = m_historyCallback->parent()->Rect(); |
264 TRect parentControlRect = m_historyCallback->parent()->Rect(); |
258 int historyViewWidth = parentControlRect.Width(); |
265 int historyViewWidth = parentControlRect.Width(); |
259 int historyViewHeight( parentControlRect.Height()); |
266 int historyViewHeight( parentControlRect.Height()); |
260 // Find out that in either portrait or landscape view what is the max height |
267 // Find out that in either portrait or landscape view what is the max height |
261 int maxDimension = (historyViewWidth > historyViewHeight)? historyViewWidth:historyViewHeight; |
268 int maxDimension = (historyViewWidth > historyViewHeight)? historyViewWidth:historyViewHeight; |
262 int thumbnailHeight = Min(bmsize.iHeight, maxDimension*KCenterThumbnailHeightPercent/100); |
269 int thumbnailHeight = Min(bmsize.iHeight, maxDimension*KCenterThumbnailHeightPercent/100); |
263 int thumbnailWidth = Min(bmsize.iWidth, maxDimension*KCenterThumbnailWidthPercent/100); |
270 int thumbnailWidth = Min(bmsize.iWidth, maxDimension*KCenterThumbnailWidthPercent/100); |
264 entry->storeThumbnail(bitmap, TRect(0,0,thumbnailWidth, thumbnailHeight)); |
271 entry->storeThumbnail(bitmap, TRect(0,0,thumbnailWidth, thumbnailHeight)); |
|
272 #endif |
265 } |
273 } |
266 } |
274 } |
267 } |
275 } |
268 |
276 |
269 /** |
277 /** |
515 void HistoryController::showHistoryListL() |
523 void HistoryController::showHistoryListL() |
516 { |
524 { |
517 SelectArray* historyList = new( ELeave ) CArrayFixFlat<TBrCtlSelectOptionData>(10); |
525 SelectArray* historyList = new( ELeave ) CArrayFixFlat<TBrCtlSelectOptionData>(10); |
518 CleanupStack::PushL( historyList ); |
526 CleanupStack::PushL( historyList ); |
519 for( int i = m_historyStack.Count() - 1; i >= 0; i-- ) { |
527 for( int i = m_historyStack.Count() - 1; i >= 0; i-- ) { |
520 TBrCtlSelectOptionData t( TBrCtlSelectOptionData(entryByIndex(i)->pageTitle(), i == m_currentIndex, false, false) ); |
528 if(entryByIndex(i)) |
521 historyList->AppendL(t); |
529 { |
|
530 TBrCtlSelectOptionData t( TBrCtlSelectOptionData(entryByIndex(i)->pageTitle(), i == m_currentIndex, false, false) ); |
|
531 historyList->AppendL(t); |
|
532 } |
522 } |
533 } |
523 // Display history dialog |
534 // Display history dialog |
524 bool ret = m_historyCallback->dialogSelectOption(historyList); |
535 bool ret = m_historyCallback->dialogSelectOption(historyList); |
525 if (ret) { |
536 if (ret) { |
526 int index = 0; |
537 int index = 0; |