116 iSelectedImageCount = 0; |
116 iSelectedImageCount = 0; |
117 iSelectedVideoCount = 0; |
117 iSelectedVideoCount = 0; |
118 iCurrentCenRepMonitor = EMonitorNone; |
118 iCurrentCenRepMonitor = EMonitorNone; |
119 iTnmRequestID = KErrNotFound; |
119 iTnmRequestID = KErrNotFound; |
120 |
120 |
|
121 iIsFullScreenView = IsFullScreenViewL(); |
|
122 |
121 //Check for fullscreen here since we dont get the activate call in FS. |
123 //Check for fullscreen here since we dont get the activate call in FS. |
122 if(IsFullScreenViewL()) |
124 if(iIsFullScreenView) |
123 { |
125 { |
124 //Giving the viewid as zero, since its not used anywhere. |
126 //Giving the viewid as zero, since its not used anywhere. |
125 iToolbar = iAvkonAppUi->CurrentFixedToolbar(); |
127 iToolbar = iAvkonAppUi->CurrentFixedToolbar(); |
126 ActivateL(0); |
128 ActivateL(0); |
127 UpdateFSUploadIconL(); |
129 UpdateFSUploadIconL(); |
366 { |
368 { |
367 TRACER( "CGlxCommandHandlerUpload::PopulateToolbarL" ); |
369 TRACER( "CGlxCommandHandlerUpload::PopulateToolbarL" ); |
368 |
370 |
369 //When the Upload is not supported or if we are in grid view |
371 //When the Upload is not supported or if we are in grid view |
370 //and none of the item is selected Dim the Upload icon |
372 //and none of the item is selected Dim the Upload icon |
371 if(!iUploadSupported || (!IsFullScreenViewL() && |
373 if(!iUploadSupported || (!iIsFullScreenView && |
372 (MediaList().SelectionCount()== 0))) |
374 (MediaList().SelectionCount()== 0))) |
373 { |
375 { |
374 DisableUploadToolbarItem(ETrue); |
376 DisableUploadToolbarItem(ETrue); |
375 } |
377 } |
376 |
378 |
527 void CGlxCommandHandlerUpload::HandleFocusChangedL(NGlxListDefs::TFocusChangeType /*aType*/, |
529 void CGlxCommandHandlerUpload::HandleFocusChangedL(NGlxListDefs::TFocusChangeType /*aType*/, |
528 TInt /*aNewIndex*/, TInt /*aOldIndex*/, MGlxMediaList* /*aList*/) |
530 TInt /*aNewIndex*/, TInt /*aOldIndex*/, MGlxMediaList* /*aList*/) |
529 { |
531 { |
530 TRACER("CGlxCommandHandlerUpload::HandleFocusChangedL"); |
532 TRACER("CGlxCommandHandlerUpload::HandleFocusChangedL"); |
531 //In Fullscreen change the icons based on current focused icon |
533 //In Fullscreen change the icons based on current focused icon |
532 if(iUploadSupported && IsFullScreenViewL()) |
534 if(iUploadSupported && iIsFullScreenView) |
533 { |
535 { |
534 UpdateFSUploadIconL(); |
536 UpdateFSUploadIconL(); |
535 } |
537 } |
536 } |
538 } |
537 |
539 |
543 void CGlxCommandHandlerUpload::HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList) |
545 void CGlxCommandHandlerUpload::HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList) |
544 { |
546 { |
545 TRACER("CGlxCommandHandlerUpload::HandleItemSelectedL"); |
547 TRACER("CGlxCommandHandlerUpload::HandleItemSelectedL"); |
546 //In grid if an item is selected update the toolbar icon based on |
548 //In grid if an item is selected update the toolbar icon based on |
547 //the mime types of items |
549 //the mime types of items |
548 if(iUploadSupported && !IsFullScreenViewL()) |
550 if(iUploadSupported && !iIsFullScreenView) |
549 { |
551 { |
550 if(aList->SelectionCount() >= 1 ) |
552 if(aList->SelectionCount() >= 1 ) |
551 { |
553 { |
552 TFileName uploadIconFileName; |
554 TFileName uploadIconFileName; |
553 UpdateSelectionCount(aIndex, aSelected, aList); |
555 UpdateSelectionCount(aIndex, aSelected, aList); |
554 GetIconNameL(uploadIconFileName); |
556 GetIconNameL(uploadIconFileName); |
555 if(uploadIconFileName.Length()) |
557 if(uploadIconFileName.Length()) |
556 { |
558 { |
557 DecodeIconL(uploadIconFileName); |
559 DecodeIconL(uploadIconFileName); |
558 } |
560 } |
559 DisableUploadToolbarItem(EFalse); |
561 //Enable the toolbar only once to avoid performance prb |
|
562 if(aList->SelectionCount() == 1 ) |
|
563 { |
|
564 DisableUploadToolbarItem(EFalse); |
|
565 } |
560 } |
566 } |
561 else |
567 else |
562 { |
568 { |
563 iSelectedImageCount = 0; |
569 iSelectedImageCount = 0; |
564 iSelectedVideoCount = 0; |
570 iSelectedVideoCount = 0; |