129 iToolbar->AddItemL( button, EAknCtButton, bArray[i].iCommandId,0 ); |
129 iToolbar->AddItemL( button, EAknCtButton, bArray[i].iCommandId,0 ); |
130 |
130 |
131 CleanupStack::Pop( button ); |
131 CleanupStack::Pop( button ); |
132 CleanupStack::PopAndDestroy( tooltipText ); |
132 CleanupStack::PopAndDestroy( tooltipText ); |
133 } |
133 } |
134 TRAP_IGNORE(iToolbar->DisableToolbarL( ETrue )); |
|
135 } |
134 } |
136 } |
135 } |
137 |
136 |
138 // --------------------------------------------------------------------------- |
137 // --------------------------------------------------------------------------- |
139 // CreateButtonL |
138 // CreateButtonL |
393 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
392 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
394 |
393 |
395 iWiredAccFlag = accFlag->Boolean(); |
394 iWiredAccFlag = accFlag->Boolean(); |
396 if ( iCallInProgress ) |
395 if ( iCallInProgress ) |
397 { |
396 { |
398 SetToolbarButtonDimmed( EPhoneInCallCmdActivateIhf, iWiredAccFlag ); |
397 if ( iWiredAccFlag ) |
|
398 { |
|
399 // Dim toolbar button |
|
400 iToolbar->SetItemDimmed( EPhoneInCallCmdActivateIhf, ETrue, ETrue ); |
|
401 } |
|
402 else if ( !iDimActivateIhf ) |
|
403 { |
|
404 // Don't undim ActivateIhf button, if it was intended to be dimmed all the time |
|
405 iToolbar->SetItemDimmed( EPhoneInCallCmdActivateIhf, EFalse, ETrue ); |
|
406 } |
|
407 |
399 UpdateToolbar(); |
408 UpdateToolbar(); |
400 } |
409 } |
401 } |
410 } |
402 } |
411 } |
403 |
412 |
450 // Don't dim/undim iHF when complete toolbar dimming is changed. |
459 // Don't dim/undim iHF when complete toolbar dimming is changed. |
451 if ( !iWiredAccFlag ) |
460 if ( !iWiredAccFlag ) |
452 { |
461 { |
453 iToolbar->SetItemDimmed( EPhoneInCallCmdActivateIhf, aDimmed, ETrue ); |
462 iToolbar->SetItemDimmed( EPhoneInCallCmdActivateIhf, aDimmed, ETrue ); |
454 } |
463 } |
|
464 iDimActivateIhf = aDimmed; |
455 } |
465 } |
456 |
466 |
457 // --------------------------------------------------------- |
467 // --------------------------------------------------------- |
458 // CPhoneToolbarController::SetToolbarButtonDimmed |
468 // CPhoneToolbarController::SetToolbarButtonDimmed |
459 // --------------------------------------------------------- |
469 // --------------------------------------------------------- |
460 // |
470 // |
461 void CPhoneToolbarController::SetToolbarButtonDimmed( const TInt aCommandId, const TBool aDimmed ) |
471 void CPhoneToolbarController::SetToolbarButtonDimmed( const TInt aCommandId, const TBool aDimmed ) |
462 { |
472 { |
463 // __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneToolbarController::SetToolbarButtonDimmed()" ); |
473 // __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneToolbarController::SetToolbarButtonDimmed()" ); |
464 |
474 |
465 // Dim toolbar button |
475 if ( aCommandId == EPhoneInCallCmdActivateIhf ) |
466 iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); |
476 { |
|
477 if ( aDimmed ) |
|
478 { |
|
479 // Dim toolbar button |
|
480 iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); |
|
481 } |
|
482 else |
|
483 { |
|
484 // Don't undim IHF if wired acc is connected. |
|
485 if ( !iWiredAccFlag ) |
|
486 { |
|
487 iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); |
|
488 } |
|
489 } |
|
490 iDimActivateIhf = aDimmed; |
|
491 } |
|
492 else |
|
493 { |
|
494 // Dim/undim toolbar button |
|
495 iToolbar->SetItemDimmed( aCommandId, aDimmed, ETrue ); |
|
496 } |
467 } |
497 } |
468 |
498 |
469 // END |
499 // END |
470 |
500 |